Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Problems with build engine and java_home

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.

0 votes



3 answers

Permanent link
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.

2 votes


Permanent link
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.

0 votes


Permanent link
After your suggests the system gives me this response:

BUILD SUCCESSFUL
Total time: 1 second


Thanks a lot salonzo!

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: May 18 '09, 10:34 a.m.

Question was seen: 8,575 times

Last updated: Jan 15 '14, 5:56 a.m.

Confirmation Cancel Confirm