LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   I need to know where the Sun Java VM is installed (https://www.linuxquestions.org/questions/ubuntu-63/i-need-to-know-where-the-sun-java-vm-is-installed-900336/)

p3aul 08-30-2011 11:48 PM

I need to know where the Sun Java VM is installed
 
I am trying to use a website that says I need to install their package for linux where the JVM is located. this is the command they gave me to use:

Code:

cp aleksPack10.jar /usr/java/j2re1.4.1/lib/ext/
I suspect this is out of date and besides this is justy a general linux command.
Can anyone help me, please?
Thanks,
Paul

kbp 08-31-2011 12:09 AM

Try 'ls -l $(which java)' to start, then we'll see if you have alternatives in use.

p3aul 08-31-2011 01:08 AM

hmm all I got was a > prompt. I'm in something but I don't know what to do

kbp 08-31-2011 04:20 AM

It means you haven't finished the command line, you probably pasted in the first single quote but you don't need any quotes from my example

knudfl 08-31-2011 04:38 AM

Example reply from the command : ls -l $(which java)
/usr/bin/java -> /etc/alternatives/java*


Which Linux OS are you using ? Is java installed ?

Please also show the output from : java --version

.

p3aul 08-31-2011 05:28 AM

Code:

p3aul@p3aul-Aspire-X3910:~$ ls -l $(which java)
lrwxrwxrwx 1 root root 22 2011-06-26 06:13 /usr/bin/java -> /etc/alternatives/java

OK that's what I got.
I'm using Ubuntu 11.04 Gnome 2 BTW
It appears that java is just a file. When I look at places using Nautilus My partition is named "File System" Clicking on File System I get usr/bin and in there is a blue diamond called java. I assume this is the java file that allows me to see java applets. I can't seem to copy and paste the file aleksPack10.jar to this directory however. I tried as default user and root to no avail.

Here is output from java -version
Code:

java version "1.6.0_22"
OpenJDK Runtime Environment (IcedTea6 1.10.2) (6b22-1.10.2-0ubuntu1~11.04.1)
OpenJDK Server VM (build 20.0-b11, mixed mode)
p3aul@p3aul-Aspire-X3910:/usr/bin$


kbp 08-31-2011 05:49 AM

Ok now try 'alternatives --display java'

SL00b 08-31-2011 09:31 AM

Quote:

Originally Posted by p3aul (Post 4457822)
It appears that java is just a file.

True, but the same can be said about anything in the Linux world. Your disks are "just a file." Your printer is "just a file." Etc.

In this case, the file is the executable program that launches a java runtime environment.

p3aul 08-31-2011 12:29 PM

Code:

p3aul@p3aul-Aspire-X3910:~$ alternatives --display java
No command 'alternatives' found, did you mean:
 Command 'galternatives' from package 'galternatives' (universe)
alternatives: command not found

Thats what I got. Ieven tried -java just in case. same output

knudfl 08-31-2011 03:00 PM

/usr/java/j2re1.4.1/lib/ext/ :
The Ubuntu path is like /usr/lib/jvm/java-6-sun-1.6.0.xx/lib/

sudo apt-get install sun-java6-jdk
http://ubuntuguide.net/install-sun-j...n-ubuntu-11-04


( aleksPack10.jar :
.. the ALEKS plug-in for ... Netscape http://www.aleks.com/downloads/linux_jvm )

..

p3aul 08-31-2011 07:04 PM

knudfl:
Code:

The Ubuntu path is like /usr/lib/jvm/java-6-sun-1.6.0.xx/lib/
Using the above path this what happened:

Code:

root@p3aul-Aspire-X3910:/home/p3aul# cp aleksPack10.jar /usr/lib/jvm/java-6-sun-1.6.0.xx/lib/
cp: cannot create regular file `/usr/lib/jvm/java-6-sun-1.6.0.xx/lib/': No such file or directory

:(

As you can see by the hash mark I am using root.

kbp 08-31-2011 07:25 PM

The 'xx' part was an example that you should replace with the actual version you have. Seeing how the alternatives command isn't working on your machine, try 'ls -l /etc/alternatives/java' - this should give you the location of your current jre.

p3aul 09-01-2011 03:10 PM

OK at Last! using root I was able to copy the ALEKS file to the java directory. Unfortunately, as I was beginning to suspect, It didn't do any good! Trying to access the sitee just freezes Firefox. Apparently, the file is too old and doesn't work with FF 5 or maybe it's Untutu 11.04 it's having a problem with. These online Edus need to have websites that are capable of interacting with all browsers and OS.
Thanks for all your help!
Paul

widget 09-01-2011 05:43 PM

I do not think that you have everything correct. I no longer run Ubuntu but there are people that do and are not having this problem with java in 11.04.

I am running Debian testing and back when it was running the kernel (forget which it is) that you are running I had no trouble with Iceweasel 5 (same as your FF).

Never fooled with java as have no troubles with it so no little about fixing it. I have been watching this thread with interest because I was hoping to learn something. I may have, don't know yet.

Thanks for the thread anyway.

p3aul 09-01-2011 07:40 PM

Everything else has worked with java from the beginning when I first installed Ubuntu. I started with Natty because I had no prior experience with Linux. The only problem was that I didn't know where Java was installed, and not being familiar enough with the OS I didn't know where it was installed, which I needed to know in order to put this rather worthless POC in the same folder. kbp helped tremendously in talking me thru how to find where it was located. So I did learn something. I will leave this thread bookmarked of course so that I can refer back to it if needed. Windows is less obscure(or maybe I'm just more familiar) in how it installs an app. In linux it seems every thing is just thrown together in the same folder, whereas Win is more orderly and groups like components into subfolders under a main folder. Overall, I'm pleased with Ubuntu 11.04 now that I'm running Gnome2, IMO the king of the desktops.


All times are GMT -5. The time now is 04:39 PM.