LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   how to set current VM? (https://www.linuxquestions.org/questions/linux-software-2/how-to-set-current-vm-221660/)

Moebius 08-24-2004 04:46 AM

how to set current VM?
 
I downloaded Java 1.5 beta from SUN, and they provide instuctions on how to extract the bin files, but not how to set it up for use. OK so I have all these extracted files sitting there, now how do I get my Java apps to run? Do I have to set a JVM whatever that is?

I'm using Gentoo and I tried blackdown 1.4.2 jre and jdk but they aren't working (see big http://bugs.gentoo.org/show_bug.cgi?id=54242)

so I removed those and now I want to use the 1.5 from sun.

Code:

zac@moebius ~ $ azureus
Attempting to start Azureus...
/usr/bin/azureus: line 54: java: command not found
If you recieved an error about a missing java class, you need to setup
your classpath correctly.
This should do the trick (as root):
java-config --add-system-classpath=junit,log4j,commons-cli,systray4j
env-update && source /etc/profile

root@moebius /home/zac # java-config --add-system-classpath=junit,log4j,commons-cli,systray4j
Error reading classpath file [Errno 2] No such file or directory: '/etc/env.d/21java-classpath'

Thanks guys,

Frustrated,
Moebius

stickman 08-24-2004 07:44 AM

It looks like java is not in your PATH. Check the output of "which java" for the directory where your java resides. If you don't find it, use the search function on this site for how to set the PATH to include java. It's a common question.

hw-tph 08-24-2004 07:51 AM

Gentoo provides a Java configuration tool called java-config, and you can install the Sun J2SE SDK easily using Portage/emerge: Copy the bin file you downloaded to /usr/portage/distfiles (it cannot be downloaded automatically for license reasons) and then run emerge sync to update your portage cache. cd to /usr/portage/dev-java/sun-jdk and look what's there. You will most likely see sun-jdk-1.5.0_beta2.ebuild. Emerge it using ACCEPT_KEYWORDS='~x86' emerge
sun-jdk-1.5.0_beta2.ebuild
and let it do its stuff.

When done, use java-config to set the system VM and user VM:
java-config -L to list the available VM's (as installed through portage)
java-config -S sun-jdk-1.5.0-beta (or whatever it's called - refer to the listing in the output of the above command) to set the system VM
java-config -s sun-jdk-1.5.0-beta (this still has to be a valid VM name) to set the user VM

When done, run env-update, followed by source /etc/profile to let the changes take effect.


Håkan


All times are GMT -5. The time now is 06:47 PM.