Results 1 to 7 of 7
  1. #1
    africanhacker is offline Senior Member
    Join Date
    Feb 2011
    Posts
    107
    Rep Power
    0

    Default Move project from netbeans to Eclipse

    Hie guys can I please have some help.

    I have been working on an assignment using Netbeans. I have written all the relevant classes and also built the GUI in netbeans.

    I need to move my project back to eclipse so that it can run as an eclipse project, all our projects are supposed to be in an eclipse project. I have already finished the project so I am uninterested in being able to view the GUI design in eclipse (which I know is not possible)

    How do I go about moving the project.

    Many thanks in advance for your help.

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

  3. #3
    africanhacker is offline Senior Member
    Join Date
    Feb 2011
    Posts
    107
    Rep Power
    0

    Default

    Please do not be annoyed but I am a complete novice. How do I export a project as a Jar and how would I import that to eclipse. Again, many thanks for your time.

  4. #4
    Jodokus's Avatar
    Jodokus is offline Senior Member
    Join Date
    Jan 2011
    Location
    Amsterdam, the Netherlands
    Posts
    230
    Rep Power
    4

    Default

    Could you explain what you tried and what went wrong?
    Eclipse has an import function under the file-menu. As import source you can choose an archive file (fubarable's suggestion), the file system, an existing project and many more.
    (Warning if using existing project: it is not moved but left in its original location).
    I've very good experiences with just using copy-paste: make a new project and copy the directorytree with the sourcefiles (.java) in your new project's src-directory.
    If you do this with seperate files into existing packages you have to edit the package within the files by hand.

  5. #5
    africanhacker is offline Senior Member
    Join Date
    Feb 2011
    Posts
    107
    Rep Power
    0

    Default

    @Jodokus
    I did the copy and paste thing as you suggested. The program is running fine in eclipse but there is an warning that I am seeing in eclipse. What do these mean. When I was in netbeans I did not see these errors.

    The pictures are attached




  6. #6
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    Those are warnings not errors. Since your classes extend swing classes that implement the Serializable interface, Java is warning you that you don't declare a proper long field that the Serializable interface expects. You can ignore these warnings since you are not trying to serialize your GUI objects. If you want to get rid of them, you can change a global setting in Eclipse to ignore this or you can place the @SuppressWarnings("serial") annotation just above your class signature.



    Java Code:
    @SuppressWarnings("serial")
    public class ShoppingCardDisplay extends javax.swing.JFrame {
      //....
    Last edited by Fubarable; 03-26-2011 at 04:56 PM.

  7. #7
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,305
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by africanhacker View Post
    @Jodokus
    I did the copy and paste thing as you suggested. The program is running fine in eclipse but there is an warning that I am seeing in eclipse. What do these mean. When I was in netbeans I did not see these errors.
    Eclipse can be rather picky when it comes to classes that extend another class that implements the Serializable interface: it wants the extending class to implement a long serial version UID (see its warning messages). You can simply ignore those messages or do what Eclipse told you to do. You can also switch off those warning messages: go to Window>Preferences>Java>Compiler>Error/Warnings and deselect the "Serializable Class without SerialVersionUID" warning message. Do whatever you think is best for you.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

Similar Threads

  1. First EJB Project in NetBeans
    By enzom83 in forum Enterprise JavaBeans (EJB)
    Replies: 1
    Last Post: 02-08-2011, 10:15 AM
  2. Replies: 0
    Last Post: 12-28-2010, 09:05 AM
  3. Using NetBeans To Develop Project
    By indra00 in forum Java Applets
    Replies: 5
    Last Post: 07-04-2010, 06:24 PM
  4. Publish project from NetBeans
    By ichwar in forum NetBeans
    Replies: 5
    Last Post: 08-19-2009, 03:28 PM
  5. importing a netbeans project in Eclipse
    By javanoob#1 in forum Eclipse
    Replies: 0
    Last Post: 02-10-2009, 11:20 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •