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: 5
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 7779 times and has 4 replies Next Thread
Ensoniq
Newbie




Joined: Jan 14, 2010
Post Count: 3
Status: Offline
Reply to this Post  Reply with Quote 
Eclipse/Ant Build "Failed Build"

Hi.
I'm pretty new to this but eager to learn, so I'm hoping this doesn't come of as a stupid Q.
And hopefully someone on here has an answer.

I've been trying to build Sweethome 3D using Eclipse and the Build.xml but have run into some minor issues.

First I get this

-----------------------------------------
..\workspace\SweetHome3D\build.xml:40: 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\jre6"
-------------------------------------------------------------
I added tools.jar from jdk 1.6.0_17 to the Ant runtime classpath and sure enough that worked.(probably the wrong way to go about it)

Then this when building src\com\eteks\sweethome3d\applet\SweetHome3DApplet.java using Ant and the Build.xml
---------------------------------------------------------------
:231: annotations are not supported in -source 1.3
[javac] (use -source 5 or higher to enable annotations)
[javac] @SuppressWarnings("unchecked")
[javac] ^
[javac] 1 error
----------------------------------------------------------------

If anyone can help I'ts greatly appreciated.

Thanks. smile
[Jan 15, 2010, 12:30:56 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: 9426
Status: Offline
Reply to this Post  Reply with Quote 
Re: Eclipse/Ant Build "Failed Build"

Forget about JAVA_HOME.

Here's my way to run Ant in Eclipse:

  • select build.xml file in Sweet Home 3D project
  • choose Run > External Tools > Run As > Ant Build... menu item
  • in Edit Configuration dialog, select JRE tab
  • click on Separate JRE radio button,
  • click on Installed JREs... button,
  • in Preferences (Filtered) dialog, click on Add... button
  • in Add JRE dialog, select Standard VM, click on Next > button,
  • click on Directory... button, and choose the directory of the JDK (not the JRE), probably C:\Program Files\Java\jdk1.6.0_17 under Windows,
  • click on Finish, and click on OK in Preferences dialog,
  • in Edit Configuration dialog, select jdk1.6.0_17 as separate JRE
  • click on Run.

Note that in Targets tab there are many different Ant targets. wink
Don't forget to create keys.keytool file first for javaWebStart, applet and viewer targets (see README.TXT file).
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
[Jan 15, 2010, 8:21:11 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Ensoniq
Newbie




Joined: Jan 14, 2010
Post Count: 3
Status: Offline
Reply to this Post  Reply with Quote 
Re: Eclipse/Ant Build "Failed Build"

Hi and thanks for replying.
I tried your suggestions but nothing seems to make any diffenrence

\SweetHome3D\src\com\eteks\sweethome3d\applet\SweetHome3DApplet.java:231: annotations are not supported in -source 1.3
[javac] (use -source 5 or higher to enable annotations)
[javac] @SuppressWarnings("unchecked")
[javac] ^
[javac] 1 error

Related to this line
encoding="ISO-8859-1" target="1.1" source="1.2"/>

in the Build.xml file and this line:

@SuppressWarnings("unchecked")

in SweetHome3DApplet.java

Any other ideas?

Regards
[Jan 15, 2010, 8:42:27 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: 9426
Status: Offline
Reply to this Post  Reply with Quote 
Re: Eclipse/Ant Build "Failed Build"

Don't be astonished if compilation fails: you must have added @SuppressWarnings("unchecked") annotation in SweetHome3DApplet.java and it's not supported in 1.2 source as reported in error message. Some times warnings are left on purpose...

As written in SweetHome3DApplet javadoc:
The bytecode of this class is Java 1.1 compatible to be able to notify users that it requires Java 5 when it's run under an old JVM.
and again in build.xml:
Compile Sweet Home 3D applets first with javac 1.1 to be able to detect current Java version during applet launch (otherwise Java 1.1 to 1.4 plug-ins refuse to load Applet class)
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
[Jan 15, 2010, 10:37:26 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Ensoniq
Newbie




Joined: Jan 14, 2010
Post Count: 3
Status: Offline
Reply to this Post  Reply with Quote 
Re: Eclipse/Ant Build "Failed Build"

Thanks.

I honelstly have absolutely no idea how I did that but I guess thats the result of too much messing around with the settings when trying to build.

Anyway, I reimported the source code and followed your instructions and... voila...build success.

You have done an impressive job and Im going to enjoy learning this
Thank you again.
[Jan 16, 2010, 11:37:54 AM] 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 2024 Space Mushrooms - All rights reserved