Joined: Aug 11, 2010
Post Count: 7
Status:
Offline
How do i build a SweetHome3D v 2.5 source project?
Hi everyone,
I have downloaded the SweetHome3D v 2.5 source project and try to compile and run it using Eclipse IDE. I have read the README.txt which paste -Djava.ext.dirs=lib;lib/windows in VM argument.
However, i failed to build the project.
Below is the Exception thrown : Exception in thread "main" java.lang.UnsatisfiedLinkError: no j3dcore-ogl in java.library.path Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: Could not initialize class javax.media.j3d.VirtualUniverse Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
Any solution on this?
Any developer's guide, article on building a SH3D source project?
And prefer to run the main method of com.eteks.sweethome3d.SweetHome3D class.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
Joined: Aug 11, 2010
Post Count: 7
Status:
Offline
Re: How do i build a SweetHome3D v 2.5 source project?
Hi Puybaret,
Thanks for the reply and tips, i am coming from a c# background where i build most of my project using MVS2008. I have learned Java language before, build my Java program in very "old-school" way, TextPad
Yes, i have followed your instruction and try to run it again, but it failed too. 1)I am using the source project(CVS tar zipped file ) where i downloaded it through http://sweethome3d.cvs.sourceforge.net/viewvc/sweethome3d/SweetHome3D/ , am i getting the correct source project ?
2)Then i try to download another source project from http://sourceforge.net/projects/sweethome3d/files/ and try to run it, i did not received an UnsatisfiedLinkError Exception but i get another new exception so called : Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\Users\Boon Shyang\workspace\SweetHome3D\lib\windows\j3dcore-ogl.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform
3)I am running the source code in Windows Vista-64bit. In MVS2008, i can run this project in either 32 bit and 64 bit, but can i do the same thing using Eclipse IDE? Or should i go for other IDE such as Netbean? Perhaps, using a Java2C# convert tool?
France
Joined: Nov 7, 2005
Post Count: 9426
Status:
Offline
Re: How do i build a SweetHome3D v 2.5 source project?
As you're able to build the project without errors, you have the correct source wherever it comes from. The only difference is that you can retrieve the current version with CVS whereas the SourceForge.net download section contains only the released versions. The exception you got suggests that Eclipse has some problems to run Java 3D 32 bits DLLs. I guess it fails because you installed a 64 bits JDK on your computer. If you replace it by a 32 bits environment (including Eclipse one), you'll be able to run Sweet Home 3D in the same environment as the one available for download. You may also replace the 32 bits DLLs found in the lib/windows subdirectory of the project by their 64 bits version found here. I'll be pleased to know if this second solution works correctly.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
Joined: Aug 11, 2010
Post Count: 7
Status:
Offline
Re: How do i build a SweetHome3D v 2.5 source project?
Hi Puybaret,
I have followed the instruction given above, but still can't run the SweetHome3D program in Eclipse. Maybe I can show you some configuration in my Eclipse,
First, I have download a release version of SweetHome3D project (SweetHome3D-2.5-src.zip ) and i have unzipped it. Second, I try to import the Project and try to run it. (Run as Java application). I have selected the com.eteks.sweethome3d.SweetHome3D as the main class. Under Run configurations, the Main Class is com.eteks.sweethome3d.SweetHome3D and i have paste the -Djava.library.path=${workspace_loc:SweetHome3D}\lib\windows under VM arguments.
When i click run, an Error Message box pop-up which shows that Could not find the main class: Shayng\Downloads\SweetHOme3D-2.5-src\lib\windos.Program will exit.
Joined: Aug 11, 2010
Post Count: 7
Status:
Offline
Re: How do i build a SweetHome3D v 2.5 source project?
Hi Puybaret,
Just a short update, when i try another VM argument which is -Djava.ext.dirs=${workspace_loc:SweetHome3D}/lib;${workspace_loc:SweetHome3D}/lib/windows,
An Error Message box pop-up which shows that Could not find the main class: Shayng\Downloads\SweetHOme3D-2.5-src\lib;C:\Users\Boon.Program will exit.
Joined: Aug 11, 2010
Post Count: 7
Status:
Offline
Re: How do i build a SweetHome3D v 2.5 source project?
Hi Puybaret,
Thanks for the reply and suggestion, sorry for giving you so much trouble.
Yes, i have read your reply and you have place another thread post which has the same problem as me do for running a source project with Eclipse[Here ].I have read that post also.
Finally i can run the source project in my computer.
I am using the -Djava.ext.dirs="${workspace_loc:SweetHome3D}/lib";"${workspace_loc:SweetHome3D}/lib/windows"
as the vm argument and it works fine.
But when i try with another vm argument -Djava.library.path="${workspace_loc:SweetHome3D}\lib\window"
the same old problem still occurred which the program can't find the native library in java.library.path. Any idea?