Download

Online

Gallery

Blog

  Index  | Recent Threads  | List Attachments  | Search
 Welcome Guest  |  Register  |  Login
Login Name  Password
 

Sweet Home 3D Forum



No member browsing this thread
Thread Status: Active
Total posts in this thread: 10
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 1068 times and has 9 replies Next Thread
buzzz
Member



FR
Joined: Jun 25, 2017
Post Count: 54
Status: Offline
Reply to this Post  Reply with Quote 
running source code in eclipse

Hi all

I try to run SW Java source code in Eclipse.
I use Java 15 and eclipse 2021.

I select as main class :
com.eteks.sweethome3d.SweetHome3DBootstrap

I have strange errors :



WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by javax.media.j3d.JoglPipeline

Can't load library: C:\Users\toto\Desktop\SweetHome3D-7.1-src\natives\windows-amd64\gluegen_rt.dll


Strangely, building the jar with ant works well and jar run fine
[Jun 19, 2023, 8:55:13 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 9182
Status: Offline
Reply to this Post  Reply with Quote 
Re: running source code in eclipse

Did you follow the instructions in the README.TXT file of SweetHome3D project?
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Jun 19, 2023, 9:35:13 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
buzzz
Member



FR
Joined: Jun 25, 2017
Post Count: 54
Status: Offline
Reply to this Post  Reply with Quote 
Re: running source code in eclipse

Oups... yes, I forget to add the VM arguments, it now works.

I still have an error with the substring call here :


if (yafarayPluginsFolder != null)
{
try
{
String jarFile = sweetHome3DBootstrapClass.getResource(sweetHome3DBootstrapClass.getSimpleName() + ".class").getFile();
String t = jarFile.substring(0, jarFile.indexOf("!/"));
URL applicationJarUrl = new URL(t);


with :
jarfile = C:/Users/toto/Desktop/SweetHome3D-7.1-src/classes/com/eteks/sweethome3d/SweetHome3DBootstrap.class
[Jun 19, 2023, 2:44:11 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 9182
Status: Offline
Reply to this Post  Reply with Quote 
Re: running source code in eclipse

Select com.eteks.sweethome3d.SweetHome3D as main class.
com.eteks.sweethome3d.SweetHome3DBootstrap is made to be run from a JAR executable or Applet / Java Web Start environment.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Jun 19, 2023, 10:13:32 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
buzzz
Member



FR
Joined: Jun 25, 2017
Post Count: 54
Status: Offline
Reply to this Post  Reply with Quote 
Re: running source code in eclipse

thank you very much
[Jun 19, 2023, 10:25:57 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
buzzz
Member



FR
Joined: Jun 25, 2017
Post Count: 54
Status: Offline
Reply to this Post  Reply with Quote 
Re: running source code in eclipse

Hi
I have some problems with openJDK15, GUI is not refreshing correctly, some buttons are placed incorrectly, windows screen update is done partially.

So I suppose, I will install the last version of the JDK to run the app. Nevertheless, I need to compile with an older version. Which jre version do you recommend to run SW 7.1 in eclipse ?
[Jun 20, 2023, 2:24:20 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 9182
Status: Offline
Reply to this Post  Reply with Quote 
Re: running source code in eclipse

I mainly use Eclipse under macOS so I'm not sure my advice will interest you. Anyway the best advice is to follow Eclipse recommandations.
It's also possible to install more than a JDK in your system and use them in Eclipse. At this moment, I have 5 different JDKs/JREs configured in my Eclipse installation.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Jun 21, 2023, 1:00:09 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
buzzz
Member



FR
Joined: Jun 25, 2017
Post Count: 54
Status: Offline
Reply to this Post  Reply with Quote 
Re: running source code in eclipse

Thks

I notice that I have no problem when running the jar with openjdk15

So I install Eclipse last version and everything works fine.
[Jun 21, 2023, 2:31:34 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
AvinashC
Newbie



India
Joined: Apr 3, 2024
Post Count: 1
Status: Offline
Reply to this Post  Reply with Quote 
Re: running source code in eclipse

Hi all,
I am trying to run the code from the git repo: https://github.com/SweetHome3D/SweetHome3D

I am currently using the latest version Eclipse and jdk

i am running the code with com.eteks.sweethome3d.SweetHome3DBootstrap as the main class with the arguments
-classpath lib/java3d-1.6:<other_directories_or_jars>
-Djava.library.path=lib/java3d-1.6/macosx
-Djogamp.gluegen.UseTempJarCache=false
as i am using mac

i am getting the following errors
2024-04-03 14:26:14.327 java[1597:45750] WARNING: Secure coding is automatically enabled for restorable state! However, not on all supported macOS versions of this application. Opt-in to secure coding explicitly by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState:.
Exception in thread "main" java.lang.NoClassDefFoundError: javax/media/opengl/GLCapabilitiesChooser
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:375)
at javax.media.j3d.Pipeline$1.run(Pipeline.java:162)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
at javax.media.j3d.Pipeline.createPipeline(Pipeline.java:157)
at javax.media.j3d.MasterControl.loadLibraries(MasterControl.java:965)
at javax.media.j3d.VirtualUniverse.<clinit>(VirtualUniverse.java:299)
at javax.media.j3d.GraphicsConfigTemplate3D.isGraphicsConfigSupported(GraphicsConfigTemplate3D.java:351
)
at com.eteks.sweethome3d.j3d.Component3DManager.createGraphicsConfigurationTemplate3D(Component3DManage
r.java:112)
at com.eteks.sweethome3d.j3d.Component3DManager.<init>(Component3DManager.java:83)
at com.eteks.sweethome3d.j3d.Component3DManager.getInstance(Component3DManager.java:160)
at com.eteks.sweethome3d.SweetHome3D.addComponent3DRenderingErrorObserver(SweetHome3D.java:642)
at com.eteks.sweethome3d.SweetHome3D.init(SweetHome3D.java:467)
at com.eteks.sweethome3d.SweetHome3D.main(SweetHome3D.java:370)
Caused by: java.lang.ClassNotFoundException: javax.media.opengl.GLCapabilitiesChooser
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
... 14 more

Could you please help with this
[Apr 3, 2024, 9:58:18 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 9182
Status: Offline
Reply to this Post  Reply with Quote 
Re: running source code in eclipse

This repository is not official and apparently not maintained. Use the repository at SourceForge.net or a source code archive, and be sure to read the README.TXT included file.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Apr 3, 2024, 3:35:12 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
[ Jump to Last Post ]
Show Printable Version of Thread  Post new Thread

    Get Sweet Home 3D at SourceForge.net. Fast, secure and Free Open Source software downloads
   
© Copyright 2006-2024 eTeks - All rights reserved