File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes in java with linx(newbie) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "in java with linx(newbie)" Watch "in java with linx(newbie)" New topic

in java with linx(newbie)

sevi satalkar

Joined: Mar 03, 2004
Posts: 7
i have set the all paths in .bash_profile file , as i read that it is
the same as autoexec.bat in windows. but, eventhough i have make it run separately before compilation .
your reply is valuable .

thankx !!!

------- Sevika Satalkar
David O'Meara

Joined: Mar 06, 2001
Posts: 13459

This does not appear to be a Servlet question.
I'll move this to the Java in General (beginner) forum for you.
Gera Jellema

Joined: Mar 08, 2004
Posts: 3
I don't know which linux you use, but this has been helpful for me:
This is the adress and underneath is a piece of the file.

Step 2 - Install Java Files -

Open a shell and login as root

You need to run sh on the bin file you downloaded in order to expand it. If you are downloading SDK version 1.4.2 then the command would be: sh j2sdk-1_4_2_01-linux-i586-rpm.bin

This will bring up another long license screen. Press the space bar a couple of hundred times and you will eventually get to a question along the lines of "Do you agree to the above license terms" to which you type in 'yes' (you already gave up your soul in step 1, so there isn't much to lose). This will cause the script you executed to decompress a .rpm file.

To install the RPM file type in "urpmi X" where X is the rpm filename. In the case of 1.4.2 this was "urpmi j2sdk-1_4_2_01-linux-i586.rpm". This will cause files in the RPM to be installed, somewhere.

Step 3 - Setting Up Your Java Environment -

As your normal non-root identity use your favorite editor to open ~/.bashrc
Add in the following path declaration "PATH=$PATH:X:" where X is the location of the bin directory. In my machine this is "PATH=$PATH:/usr/java/j2sdk1.4.2_01/jre/bin:".

Add in the following JAVA_HOME declaration (this tells Java programs where to find the files they need) "JAVA_HOME=X", this is the same X as before so on my system it is "JAVA_HOME=/usr/java/j2sdk1.4.2_01/jre/bin"

Then add in two export statements

export PATH

export JAVA_HOME

Save the file

You are now ready to run Java programs

Step 4 - Setting up Mozilla -
Based on

Open a root shell

You need to link the Java plugin file into your Mozilla installation. The command is "ln -s Y/plugin/i386/ns610/ Z/plugins/". Where Y is the jre installation directory and Z is the mozilla installation directory. On my machine the command is "ln -s /usr/java/j2sdk1.4.2/jre/plugin/i386/ns610/ /usr/lib/mozilla-1.3.1/plugins/"

NOTE: If you are using Mozilla 1.4 or higher you need to get the .so file from the /ns610-gcc32 directory not the /ns610 directory.

Layne Lund
Ranch Hand

Joined: Dec 06, 2001
Posts: 3061
I apologize, but I don't quite understand your question. I am familiar with using Java under Linux since that is my primary development environment. If you can provide more details about what you have done so far and ask a clear question about what you need help with, I will be more than happy to share my knowledge, however limited it may be. Be sure to post an exact copy of your .bash_profile and/or .bashrc files as well as anything else you think might be helpful for us to understand what your problem.
Good luck!

Java API Documentation
The Java Tutorial
I agree. Here's the link:
subject: in java with linx(newbie)
It's not a secret anymore!