I Compiled Sweet Home 3d and when i excecute the jar file its give a Java Exception

This topic has been viewed 17436 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]
chicosRV
Newbie
Posts: 14
Joined: Fri May 25, 2012 4:37 pm

I Compiled Sweet Home 3d and when i excecute the jar file its give a Java Exception

Post by chicosRV »

I Compiled Sweet Home 3d and when i excecute the jar file its give a Java Exception
User avatar
Puybaret
Expert
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: I Compiled Sweet Home 3d and when i excecute the jar file its give a Java Exception

Post by Puybaret »

How did you create the jar file? What exception did you get?
Emmanuel Puybaret, Sweet Home 3D creator
chicosRV
Newbie
Posts: 14
Joined: Fri May 25, 2012 4:37 pm

Re: I Compiled Sweet Home 3d and when i excecute the jar file its give a Java Exception

Post by chicosRV »

I export the proyect as a JAR file with all the files and resources, and put the name of the main class. The proyect is exported but when I try to execute it, it simple says Java Exception
[img]D:\1.png[/img] [img]D:\2.png[/img] [img]D:\3.png[/img]
User avatar
Puybaret
Expert
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: I Compiled Sweet Home 3d and when i excecute the jar file its give a Java Exception

Post by Puybaret »

As the project needs some DLLs, it can't work the way you did.
You should generate a Jar file with the JarExecutable target of the Ant file provided with the project.
Emmanuel Puybaret, Sweet Home 3D creator
chicosRV
Newbie
Posts: 14
Joined: Fri May 25, 2012 4:37 pm

Re: I Compiled Sweet Home 3d and when i excecute the jar file its give a Java Exception

Post by chicosRV »

sorry but could you write me a step by step of how i could do this, i have never done this before
User avatar
Puybaret
Expert
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: I Compiled Sweet Home 3d and when i excecute the jar file its give a Java Exception

Post by Puybaret »

Do you use Eclipse?
Emmanuel Puybaret, Sweet Home 3D creator
User avatar
Puybaret
Expert
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: I Compiled Sweet Home 3d and when i excecute the jar file its give a Java Exception

Post by Puybaret »

- Select build.xml
- In its contextual menu, choose Run as > Ant Build...
- Select the target named JarExecutable
- Click Run
- Once finished, you'll find the Jar executable file in the install subdirectory (refresh its content with F5 if necessary)
Emmanuel Puybaret, Sweet Home 3D creator
chicosRV
Newbie
Posts: 14
Joined: Fri May 25, 2012 4:37 pm

Re: I Compiled Sweet Home 3d and when i excecute the jar file its give a Java Exception

Post by chicosRV »

it give the next error

Buildfile: D:\Sylenia\Grupo RV\Workspace\SweetHome3D-3.7-src\build.xml
build:
[mkdir] Created dir: D:\Sylenia\Grupo RV\Workspace\SweetHome3D-3.7-src\build\classes
[javac] Compiling 2 source files to D:\Sylenia\Grupo RV\Workspace\SweetHome3D-3.7-src\build\classes

BUILD FAILED
D:\Sylenia\Grupo RV\Workspace\SweetHome3D-3.7-src\build.xml:43: Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK.
It is currently set to "C:\Program Files\Java\jre7"
User avatar
Puybaret
Expert
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: I Compiled Sweet Home 3d and when i excecute the jar file its give a Java Exception

Post by Puybaret »

Select a JDK instead of a JRE in the JRE tab of Ant configuration.
Don't forget that Google could help you too....
Emmanuel Puybaret, Sweet Home 3D creator
Post Reply New Topic