Page 1 of 1

Linux compile problem

Posted: Thu Nov 19, 2009 7:43 pm
by msknight
If you want to receive support we need this info to help you properly.
» Find Revision
L2J Revision latest:
L2JDP Revision latest:

I've switched from Windows to Linux as my primary client; I now have no Windows machines at home.

... and I have a minor problem.

OS - Kubuntu, 64 bit, 9.10 Karmic Koala.
Installed - svn, ant and java - using...
sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts
... which also seems to have installed sun-java6-bin as well.

On trying to run the ant, however, it is complaining that it can't find the javac compiler. JAVA_HOME is pointing to "/usr/lib/jvm/java-6-openjdk/jre" and there are files in there, but obviously not what I need.

Can anyone help please?

Michelle.

Re: Linux compile problem

Posted: Thu Nov 19, 2009 9:36 pm
by JIV
you cant compile with jre, get jdk

Re: Linux compile problem

Posted: Thu Nov 19, 2009 10:27 pm
by msknight
OK, I installed the JDK with...

sudo apt-get install sun-java6-jdk

... but the ant still fails with the same message.

An LS of /usr/lib/jvm gives...

Code: Select all

root@michelle:/usr/lib/jvm# ls -latotal 120drwxr-xr-x   5 root root  4096 2009-11-19 19:34 .drwxr-xr-x 188 root root 94208 2009-11-19 19:34 ..lrwxrwxrwx   1 root root    14 2009-11-19 19:29 default-java -> java-6-openjdkdrwxr-xr-x   4 root root  4096 2009-11-19 19:29 java-1.5.0-gcj-4.4lrwxrwxrwx   1 root root    14 2009-11-19 19:29 java-1.6.0-openjdk -> java-6-openjdkdrwxr-xr-x   5 root root  4096 2009-11-19 19:29 java-6-openjdk-rw-r--r--   1 root root  2313 2009-11-10 06:41 .java-6-openjdk.jinfolrwxrwxrwx   1 root root    19 2009-11-19 19:34 java-6-sun -> java-6-sun-1.6.0.15drwxr-xr-x   8 root root  4096 2009-11-19 22:18 java-6-sun-1.6.0.15-rw-r--r--   1 root root  2313 2009-08-11 14:40 .java-6-sun.jinfo 
...and the ant fails with...

Code: Select all

BUILD FAILED/home/michelle/Documents/L2J/L2_GameServer/build.xml:76: 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-openjdk/jre" 
THe contents of /usr/lib/jvm/java-6-openjdk/jre is...

Code: Select all

drwxr-xr-x  5 root root   4096 2009-11-19 21:21 .drwxr-xr-x  5 root root   4096 2009-11-19 19:29 ..-rw-r--r--  1 root root   1503 2009-11-10 02:19 ASSEMBLY_EXCEPTIONdrwxr-xr-x  2 root root   4096 2009-11-19 19:29 bindrwxr-xr-x 10 root root   4096 2009-11-19 19:29 libdrwxr-xr-x  4 root root   4096 2009-11-19 19:29 man-rw-r--r--  1 root root    715 2009-11-10 02:19 README.html-rw-r--r--  1 root root 127498 2009-11-10 02:19 THIRD_PARTY_README
...so I don't know what I'm doing wrong.

Re: Linux compile problem

Posted: Thu Nov 19, 2009 10:29 pm
by janiii
hi michelle, point JAVA_HOME to the jdk directory java-6-sun-1.6.0.15. (the jdk directory has to have a bin directory in it).

Re: Linux compile problem

Posted: Fri Nov 20, 2009 6:37 am
by msknight
Superb, Janiii, that did the trick. I did the following...

Code: Select all

$ JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.15$ export JAVA_HOME
...and that did the trick. Many thanks!

Re: Linux compile problem

Posted: Fri Nov 20, 2009 7:08 am
by janiii
nice to see you here around Michelle! :)