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. |
You might try the tutorials over at java.sun.com. You might even consider the O'Reilly book on Java.
|
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. |
THANK YOU!!
|
All times are GMT -5. The time now is 05:58 PM. |