LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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-13-2006, 01:16 AM   #1
isra_mv
Member
 
Registered: Apr 2006
Location: Mexico
Posts: 55

Rep: Reputation: 15
How can I install jdk 1.5 in Mandriva 2006?


My problem is with the PATH, I don't know where and how to create it.
But please, don't give me links to other threads. I'm new in Linux (and when I say new, I mean NEW), and every guide, questions and answers that I found about it in this site, I just cannot understand anything. So please, give me all the details you can.
Thank you.
 
Old 08-13-2006, 05:46 AM   #2
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,215

Rep: Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849
Let me see if I can help you out. First of all there Sun provides two types of files for installation. One has .bin as the last three letters of the install package, the second has .rpm as the last three letters of the download package.

Which one are you trying to install? Please post the exact name of the file.

It is a little difficult to understand what you mean by PATH. If you are asking 'where should I install the package' the usual location I have seen is /usr/java/jre1.2.3.4 ( where the 1.2.3.4 are the version number of the package ).

There is also a PATH variable used by bash ( the command window ) to look through when you type a command. There is a default set up on most systems. You can edit files to change it if you wish.

If this is confusing, sorry, I'm not trying to confuse you.

Let me know on the package name, and we can go from there.
 
Old 08-13-2006, 12:26 PM   #3
isra_mv
Member
 
Registered: Apr 2006
Location: Mexico
Posts: 55

Original Poster
Rep: Reputation: 15
It is the bin package.
jdk-1_5_0_08-linux-i586.bin
And my problem is with the PATH variable, I don't know what to do.
By the way, the package was installed in my desktop, and I moved it to /usr/java. is it ok or I'll have problems?
 
Old 08-13-2006, 06:44 PM   #4
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,215

Rep: Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849
The file is fine where you put it. Sun posts the install instrucctions on their web site. I have just followed those instructions and had it working in a matter of minutes.

Now that you have copied the file to /usr/java open a Konsole and do a 'su' ( without the quotes ). The system will ask for the root password. Enter it. Your prompt will change to a # symbol.

Change the permission of the file you downloaded to be executable. Type: chmod a+x jkd-1_5_0_08-linux-i586.bin

That will make the file executable. You can verify that by doing a
ls -l. The file should be executable.

Start the installation by typing:

./jdk-1_5_0_08-linux-i586.bin

Be sure you are in the directory /usr/java where the file is for the previous step. The installation process will run. Follow any prompts on the screen. You probably will have to agree to a licience, do so when requested.

The rest should proceed without any intervention on your part. A sub-directory should be created; /usr/java/jdk-1_5_0_08, you can look after the install to see the files and directories.

I have had to 'enable' the installation after the install. Let me know when you get to this point, or if you have any more questions.
 
Old 08-13-2006, 08:28 PM   #5
isra_mv
Member
 
Registered: Apr 2006
Location: Mexico
Posts: 55

Original Poster
Rep: Reputation: 15
Ok, I installed it. And here is where I don't know what's next.
The instructions I found in Sun's website were just for the extraction of the package, but just that.
And what do you mean with "to 'enable' the installation after the install"?
 
Old 08-14-2006, 08:18 AM   #6
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,215

Rep: Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849
I was wondering just why you were installing the JDK Java Development Kit. It is for developing Java apps. If you want to java apps to run, say through your browser, ( most common use) you don't need JDK. You can install Java Run Time instead. The enabling part has to do with web browsers. Browsers don't know where your java installation is. Enabling places a couple of files in the browser code, so when you go to a site with java on it, the browser finds java, and executes the java app.

Would you post the link where you got the JDK code from? I had a look but couldn't find that version. Last time I install a JDK i was running OS/2. I've been using JRE ( Java Runtime Environment ) ever since.

Note, here is an example of 'registering' the java install. If you send me the ink for the version you have, there are probably exact instructions for your version.

http://java.sun.com/j2se/1.5.0/manua...all_linux.html

Basisally, you need to make a 'symlink' to the java installation. I doesn't matter where on your system you install java. The symlink looks after finding it.

Last edited by camorri; 08-14-2006 at 08:30 AM.
 
Old 08-14-2006, 05:25 PM   #7
isra_mv
Member
 
Registered: Apr 2006
Location: Mexico
Posts: 55

Original Poster
Rep: Reputation: 15
That's right, I use JDK for developing Java apps, not only for running applications and applets. But the commands java, javac, appletviewer, etc. I need to write the complete path to use them, for example:
$ /usr/java/jdk1.5.0_08/bin/javac HelloWorld.java

If you mean the site where I found JDK1.5, is this http://java.sun.com/javase/downloads/index.jsp I downloaded JDK 5.0 Update 8, and there is the Installation Instructions (for 32-bit Linux).

Something I realized is that in Windows, when you install the JDK, it also installs the JRE in another folder, but in Linux it only installs the JDK folder, or should I download both DK and RE?
 
Old 08-14-2006, 05:44 PM   #8
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
Quote:
Something I realized is that in Windows, when you install the JDK, it also installs the JRE in another folder, but in Linux it only installs the JDK folder, or should I download both DK and RE?
When you install the jdk, jre is also installed. On my system, jdk is in /opt/java and jre in /opt/java/jre. The reason why you need to enter the entire commands is because you did not put java in your path. You can do it for all users on your system by writing this script,
Code:
export JAVA_HOME=/usr/java/jdk1.5.0_08
export MANPATH=$MANPATH:/usr/java/jdk1.5.0_08/man
export PATH=$PATH:/usr/java/jdk1.5.0_08/bin:/usr/java/jdk1.5.0_08/jre/bin
You need to save that script in /etc/profile.d and name it something like sunjdk.sh. Make sure you make the script executable e.g. chmod +x /etc/profile.d/sunjdk.sh. After that logout and back in again, then java should be in your path.
 
Old 08-14-2006, 06:40 PM   #9
isra_mv
Member
 
Registered: Apr 2006
Location: Mexico
Posts: 55

Original Poster
Rep: Reputation: 15
Oh, God! Finally! It's alive! It's alive!!!!

That thing of the path is what I was looking for, but I found 2 or 3 different ways, and nothing worked.

Thank you, Camorri and Reddazz. I O U 1.
 
Old 08-14-2006, 07:04 PM   #10
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,215

Rep: Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849
Glad you got it going.
 
  


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
Very Slow Mandriva 2006 Install asdapp Mandriva 11 06-02-2006 07:42 PM
how to install azureus in mandriva 2006 stefan1988 Linux - Newbie 18 05-11-2006 10:24 AM
Mandriva 2006 won't install Kwestion Mandriva 4 04-05-2006 01:52 PM
mandriva 2006 install on hp fails dickgregory Mandriva 5 02-28-2006 06:17 PM
Help to Install Mandriva 2006 Gins Linux - General 3 11-22-2005 04:19 AM

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

All times are GMT -5. The time now is 03:03 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