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 09-21-2002, 12:48 PM   #1
OrganicX
Member
 
Registered: Aug 2002
Posts: 105

Rep: Reputation: 15
Red Hat 7.3 Java question


Im very new to both Linux and java. Redhat 7.3 comes with two executables called j2re-1_3_1_03-linux-i386-rpm.bin
and j2sdk-1_3_1_03-linux-i386-rpm.bin

can one of you tell me where to write and run and view the results of a simple java program? whats the procedure? do I have to run both executables and write a program in that directory? Im confused can someone help?

I have no problem with doing c programs from the consol in Linux, but java is different.
 
Old 09-21-2002, 01:04 PM   #2
stickman
Senior Member
 
Registered: Sep 2002
Location: Nashville, TN
Posts: 1,552

Rep: Reputation: 53
You might try the tutorials over at java.sun.com. You might even consider the O'Reilly book on Java.
 
Old 09-21-2002, 01:06 PM   #3
neo77777
LQ Addict
 
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Rep: Reputation: 56
ok, first thing first, if you want to develop java programs (I see that you do), then you need to install j2sdk (the version you have a bit outdated, but it is ok, if you are just a beginer to Java). Open up an Xterm (Gnome Term, Konsole, etc)
Now run the .bin file (but before you do make sure it has executable bit set)
chmod 755 /path/to/j2sdk-1_3_1_03-linux-i386-rpm.bin
/path/to/j2sdk-1_3_1_03-linux-i386-rpm.bin
it will unpack java into a folder in your current dfirectory, after it is done you can move it to /usr/local for instance
mv j2sdk-1.3.1_03/ /usr/local/java
For this to work you need to be root or you must have enough priveleges to write into /usr/local
now you should setup your path to java executable
export PATH=$PATH:/usr/local/java/bin
to make the PATH permanent you need to include the following line into /etc/profile (if you want all the accounts to have PATH pointed to java) just insert
PATH=$PATH:/usr/local/java/bin
before the
export PATH OTHER_ENV_VARS
statement
and as a regular user run
. /etc/profile
It's dot followed by space followed by /etc/profile
so now when you as a regular user issue
java -version
it should return the version of java and VM.
have fun coding Java.

Last edited by neo77777; 09-21-2002 at 01:07 PM.
 
Old 09-21-2002, 01:56 PM   #4
OrganicX
Member
 
Registered: Aug 2002
Posts: 105

Original Poster
Rep: Reputation: 15
THANK YOU!!
 
  


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
Java DnD on red hat ivanino Programming 0 10-25-2004 02:20 PM
java come with Red Hat 8? naijaguy Programming 1 08-12-2004 10:59 AM
Red Hat 9 to Red Hat EL Mozilla Migration Question rharvey@cox Linux - Software 2 01-13-2004 06:43 PM
Java and Red Hat Selos Linux - Newbie 2 08-27-2003 08:24 PM
Red Hat 7.1, C, C++, Java mikeshn Linux - Newbie 2 02-19-2002 05:13 PM

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

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