On 20/03/12 12:22, Chris Walker wrote:
I'm trying to install this - http://sourceforge.net/p/necessitas/wiki/How%20to%20install%20Necessitas%20S... but it keeps telling me that I need a java compiler.
I've installed java-1.6.0-openjdk but I'm still getting the same message from Necessitas.
I've tried issuing the urpmi command to install openjdk and it tells me :- No package named openjdk The following packages contain openjdk: java-1.6.0-openjdk, java-1.6.0-openjdk-demo, java-1.6.0-openjdk-devel, java-1.6.0-openjdk-javadoc, ...
Just check with "urpmi java-1.6.0-openjdk" that it is already installed.
Then, it's normally a question of setting up environment variables (although urpmi should have done this).
Some Java processes seem to require JAVA_HOME setting, e.g.
export JAVA_HOME=/usr/java/path_to_jdk
but most just need the path to the Java executables (e.g. javac),
e.g. export PATH=/usr/java/jdk_directory/bin:$PATH (note the /bin on the end of the Java path)
these (or whichever works) can be added to your .bashrc or /etc/bashrc (depending upon the visibility you want). If you change this, then bear in mind that existing shells will *not* inherit it until they're restarted (although I think "source ~/.bashrc" will reload this in an existing shell)
As a real hack, if none of that works, you can create symlinks in /usr/bin to /usr/java/jdk_directory/bin/javac, java, etc. Obviously, that's not ideal when it comes to upgrading.
Simon