How to use jdk for java programming
I would like to run java program on fedora10,but I am facing some problems .when I use which java command it show usr/bin/java directory.I was trying to set the java_home path in bash_profile,but there is no affect.Tell me how can I solve my problem?
Thanks in Advance
Are you sure /usr/bin/java is a directory and not an executable?
You'd be better off downloading the official Sun JDK for Linux from their website - it's faster than the open JDK.
Anyway...either is fine.
You can add the JAVA_HOME environment variable to /etc/profile (system-wide) - but I doubt you'll need it if you're using the JDK supplied with Fedora 10. Why do you feel you need this environment variable set up?
I use the Sun JDK myself, so my /etc/profile reads as: -
Compile with: - javac -cp .[:<any .jar libraries you want to include] *.java
Run with: - java -cp .[:<any .jar libraries you want to include] <Java program name>
Actually, I generally recommend that you:
1. Uninstall Gnu java
2. Download and install the Sun JDK (which includes compiler, runtime and the NetBeans IDE).
At a minimum, I would *definitely* recommend configuring Java with "alternatives":
I completely agree with arashi256: the Sun JDK is definitely the right choice. For many different reasons...
|All times are GMT -5. The time now is 03:55 AM.|