Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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?
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.
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"?
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.
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.
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?
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,
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.