Print at Dec 21, 2025, 5:14:19 PM
Posted by binadnsh77 at Mar 22, 2013, 2:57:45 AM
sad   Using Sweet Home 3D in Eclipse
Hello everybody I am kinda new to this 3D concept and while surfing I came across this beautiful software. Actually I have a need to use some of the features of Sweet Home 3D in my project and as part of this I downloaded the source code and after reading the Read Me file I opened the source code project in Eclipse. I was able to compile and create jar file also, but on running the jar it is not showing anything. No error nothing.

Can anybody help me with this. This was kinda very very urgent request.

Posted by Puybaret at Mar 22, 2013, 7:02:45 PM
Re: Using Sweet Home 3D in Eclipse
hat version do you use? On which system?
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator

Posted by binadnsh77 at Mar 23, 2013, 3:00:00 AM
Re: Using Sweet Home 3D in Eclipse
Thanks Emmanuel for your quick response. On setting the VM arguments I was able to run it through eclipse on Linux and Windows2008, but I was not able to run it through eclipse on Windows 7 (32 bit). I am using SweetHome3D-3.7-src. Also I am not still not able to run the jar created through command line. Can you tell me how we can run it through command line. How do we pass the VM arguments on command line. I tried

java -jar SweetHome3D -Djava.ext.dirs=lib:lib/linux/i386

but it is showing an error---

Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)
Caused by: java.lang.UnsatisfiedLinkError: no j3dcore-ogl in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1681)
at java.lang.Runtime.loadLibrary0(Runtime.java:840)
at java.lang.System.loadLibrary(System.java:1047)
at javax.media.j3d.NativePipeline$1.run(NativePipeline.java:231)
at java.security.AccessController.doPrivileged(Native Method)
at javax.media.j3d.NativePipeline.loadLibrary(NativePipeline.java:200)
at javax.media.j3d.NativePipeline.loadLibraries(NativePipeline.java:157)
at javax.media.j3d.MasterControl.loadLibraries(MasterControl.java:987)
at javax.media.j3d.VirtualUniverse.<clinit>(VirtualUniverse.java:299)
at javax.media.j3d.GraphicsConfigTemplate3D.getBestConfiguration(GraphicsConfigTemplate3D.java:321)
at java.awt.GraphicsDevice.getBestConfiguration(GraphicsDevice.java:175)
at com.eteks.sweethome3d.j3d.Component3DManager.<init>(Component3DManager.java:65)
at com.eteks.sweethome3d.j3d.Component3DManager.getInstance(Component3DManager.java:103)
at com.eteks.sweethome3d.SweetHome3D.addComponent3DRenderingErrorObserver(SweetHome3D.java:506)
at com.eteks.sweethome3d.SweetHome3D.init(SweetHome3D.java:398)
at com.eteks.sweethome3d.SweetHome3D.main(SweetHome3D.java:298)
... 5 more


Please if you can help me with this.

Posted by Puybaret at Mar 23, 2013, 8:21:11 AM
Re: Using Sweet Home 3D in Eclipse
I tried
java -jar SweetHome3D -Djava.ext.dirs=lib:lib/linux/i386
I'm pretty sure this command can't run, because the -jar option must be followed by a Jar file and the -D option must be cited before the -jar option.
By the way, the README.TXT file states that you should set the directory in the the -Djava.ext.dirs option according to your system and its architecture, i.e. for Windows 7 32 bit, it should be -Djava.ext.dirs=lib/windows/i386;lib and not -Djava.ext.dirs=lib:lib/linux/i386.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator

Posted by Gforce85 at Mar 27, 2013, 1:40:31 PM
Re: Using Sweet Home 3D in Eclipse
I have the same problem as the topic starter. I want to run this program from Eclipse ( under Windows 7 64 bit), and I have done what was in the "readme.text":



[IMG]http://i47.tinypic.com/2ivi8g2.jpg[/IMG]

But somehow I get the following error:

Error: Could not find or load main class Djava.ext.dirs=lib.windows.i386;lib,

What am I doing wrong?

Posted by Gforce85 at Mar 27, 2013, 1:43:48 PM
Re: Using Sweet Home 3D in Eclipse
By the way how exactly do you edit posts?

Posted by Puybaret at Mar 27, 2013, 2:46:43 PM
Re: Using Sweet Home 3D in Eclipse
Gforce85, you forgot the hyphen in front of the D letter. -D is really a basic common option of the JVM.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator

Posted by Gforce85 at Mar 27, 2013, 3:16:28 PM
Re: Using Sweet Home 3D in Eclipse
Gforce85, you forgot the hyphen in front of the D letter. -D is really a basic common option of the JVM.

Thank you!! I changed it but now I get this error when i try to run the project:

