Hi,
Quote:
Originally posted by WiWa
[B]Hi,
I'm trying to install Java on Linux Suse 9.1. I've found the following:
--------------------------------------------------------------------------------------------
Set the PATH and JAVA_HOME environment variables: (/etc/profile, $HOME/.bashrc or $HOME/.bash_profile).
PATH=$PATH:/usr/java/j2sdk1.4.2_04/bin
JAVA_HOME=/usr/java/j2skd1.4.2_04
export PATH
|
This is better, put it in your .bash_profile:
JAVA_HOME=/usr/java/j2skd1.4.2_04
PATH=$PATH:$JAVA_HOME/bin
export PATH JAVA_HOME
then do:
$ . .bash_profile
to get the shell to reread the file.
Quote:
A reference to the current directory will probably need to be added to your CLASSPATH. Add ":." to the end of your CLASSPATH. Relog into your shell.
|
In most cases, you shouldn't need to worry about CLASSPATH. It will find the standard libraries relative to the java executable, and if it's not set at all, it should find the class files in your current directrory no problem.
Quote:
Now you should be able to access java like this:
# java -version
--------------------------------------------------------------------------------------------
1) Do I have to modify all 3 files (/etc/profile, .bashrc and .bash_profile?
|
If you have more than one user, or if you want root to be able to run java as well as your regular user, then you could put it into /etc/profile. Otherwise, if it's just you, put it in .bash_profile.
Quote:
2) Can I just start editing the /etc/profile and add what they wrote there?
|
Only if you're root.
Quote:
3) How do I change the CLASSPATH in Linux?
|
Normally you shouldn't need to create this variable, but if you have to, you'd do it the same way you created JAVA_HOME, by putting it into .bash_profile or /etc/profile (for all users.)
Quote:
4) I do not have a $HOME/.bash_profile. Do I need to create it manually
|
I'd be very surprised if you don't have it. Most if not all Linux distos use bash by default.
File names starting with . are normally hidden. If you open a console and do
$ ls -a
you should see it. Also, you should be able to just edit it:
$ pico .bash_profile
[/QUOTE]
Quote:
I'm looking for a real good and nice Java IDE for Linux.Any suggestions?
|
Personally I use NetBeans, because right now I'm doing a lot of Servlet/JSP work, and it's very nice for that - has tools to run and debug servlets, as well as package up everything for deployment. Other people really like Eclipse. Those are both free. If you want to spend money, I've heard that IntelliJ IDEA is excellent.
Good luck!