-
Java Installation--help
Hello, I am using Mandriva 2006 and I just download java from: Here
I need to java working as soon as possible. I have it working but I have to go the bin directory then do the command I need to know how to get the classpath working so that I can run the java from my home folder or other folders. I really appreciate the help. Thank you.
~Linux1245
-
If you're using KDE then;
right click on the desktop
create new --> link to application
Name it as Java (or whatever)
Go to the application tab
enter the location of the application in command (something like /bin/java most likely)
click OK and you should now have a desktop icon
right clicking on Kmenu and selecting menu editor will allow you to add a link from the menu in a similar manner.
-
I tried that but here's what happened in the command line:
Code:
[root@localhost name]# ls
Desktop/ Download/ java* Pictures/ Video/
Documents/ HelloWorld.java Music/ tmp/
[root@localhost name]# ./java
./java: line 1: [Desktop: command not found
./java: line 17: X-DCOP-ServiceType=: command not found
./java: line 18: X-KDE-SubstituteUID=false: command not found
./java: line 19: X-KDE-Username=: command not found
[root@localhost name]#
Am I putting the correct properties in for the application tab? Thanks again.
~Linux1245
-
Where EXACTLY is java located on your system?
From your first post I take entering either of following in the command line will run java
or
Is this correct?
If not what do you enter to run it?
If this is correct then enter /bin/java in the command area on the application tab of the link setup window.
Otherwise enter the full pathname of the application.
It should look something like this;
http://i23.photobucket.com/albums/b3.../linksetup.gif
-
It is located in Code:
/usr/java/jdk1.5.0_06/bin
This is where the java and other commands are located.
So what exactly would I put in? Thanks for all the help
~Linux1245
-
I tried what you said but I still get the same error. Can I try changing classpath or something? I really need to get this working. Thanks so much.
~Linux1245
-
The easiest thing I've found is to add the path to Java's bin directory to my ~/.bashrc.
For example, here's two lines I appended to the end of my .bashrc:
Code:
# Path to java
export PATH=/usr/local/apps/jdk1.5.0_06/bin:$PATH
With this, my shell knows to keep that path in mind, and I can run java apps from anywhere.
-
I just copied the java command to /usr/sbin and the java command works except it comes up with an error:
Code:
[root@localhost name]#java
Error: could not find libjava.so
Error: could not find java 2 Runtime Environment
I tried the command when I was in the bin directory and it worked. I'm guessing it is not working because I am not running it from the bin directory.
-
In the bin directory, the error still comes up but it doesn't if I run ./java instead of just java. If I run ./java from a different directory it says file not found and if I just run java then the error comes up. Any Ideas? Thanks.
~Linux1245
-
Have you tried adding the Java executable to your path?
PATH=$PATH:/path/to/java/binary
;)
Also - in your /etc directory there's a file called environment. As root you could add this line to environment:
export JAVA_HOME=/usr/java/
You might need to log out and in again. Then type env on the command line to see if it got added. I tried this the other week and it worked for me. It kind of assumes a similar java installation to mine, but I think we have the same version.