sad High priority Using Sweet Home 3D in Eclipse

This topic has been viewed 12304 times and has 14 replies
Thread status: Active
Questions about extending features and developing plug-ins [img]http://www.sweethome3d.com/images/flags/en_small.gif[/img]
binadnsh77
Posts: 6
Joined: Thu Mar 21, 2013 9:22 am

Using Sweet Home 3D in Eclipse

Post by binadnsh77 »

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.
User avatar
Puybaret
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: Using Sweet Home 3D in Eclipse

Post by Puybaret »

hat version do you use? On which system?
Emmanuel Puybaret, Sweet Home 3D creator
binadnsh77
Posts: 6
Joined: Thu Mar 21, 2013 9:22 am

Re: Using Sweet Home 3D in Eclipse

Post by binadnsh77 »

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.
User avatar
Puybaret
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: Using Sweet Home 3D in Eclipse

Post by Puybaret »

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
Gforce85
Posts: 10
Joined: Sat Mar 24, 2012 5:31 pm

Re: Using Sweet Home 3D in Eclipse

Post by Gforce85 »

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":

Image

Image

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?
Gforce85
Posts: 10
Joined: Sat Mar 24, 2012 5:31 pm

Re: Using Sweet Home 3D in Eclipse

Post by Gforce85 »

By the way how exactly do you edit posts?
User avatar
Puybaret
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: Using Sweet Home 3D in Eclipse

Post by Puybaret »

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
Gforce85
Posts: 10
Joined: Sat Mar 24, 2012 5:31 pm

Re: Using Sweet Home 3D in Eclipse

Post by Gforce85 »

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.java: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.
User avatar
Puybaret
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: Using Sweet Home 3D in Eclipse

Post by Puybaret »

Try with the VM option:

Code: Select all

-Djava.library.path=lib/windows/i386
Emmanuel Puybaret, Sweet Home 3D creator
Gforce85
Posts: 10
Joined: Sat Mar 24, 2012 5:31 pm

Re: Using Sweet Home 3D in Eclipse

Post by Gforce85 »

Try with the VM option:

Code: Select all

-Djava.library.path=lib/windows/i386
Thank you! I have tried this, but I get the same error as I mentioned above.
Post Reply New Topic

Who is online

Users browsing this forum: No registered users and 1 guest