View Single Post
Posts: 124 | Thanked: 213 times | Joined on Dec 2009
#29
Next, you'll need to install a link to the main java program, so that when you open an xterm and type "java" it knows what you're talking about.

If you've followed my choice of folder location, the java program is located in /home/opt/java/ejre1.6.0_10/bin/java

Open an xterm and use "sudo gainroot" again.

Then type "ln -s /home/opt/java/ejre1.6.0_10/bin/java /usr/local/bin/java"

This will create a "symlink" (a Symbolic Link....basically a pointer to a file or folder) in /usr/local/bin. You could create it in /usr/bin, but I prefer to keep things separate.

You will also need to alter your /etc/profile file slightly. Open it up (with vi)

vi /etc/profile

...and look at the line beginning with "export PATH="

You need to add ":/usr/local/bin" to the end of the path (inside the quotes).

Now you will be able to download Java SE jarfiles and run them by typing "java -jar somejarfile.jar"

I'm working on registering the ".jar" extension so that you can just dbl-click them to run them....I thought I had it figured out, but it's not working yet.
 

The Following 9 Users Say Thank You to Dak For This Useful Post: