I would like to import a netbeans project with dependencies into eclipse. Is there a standard procedure to do this?

Recommended Answers

All 7 Replies

 Create a project of the same NAME and TYPE of project  in eclipse (mine is desktop app using embedded db and xml properties. So a Java Project)

2. find the netbeans dist folder
3. copy the dist.jar to the bin of the project in the workspace
4. find the src of netbeans and copy all the contents into src of the eclipse src folder.
5. I had an xml folder containing ModelResourcesXML named xml
6. I copied that so it could be found sitting along side the src folder in the eclipse project
7. additionally, I had 20+ dependency jar files in the lib folder
8. copy that folder to sit beside the src folder in the eclipse project
9. press F5 to refresh eclipse project
10. right click that folder containing the jar dependencies
11. choose Build Path
12. choose configure Build Path
13. click Libraries tab
14. choose Add Jars
15. select all the jars in the folder containing the dependencies. Mine was lib/
16. F5 to refresh
17. run the project

Hope this is a complete solution!

Does it work? :-)

JAVA_HOME : dir

Volume in drive C has no label.
Volume Serial Number is DA5B-72C1

Directory of C:\Users\Steves\Documents\programs\eclipse\workspace\musicSystems

09/10/2014 11:31 AM <DIR> .
09/10/2014 11:31 AM <DIR> ..
09/10/2014 10:27 AM 1,517 .classpath
09/10/2014 10:09 AM 388 .project
09/10/2014 10:09 AM <DIR> .settings
09/10/2014 10:47 AM <DIR> bin
09/10/2014 11:27 AM <DIR> img
09/10/2014 10:22 AM <DIR> lib
09/10/2014 11:31 AM <DIR> src
09/10/2014 11:27 AM <DIR> xml
2 File(s) 1,905 bytes
8 Dir(s) 904,077,123,584 bytes free

JAVA_HOME :

Yes it worked awesomely! It compiled and ran a 40MB app. and built a derby db.
I am new to eclipse so I have to test it but I thought it would be trapped in netbeans forever. Hopefully the eclipse IDE will do a better job creating a standalone jar.

I tried it on my other app. it runs fine in netbeans yet I get an
Error java.io.IOException failed to load image contents

it creates a JInternalFrame.ser

so it may have a problem serializing the JInternalFrame.

It does a lot of XML writes and they look similar to the netbeans version

I am not sure of this Error yet.

CLASS 

public class SerializeFrame extends CreateSystemStartFolders{ {:
public void doSerialize(eclipse ide) var: (JInternalFrame frame) :
: C:\Users\Steves.targetGuide\admin_\admin\Note Folder\SystemDataFolder\eclipse ide.ser: LoginInfo.getSystemFolderSystemDir() + File.separator + frame.getTitle() + EXT; :

Error- java.io.IOException: failed to load image contents
--> in public CreateSystemStartFolders() var: xxxxxxxxx : xxxxxxxx<--

--> in public NotesFrameAttrToXML() var: xxxxxxxxx : xxxxxxxx<--

--> in public void sysOut() { var: xxxxxxxxx : xxxxxxxx<--

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE frames [
<!ELEMENT frames (frame)+>
<!ELEMENT frame (frameName,systemFolderPath,targetFolderPath)>
<!ATTLIST frame action CDATA #REQUIRED>
<!ELEMENT frameName (#PCDATA)>
<!ELEMENT systemFolderPath (#PCDATA)>
<!ELEMENT targetFolderPath (#PCDATA)>
]>
<frames>
<frame action="meta">
<frameName>
eclipse ide
</frameName>
<systemFolderPath>
C:\Users\Steves.targetGuide\admin_\admin\Note Folder\SystemDataFolder\eclipse ide
</systemFolderPath>
<targetFolderPath>
C:\Users\Steves.targetGuide\admin_\admin\Note Folder\eclipse ide
</targetFolderPath>
</frame>
</frames>
--> in private void sysWrite(eclipse ide , meta) var: JInternalFrame frame, String action :<--

So in short it seems to import fine. On to tje next challenge.

I digress, An additonal step I missed was to create the img dir along side of src I needed to put all my images there to have my second app run. Hence;the Error java.io.IOException failed to load images.
The imported projects seem to work.

I am glad to offer a gpod examle hope someones question gets answered efficiently

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.