Mar 27, 2013 2:21:36 PM javax.media.j3d.NativePipeline getSupportedOglVendor SEVERE: java.lang.UnsatisfiedLinkError: no j3dcore-ogl-chk in java.library.path Exception in thread "main" java.lang.UnsatisfiedLinkError: no j3dcore-d3d in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at javax.media.j3d.NativePipeline$1.run(NativePipeline.java:231) at java.security.AccessController.doPrivileged(Native Method) at javax.media.j3d.NativePipeline.loadLibrary(NativePipeline.java:200) at javax.media.j3d.NativePipeline.loadLibraries(NativePipeline.java:157) at javax.media.j3d.MasterControl.loadLibraries(MasterControl.java:987) at javax.media.j3d.VirtualUniverse.<clinit>(VirtualUniverse.java:299) at javax.media.j3d.GraphicsConfigTemplate3D.getBestConfiguration(GraphicsConfigTemplate3D.java:321) at java.awt.GraphicsDevice.getBestConfiguration(Unknown Source) at com.eteks.sweethome3d.j3d.Component3DManager.<init>(Component3DManager.java:65) at com.eteks.sweethome3d.j3d.Component3DManager.getInstance(Component3DManager.java:103) at com.eteks.sweethome3d.SweetHome3D.addComponent3DRenderingErrorObserver(SweetHome3D.java:553) at com.eteks.sweethome3d.SweetHome3D.init(SweetHome3D.java:441) at com.eteks.sweethome3d.SweetHome3D.main(SweetHome3D.java:345) Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: Could not initialize class javax.media.j3d.VirtualUniverse at javax.media.j3d.GraphicsConfigTemplate3D.getBestConfiguration(GraphicsConfigTemplate3D.java:321) at java.awt.GraphicsDevice.getBestConfiguration(Unknown Source) at com.eteks.sweethome3d.j3d.Component3DManager.<init>(Component3DManager.java:65) at com.eteks.sweethome3d.j3d.Component3DManager.getInstance(Component3DManager.java:103) at com.eteks.sweethome3d.swing.HomeComponent3D.createComponent3D(HomeComponent3D.java:369) at com.eteks.sweethome3d.swing.HomeComponent3D.<init>(HomeComponent3D.java:289) at com.eteks.sweethome3d.swing.HomeComponent3D.<init>(HomeComponent3D.java:244) at com.eteks.sweethome3d.swing.SwingViewFactory.createView3D(SwingViewFactory.java:108) at com.eteks.sweethome3d.viewcontroller.HomeController3D.getView(HomeController3D.java:165) at com.eteks.sweethome3d.swing.HomePane.createActions(HomePane.java:327) at com.eteks.sweethome3d.swing.HomePane.<init>(HomePane.java:250) at com.eteks.sweethome3d.swing.SwingViewFactory.createHomeView(SwingViewFactory.java:122) at com.eteks.sweethome3d.viewcontroller.HomeController.getView(HomeController.java:330) at com.eteks.sweethome3d.HomeFramePane.<init>(HomeFramePane.java:92) at com.eteks.sweethome3d.HomeFrameController.getView(HomeFrameController.java:63) at com.eteks.sweethome3d.HomeFrameController.displayView(HomeFrameController.java:84) at com.eteks.sweethome3d.SweetHome3D$4.collectionChanged(SweetHome3D.java:401) at com.eteks.sweethome3d.model.CollectionChangeSupport.fireCollectionChanged(CollectionChangeSupport.ja
va:77) at com.eteks.sweethome3d.model.HomeApplication.addHome(HomeApplication.java:76) at com.eteks.sweethome3d.SweetHome3D.showDefaultHomeFrame(SweetHome3D.java:740) at com.eteks.sweethome3d.SweetHome3D.start(SweetHome3D.java:725) at com.eteks.sweethome3d.SweetHome3D$3$1.run(SweetHome3D.java:374) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$200(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source)


I have also tried:
-Djava.ext.dirs=lib/windows/x64;lib

But this also doesn't work.

Posted by Puybaret at Mar 27, 2013, 5:27:32 PM
Re: Using Sweet Home 3D in Eclipse
Try with the VM option:
-Djava.library.path=lib/windows/i386

----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator

Posted by Gforce85 at Mar 27, 2013, 6:26:41 PM
Re: Using Sweet Home 3D in Eclipse
Try with the VM option:
-Djava.library.path=lib/windows/i386


Thank you! I have tried this, but I get the same error as I mentioned above.

Posted by Gforce85 at Mar 27, 2013, 6:31:41 PM
Re: Using Sweet Home 3D in Eclipse
By the way my java runtime library is in the following path:
C:\Program Files (x86)\Java\jre7\bin

Maybe I Should add the java 3d dll files in this 'bin' folder and point to this folder from the VM option like this ?:

-Djava.library.path=C:\Program Files (x86)\Java\jre7\bin

Posted by binadnsh77 at Apr 1, 2013, 10:22:22 AM
Re: Using Sweet Home 3D in Eclipse
I think it does not work in i386 window systems. It works fine in Linux-32 bit and windows 64 bit. I have tried it.

Posted by Puybaret at Apr 1, 2013, 10:32:16 AM
Re: Using Sweet Home 3D in Eclipse
I think Gforce85 and you mixed so much things in the DLLs and the PATH of your Windows computer that it's too difficult to help you without being in front of it.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator

Posted by Gforce85 at Apr 1, 2013, 8:13:30 PM
Re: Using Sweet Home 3D in Eclipse
I think Gforce85 and you mixed so much things in the DLLs and the PATH of your Windows computer that it's too difficult to help you without being in front of it.

It works now with the windows 64 bit version!:



My installation dir is:
D:\Open Source\Sweet home 3D 27-3-2013\SweetHome3D-4.0-src

And in eclipse at the run configuration menu I have this in the VM arguments:

-Djava.ext.dirs=lib/windows/x64;lib

Posted by binadnsh77 at Apr 9, 2013, 11:29:15 AM
Re: Using Sweet Home 3D in Eclipse
I installed Java3D in my Windows 32 bit system and then I was able to run the sweethome3d from eclipse. Since I had installed the Java3D there was no need to pass the VM arguments.