All right, so my debian install has placed sun java etc in non-standard places, how do I set the path ?
I set
but there a bunch of files (eg junit.jar) in /usr/share/java -- how do I include them so that java apps can find them ?Code:export JAVA_HOME=/usr/lib/jvm/java-6-sun export PATH=/home/wearetheborg/bin:$JAVA_HOME/bin:$PATH
-
wearetheborg Notebook Virtuoso
-
I've moved this thread to the Linux forum since you will most likely get more help there.
-
I think what you're looking for is the CLASSPATH variable.
-
Hi, i written something about java installation in this post here on forums:
http://forum.notebookreview.com/showthread.php?t=355974&highlight=java+64bit
You can have more versions of jre on your box and switch between them by alternatives command.
The PATH variable just says which folders should be searched for runnable binaries and scripts. If you need these paths you wrote up in your post available for all users, paste it in the /etc/profile file, if only for one user (you) paste it in the ~/.bash_profile (you can setup any variable and propagate it to system this way).
I don't think the /usr/share/java folder will help you by adding it to PATH, but you can try. Just add this folder to your second row you posted in your post.
gl&hf
-
wearetheborg Notebook Virtuoso
I think archer7 is right. The JAVA_HOME variable selcts the correct jre, but the problem is with the misc jar files which contain diff packages.
BTW debian does not have the alternatives command ... -
Well hope, you're gonna solve it, i'd have to 'see' problem myself, this i'm a bit 'shootin at stars' :.)
btw.
I just had look on uncle google, so how about command 'update-alternatives'? Just saw something like that with Debian mentioned, maybe i'm not right, i dont use debian or its derivated distros, ehh
-
wearetheborg Notebook Virtuoso
Thanks ! that seems to work to use the correct version of java and I will use it in the future to install suns-java versions.
Currently I've using sun-java by modifying JAVA_HOME.
The links you cited mentioned that CLASSPATH may still needed to be tinkered with to get the jar files on javas search path. -
If you have classes in jar which need to be loaded onto the classpath, then you either set the CLASSPATH to point to the jar file or use the -cp option.
How to set java path in linux?
Discussion in 'Linux Compatibility and Software' started by wearetheborg, Jul 17, 2009.