X

Shay Shmeltzer's Oracle Development Tools Tips

  • January 28, 2010

Migrating From NetBeans to JDeveloper - The Video

Shay Shmeltzer
Director of Product Management - Oracle

So Oracle now own NetBeans as well as JDeveloper - but can code be migrated between the two?

The answer is yes - and it is quite simple actually - have a look.

If you are a developer with an open mind and you like to explore new IDEs and you decide that you want to have a look at JDeveloper we have lots of demos and tutorials for you on OTN. Most of them will show you how to create an application from scratch in JDeveloper; what if you actually want to try the tool on your existing source/project?

I'm working on a short how-to that covers the basic steps for this, and while working on this I recorded that short 10 minutes demo that shows you how to take one of NetBeans' sample application - the consulting agency - which uses JPA and JSF and open, compile and run it with JDeveloper and WebLogic.

.

The basic steps are:

Create project from existing source (or WAR).

Set project properties in JDeveloper and add libraries.

Compile and Run.

In the specific application I picked there were some other tricky parts like a mislocated persistence.xml file (not under META-INF), a reference to dynafaces that seems to be dead, and a connection to the Derby database.

But I got all of this sorted out and working.

Now I could use the visual JSF editor in JDeveloper to edit the pages.

Join the discussion

Comments ( 11 )
  • Peter Magsam Friday, January 29, 2010
    Hello Shay,
    many people use netbeans with vwp = Woodstock. Woodstock is really a great tool - a jewel - for developing web applications. Some people from Sun think we need no efficient development and killed Woodstock. Nobody understands this decision. We all want this visual designer back. Will it be possible to migrate from Woodstock to JBuilder visual designer?
    Peter
  • Bobby Bissett Thursday, February 4, 2010
    Thanks for the blogs aimed at NetBeans developers. As someone who has used NB since the beginning, it's helpful to see what the two IDEs have in common before I start learning the extra features in JDeveloper. Blogs like this will help get us Sun-now-Oracle folks up to speed more quickly.
    Cheers,
    Bobby
  • Jamesarbrown Thursday, June 10, 2010
    I looked at JDev once and really found it a nice GUI and ease of creating a page. I did not get too far into it due to the ADF licencing structure which I felt was more aimed at 1000+ employee companies and insisted on Oracle server... anything else (ie tomcat) really really did cost.
    Ie Jdev is not really freeware as it can not produce anything you can use. The community will simply not go there.
    Also the sql databinding was not so obvious as NB. NB you just dragged and dropped and somewhere behind the scenes it just worked.
    Also examples in Jdev were few, community support low etc.
    If someone can get a Woodstock JSF1.2 VWP project into and working onto Jdev.. great... or a howto... in NB you did this.. in Jdev you do this. etc.
    Somewhere there needs to be a rethink on ADF costs and a work through of getting NB visual into Jdev.
    Basically I am trying to say the gap between the community and the commerical in the Oracle camp is just too great.
    James
  • shay.shmeltzer Thursday, June 10, 2010
    James,
    JDeveloper is free, ADF is not.
    You can use JDeveloper to build applications that you can deploy for free as long as you don't use the ADF specific technology.
    But if you want to build a JSF, JPA, EJB application with Woodstock or Trinidad - no problem - it is free.
    By the way - here is how to get woodstock working in JDeveloper - http://blogs.oracle.com/shay/2010/01/woodstock_jsf_components_with.html and here is how the components map to the ADF Faces set of components - http://www.oracle.com/technology/products/adf/adffaces/woodstock2adfMatix.html
    If you want declarative data binding with a simple drag and drop - this is where ADF comes into the picture - see this: http://download.oracle.com/otn_hosted_doc/jdeveloper/11gdemos/adfoverview/adfoverview.htm
    So to summarize, JDeveloper is free and you can use it to do visual JSF development.
    ADF has a cost - and we believe the functionality it provides justifies this cost. You can choose to use it or not.
  • Julio Araujo Monday, December 20, 2010
    Hi Shay,
    My connection to the database will get the context.xml (woodstock project it's working), but the migrated project no. how can i fixed?
  • shay.shmeltzer Monday, December 20, 2010
    Julio,
    I'm not exactly sure what the issue is - what do you mean it gets the context.xml? In WLS you usually use datasources defined in the server.
  • Julio Araujo Tuesday, December 21, 2010
    Hi Shay,
    Thanks for reply.
    Actually, in my project with jsf woodstock components and deployed on Apache Tomcat/6.0.29, we obtain the connection to database reading the datasources define in context.xml like this:
    public static Connection getConnection() throws SQLException {


    Connection connection = null;
    try
    {
    Context ctx = new InitialContext();
    DataSource ds = (DataSource) ctx.lookup("java:comp/env/jdbc/PERDB");
    //DataSource ds = (DataSource) ctx.lookup("jdbc/PERDB");
    connection = ds.getConnection();
    }
    catch( NamingException namingE)
    {
    System.out.println( "Oops, the lookup didn't work " + namingE.getMessage());
    //throw namingE;
    //return null;
    }
    catch(SQLException sqlE)
    {
    System.out.println( "Oops, we got a SQL Exception " + sqlE.getMessage());
    throw sqlE;
    }
    return connection;

    }
    But, when i try to run the same application (migrated of course), on weblogic, didn't find the datasources name.
  • shay.shmeltzer Tuesday, December 21, 2010
    You'll need to define the datasource on the embedded WebLogic Server.
    So once you run your page and the embedded WLS started go to http://127.0.0.1:7101/console login with weblogic/weblogic1 - and you'll be able to add that datasource definition through the console.
  • Julio Araujo Wednesday, December 22, 2010
    Hi Shay,
    I did it !!! but it's something wrong, because i can't read the datasource name. There is some clue to define this in weblogic and how to get from the application.?
    ragards.
    jaraujo
  • shay.shmeltzer Wednesday, December 22, 2010
    Try the WebLogic Documentation for example:
    http://download.oracle.com/docs/cd/E14571_01/web.1111/e13726/programming.htm#i1023868
    Or try the WebLogic discussion forum if it doesn't work.
  • Ana Sunday, February 10, 2019
    Como hago lo contrario pasar de JDeveloper a Netbeans un JFrame?
    Muchas gracias!
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.