LinuxQuestions.org
Review your favorite Linux distribution.
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 12-05-2003, 06:21 AM   #1
tolis
LQ Newbie
 
Registered: May 2003
Posts: 20

Rep: Reputation: 0
Smile Java on linux how to


I am looking for java for linux. I am using redhat 9. I went to the java.sun website to download but i was a little confused. Does anybody know which version to download and how to install it? Thanx! Another question: What is the difference between .rpm and scr.rpm files? How do .src.rpm get installed? As you can see I am new one!..
 
Old 12-05-2003, 06:24 AM   #2
gkoutsog
Member
 
Registered: Sep 2003
Location: Greece
Distribution: RedHat,Mandrake
Posts: 38

Rep: Reputation: 15
Just get rpm package as src.rpms are source code for compiling and building the package.


I do believe the latest edition that you can use is 1.4.2_02
 
Old 12-05-2003, 06:30 AM   #3
Baldrick65
Member
 
Registered: Aug 2003
Location: Dunedin NZ
Distribution: Mint 13 Cinnamon
Posts: 653

Rep: Reputation: 31
Go to this page then to the section titled Download J2SE v 1.4.2_02 and download the RPM self-extracting file and then follow these instructions. That should do it

Baldrick
 
Old 12-05-2003, 07:01 AM   #4
8nasmith
Member
 
Registered: Oct 2003
Location: Cornwall, UK
Distribution: Fedora Core 4
Posts: 268

Rep: Reputation: 30
can you buy this software on CD?
 
Old 12-05-2003, 07:43 AM   #5
hw-tph
Senior Member
 
Registered: Sep 2003
Location: Sweden
Distribution: Debian
Posts: 3,032

Rep: Reputation: 58
(Ripped from my post on knoppix.net a couple of months ago)

Quote:
Sun does not use an open license for Java so it is not included with the official Debian archives, so you can't apt-get install with a stock /etc/sources.list file.

However, the Blackdown project (blackdown.org) provides Java packages for Debian (and many others). These are not very up to date (usually) so I just download the Java SDK (not the JRE!) from Sun and install it.

Here's how you do it:

1. Download the "Linux self-extracting file" package from http://java.sun.com/j2se/1.4.2/download.html

2. Create a directory for Java related stuff under /usr/local:
$ cd /usr/local
$ su (enter password for root, note that the prompt changes when you're root)
# mkdir java
# cd java

3. Then you need to run the file. With this file you can do it like this:
# sh j2sdk-1_4_2_01-linux-i586.bin
....or like this:
# chmod +x j2sdk-1_4_2_01-linux-i586.bin (this makes the file executable)
# /home/hw/downloads/j2sdk-1_4_2_01-linux-i586.bin (execute it - run this from the /usr/local/java directory)

4. Now it's installed. Still, the java and javac commands won't work from the command line because the /bin subdirectory from the SDK isn't in the path. We need to add them somehow. There are many different ways of doing this but this is how I usually do it:
Edit /etc/profile (as root) with your favourite text editor. There should be a line that specifies directories that contain executables and should be added to the PATH environment variable. Something like this:
PATH="/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games"
The directories are separated by colons (":"). Add a colon at the end of the line (but before the closing quote) and add the Java bin directory. If you followed my outline above it should be /usr/local/java/j2sdk1.4.2/bin/.
Now the line looks like this:
PATH="/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/usr/local/java/j2sdk/bin"
Save the file!

Either log out and log in again or do a "source /etc/profile" to let the changes take effect. Type "javac" at the shell prompt and you should see the exact same thing as you see on Windows!

hw
Håkan (a.k.a. hw, a.k.a. hw-tph, etc)
 
  


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
how to get java in linux bruce3au Linux - General 2 10-07-2005 12:23 PM
linux + java alaios Linux - Software 7 07-26-2005 04:27 PM
JAVA:(jwstric2) Problems in JAVA-LINUX nedian123 Programming 1 06-28-2004 04:12 PM
Java for linux Odin_of_Asgard Programming 8 04-12-2004 08:59 PM
Linux and Java + Java Media Framework (JMF) perry Programming 0 11-03-2003 10:08 AM

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

All times are GMT -5. The time now is 04:12 AM.

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