# Help needed in building xruby (for java newbie)

**URL:** <https://www.ruby-forum.com/t/help-needed-in-building-xruby-for-java-newbie/107122>\
**Category:** Ruby\
**Created:** [June 18, 2007, 12:37pm UTC](https://www.ruby-forum.com/t/help-needed-in-building-xruby-for-java-newbie/107122 "2007-06-18T12:37:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Axel\_E](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/7c8e57/32.png) [@Axel\_E](https://www.ruby-forum.com/u/Axel_E)\
**Post date:** [June 18, 2007, 12:37pm UTC](https://www.ruby-forum.com/t/help-needed-in-building-xruby-for-java-newbie/107122/1 "2007-06-18T12:37:40Z")

</div>

Dear all,

when trying to build xruby for Linux i586, OpenSuSE 10.2,  
I get the following errors:

dhcppc1:/usr/local/xruby # export JAVA\_HOME=/usr  
dhcppc1:/usr/local/xruby # which javac  
/usr/bin/javac  
dhcppc1:/usr/local/xruby # javac -version  
javac 1.5.0\_10

dhcppc1:/usr/local/xruby # sh build.sh  
Buildfile: build.xml

parser:

treeparser:

compile:  
[javac] Compiling 273 source files to /usr/local/xruby/build

BUILD FAILED  
/usr/local/xruby/build.xml:59: 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

Total time: 0 seconds

How could I tell the build script where to look for javac - if  
this is the real problem here?

Thank you very much,

Best regards

Axel

---

<div class="post-metadata">

**Author:** ![Axel\_E](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/7c8e57/32.png) [@Axel\_E](https://www.ruby-forum.com/u/Axel_E)\
**Post date:** [June 18, 2007, 10:31pm UTC](https://www.ruby-forum.com/t/help-needed-in-building-xruby-for-java-newbie/107122/2 "2007-06-18T22:31:18Z")

</div>

Axel E. wrote:

> /usr/local/xruby/build.xml:59: 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

Hi Axel.

Looks like you need to add the directory containing javac to your PATH.  
In teh example below I did a find to get that, then modified the path.

quicksilver:~ dougal$ sudo find / -name javac  
/usr/bin/javac  
quicksilver:~ dougal$ export PATH=/usr/bin:$PATH

Obviously this example is a little silly, as /usr/bin will always be in  
your path (On OS X anyway), but on your system it may be located  
differently.

In sumary…

1 - Find where javac and friends live.  
2 - Add the directory to your PATH.  
3 - Run your compilation.

Hope this helps.

D.

> **[Douglas F Shearer](https://douglasfshearer.com/)**
>
> Software developer, mountainbiker.

---

<div class="post-metadata">

**Author:** ![Axel\_E](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/7c8e57/32.png) [@Axel\_E](https://www.ruby-forum.com/u/Axel_E)\
**Post date:** [June 19, 2007, 3:19pm UTC](https://www.ruby-forum.com/t/help-needed-in-building-xruby-for-java-newbie/107122/3 "2007-06-19T15:19:49Z")

</div>

Dear Douglas,

thank you for responding.  
I actually verified that javac is on my system, and  
can be found by the system to compile a “Hello-World”  
program in java.  
So I don’t think that the $JAVA\_HOME  
variable is the problem here anymore, but I am a java  
newbie, so I don’t understand what could be wrong otherwise…

Please, Java experts, help me again…

Best regards,

Axel

-------- Original-Nachricht --------  
Datum: Tue, 19 Jun 2007 05:31:29 +0900  
Von: Douglas S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
An: removed\_email\_address@domain.invalid  
Betreff: Re: Help needed in building xruby (for java newbie)
