This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Linux / UNIX and the fly likes jdk on linux 8.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "jdk on linux 8.0" Watch "jdk on linux 8.0" New topic
Author

jdk on linux 8.0

Dominikk Tschirky
Greenhorn

Joined: Feb 06, 2003
Posts: 4
how do I install the j2sdk1.4.1. on Linux.
Got Linux Red Hat 8.0; or where do I install it? Install: Download it to a directory, and write a Path?
Where?
Can someone send me an answer?
mfg
Dominikk Tschirky
Hari Gangadharan
Ranch Hand

Joined: Mar 08, 2001
Posts: 73
You should first download the Java SDK from the Sun Java site. If you have Red Hat Linux, the best way to do this is to download the self-extracting rpm file. After downloading the self-extracting rpm file (named as *rpm.bin) you should execute it to get the .rpm file. Now do a:

It is also a good idea to uninstall the old versions of Java SDK before installing the JSDK 1.4. To do that use 'rpm -q' option to look for java or jsdk. Also look in rpm man pages (man rpm) to find out how to uninstall the old package.
[ February 06, 2003: Message edited by: Hari Gangadharan ]

<B>Hari Gangadharan</B><BR>Unix is user friendly..<BR>but it chooses to whom it is friendly with!
Dominikk Tschirky
Greenhorn

Joined: Feb 06, 2003
Posts: 4
Hallo, but with this code, where do I have to put it?
mfg
D.Tschirky
Dominikk Tschirky
Greenhorn

Joined: Feb 06, 2003
Posts: 4
Here's what I did: Download selfextracting rpm-J2sdk1.4.1 for linux from the java.sun-Homepage.
(By the way, what's the meaning of "rpm"?)
I downloaded it to my home and I clicked on the .bin-icon.
Here's my question:
Do I have to use Emacs-Editor to write?
Do I need to save the java-files in my home too?
Where do I compile the files?
Very thankful for an answer, mfg,
D.Tschirky
Hari Gangadharan
Ranch Hand

Joined: Mar 08, 2001
Posts: 73
Hi -
RPM stands for Red Hat Package Manager. If you double click the .bin icon then it will inflate and create another .rpm file. You have to install that running rpm -ivh filename. I do not know whether double clicking the .rpm works.
Now you can create a java source code anywhere you like. The best place may be a sub directory under your home. If your class name is MyClass then you may have to create it in MyClass.java file. You can create the source using any plain text editor - Emacs, Vi, Jedit, Jext.. or even some IDEs like Eclipse ( http://www.eclipse.org ) or JBuilder ( http://www.borland.com ). I would advise you to use some simple text editors until you are familiar with all the aspects of Java. Once you are confident, you can switch to an IDE. An IDE can reduce the typing you need to do.
Now using java thru terminal you need to compile your java program:

cd ~
(This will take you to your home directory)
cd javasrc
(this is where you created the Java code)
now do
javac MyClass.java
(a file MyClass.class will be created)
now do
java Myclass
Hope this helps.
[ February 11, 2003: Message edited by: Hari Gangadharan ]
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16022
    
  20

BTW, the RPM places the jdk in /usr/java.


Customer surveys are for companies who didn't pay proper attention to begin with.
Domi Tschirkz
Greenhorn

Joined: Mar 07, 2003
Posts: 1
Hello,
I'm very glad to get this message, just one more question:
how to I install the "rpm-jdk-package" after downloaded it from Sun?
the HelloWorld is written: just there is no "javasrc"-command. It's not getting compiled. No "javac xxx.java"-command.
mfgg
Dominik
 
Don't get me started about those stupid light bulbs.
 
subject: jdk on linux 8.0