LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-30-2004, 08:37 PM   #1
bond82
LQ Newbie
 
Registered: Aug 2004
Posts: 9

Rep: Reputation: 0
problems installing java


i am trying to install java and it's a .bin file. I'm not sure exactly what that is, but I type in ./j2sdk-1_4_2_05-linux.bin and it says permission denied. I've even tried with root privelage. does anyone have any ideas?? thanks...

i have mandrake 10.0 on P4 2.8 512 200 GB

Last edited by bond82; 08-30-2004 at 08:43 PM.
 
Old 08-30-2004, 08:46 PM   #2
Boby
Member
 
Registered: Feb 2004
Posts: 781

Rep: Reputation: Disabled
Hello!

To install your .bin file do this:

chmod +x j2sdk-1_4_2_05-linux.bin
./j2sdk-1_4_2_05-linux.bin


Boby
 
Old 08-30-2004, 08:48 PM   #3
bond82
LQ Newbie
 
Registered: Aug 2004
Posts: 9

Original Poster
Rep: Reputation: 0
thanks

thanks for the help....what does that stuff mean? I'm just trying to understand and learn the commands in console...thanks..
 
Old 08-30-2004, 08:50 PM   #4
IBall
Senior Member
 
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088

Rep: Reputation: 62
You will need to install it as root. The first thing to do is "chmod +x ./j2sdk-1_4_2_05-linux.bin". The above command changes the permissions of the file, allowing it to be executed. "man chmod" for details

I suggest that you install it in /usr/local/java.

After it is installed, you will need to set the PATH and JAVA_HOME environment variables in you ~/.bash_profile.

Code:
PATH=/usr/local/java/bin
export PATH
and
Code:
JAVA_HOME=/usr/local/java
export JAVA_HOME
If you now type "source ~/.bash_profile", you should be able to run the commands "java", "javac", etc.

I hope this helps
--Ian

Last edited by IBall; 08-30-2004 at 08:52 PM.
 
Old 08-30-2004, 08:51 PM   #5
kesara3k
Member
 
Registered: Jul 2004
Location: Sri Lanka
Distribution: Gentoo Linux 2.6.9-r13
Posts: 57

Rep: Reputation: 15
Before gaining root privileges first change the permissions of the file.
chmod a+x j*.bin
Now try to run it as su!
 
Old 08-30-2004, 08:54 PM   #6
kesara3k
Member
 
Registered: Jul 2004
Location: Sri Lanka
Distribution: Gentoo Linux 2.6.9-r13
Posts: 57

Rep: Reputation: 15
Sorry for repling the same thing when I'm replying I didn't see any replies.
Something to do with my slow Inet connection:-(
 
Old 08-30-2004, 09:04 PM   #7
bond82
LQ Newbie
 
Registered: Aug 2004
Posts: 9

Original Poster
Rep: Reputation: 0
how do you know where you installed it at or how do you control where to install it?? I installed it but it didn't ask for a directory? Thanks for the help
 
Old 08-30-2004, 09:16 PM   #8
bond82
LQ Newbie
 
Registered: Aug 2004
Posts: 9

Original Poster
Rep: Reputation: 0
ok....so i just copied the whole file into /usr/local/java and extracted the java file and then typed in all the commands that you gave me, but when i type "java" or "javac" from the prompt it says "bash: java: command not found" It also gave me an error I think when I typed in "source~/.bash_profile" It came up and said "bash: TMOUT: readonly variable" I really appreciate your help because I am just learning linux and am trying real hard to understand all the commands.
 
Old 08-30-2004, 10:25 PM   #9
Boby
Member
 
Registered: Feb 2004
Posts: 781

Rep: Reputation: Disabled
OK, let's go step-by-step like I did my installation:

su become root
Password: ****** you know it
mkdir /usr/java creates a directory called "java" in /usr
cp /current/path/to/j2sdk-1_4_2_05-linux.bin /usr/java/ copies your j2sdk-1_4_2_05-linux.bin from where it's now to the new created directory /usr/java
chmod +x j2sdk-1_4_2_05-linux.bin give execution rights to the file
./j2sdk-1_4_2_05-linux.bin run the installation. this will create another directory like /usr/java/j2sdk-1_4_2_05 [or something like that]
ln -sf /usr/java/j2sdk-1_4_2_05/bin/java /usr/bin/java makes a symbolic link in /usr/bin to your "java" command
ln -sf /usr/java/j2sdk-1_4_2_05/bin/javac /usr/bin/javac makes a symbolic link in /usr/bin to your "javac" command

Of course you can let the last 2 steps out and use enviroment variables in ~/.bash_profile like IBall suggested.

Hope you can get it now working
Good luck!
Boby
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems installing java 1.3.1_16 UmneyDurak Fedora 3 09-28-2005 07:43 AM
Problems installing Java ursinus Linux - Newbie 21 08-25-2005 10:21 AM
installing java[Problems with azuerus] retry Linux - Newbie 3 04-26-2005 08:13 AM
problems with installing java 5 supersucker Linux - Software 2 12-05-2004 12:32 PM
Problems installing Java Virtual Machine Lord-Rashid Linux - Software 14 04-14-2003 07:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:37 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration