Results 1 to 10 of 15
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 ...
- 02-28-2006 #1Just Joined!
- Join Date
- Jan 2006
- Posts
- 55
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 commandI 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.Code:./java (file)
~Linux1245
- 02-28-2006 #2Linux User
- Join Date
- Jan 2006
- Posts
- 414
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.
- 02-28-2006 #3Just Joined!
- Join Date
- Jan 2006
- Posts
- 55
I tried that but here's what happened in the command line:
Am I putting the correct properties in for the application tab? Thanks again.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]#
~Linux1245
- 02-28-2006 #4Linux User
- Join Date
- Jan 2006
- Posts
- 414
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
orCode:/bin/java
Is this correct?Code:cd /bin/ ./java
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;
- 02-28-2006 #5Just Joined!
- Join Date
- Jan 2006
- Posts
- 55
It is located in
This is where the java and other commands are located.Code:/usr/java/jdk1.5.0_06/bin
So what exactly would I put in? Thanks for all the help
~Linux1245
- 02-28-2006 #6Just Joined!
- Join Date
- Jan 2006
- Posts
- 55
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
- 02-28-2006 #7
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:
With this, my shell knows to keep that path in mind, and I can run java apps from anywhere.Code:# Path to java export PATH=/usr/local/apps/jdk1.5.0_06/bin:$PATH
Stand up and be counted as a Linux user!
- 02-28-2006 #8Just Joined!
- Join Date
- Jan 2006
- Posts
- 55
I just copied the java command to /usr/sbin and the java command works except it comes up with an error:
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.Code:[root@localhost name]#java Error: could not find libjava.so Error: could not find java 2 Runtime Environment
- 02-28-2006 #9Just Joined!
- Join Date
- Jan 2006
- Posts
- 55
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
- 02-28-2006 #10
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.I am always doing that which I can not do, in order that I may learn how to do it. - Pablo Picasso


Reply With Quote
