It's all about the answers!

Ask a question

Problems with build engine and java_home


carlo gneo (9694) | asked May 18 '09, 10:34 a.m.
Hi all, I'm a newbie and I'm trying to start the engine build in an Ubuntu platform.

I follow, step by step this document: https://jazz.net/learn/LearnItem.jsp?href=content/docs/client-tour/using-build.html

When I try to Request Build I have this error:

BUILD FAILED
/opt/IBM/TeamConcertBuild/buildsystem/buildengine/eclipse/fetched/HelloWorld/build.xml:28: 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 "/usr/lib/jvm/java-6-sun-1.6.0.10/jre"

Total time: 0 seconds
Build failed. Exit value was 1.


I try to give the echo $JAVA_HOME and the response is

/usr/lib/jvm/java-6-sun-1.6.0.10/jre/

so I presume that the problem isn't the variable JAVA_HOME.

Has anybody faced similar problem?

thanks very much.

3 answers



permanent link
Sébastien Alonzo (561) | answered May 18 '09, 10:48 a.m.
Hello,

Actually the probem seems to be your JAVA_HOME since it does point to a JRE (Java Runtime Environment) instead of a JDK (Java Development Kit)
Perhaps JAVA_HOME does not point to the JDK.
It is currently set to "/usr/lib/jvm/java-6-sun-1.6.0.10/jre

The difference being that the JRE contains all the classes neede to run a Java application at runtime, whereas the JDK contains additional tools only needed at build time (such as a compiler or generators)

In that case since your build engine is used to compile java code it needs to run with a JDK, not a JRE.
Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.



You need to install a JDK on your server and change the JAVA_HOME variable to reference it instead of the JRE.

Hope that helps,
Sebastien.

permanent link
Ralph Schoon (63.1k33646) | answered May 18 '09, 10:34 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Hello cargne80,

aside from the other response it is possible to copy the JDK's JRA into the
Buildengine\eclipse directory as subdirectory jre.
Don't forget to create also a lib subdirectory and copy the JDK's tools.jar
there.

Ralph

Hi all, I'm a newbie and I'm trying to start the engine build in an
Ubuntu platform.

I follow, step by step this document:
https://jazz.net/learn/LearnItem.jsp?href=content/docs/client-tour/usi
ng-build.html
When I try to Request Build I have this error:

BUILD FAILED
/opt/IBM/TeamConcertBuild/buildsystem/buildengine/eclipse/fetched/Hell
oWorld/build.xml:28:
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
"/usr/lib/jvm/java-6-sun-1.6.0.10/jre"
Total time: 0 seconds
Build failed. Exit value was 1.
I try to give the echo $JAVA_HOME and the response is

/usr/lib/jvm/java-6-sun-1.6.0.10/jre/

so I presume that the problem isn't the variable JAVA_HOME.

Has anybody faced similar problem?

thanks very much.

permanent link
carlo gneo (9694) | answered May 18 '09, 11:15 a.m.
After your suggests the system gives me this response:

BUILD SUCCESSFUL
Total time: 1 second


Thanks a lot salonzo!

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.