java on linux
I do have anjuta install on my machine and i had the impression that i could run and compile java programs, but it seems that i was wrong i get an error "javac cannot be found", so i went to http://java.sun.com/j2se/1.4/download.html in order to download the file, i couldnt find it, could someone help me out here... thanks
|
Go to java.sun.com and download jdk 1.5.
|
That site is for the Java development kit. You could install that and I believe it would work, but chances are you only want the runtime environment. You can download that from sun.com. I think Slack has a j2re package now, but I'm not sure -- you might want to check the CDs or a mirror.
|
Quote:
|
what distro are you using and did you install the D series (or developement pakages or whatever they are called on differnt distros?
|
Downloading the jdk from http://blackdown.org is the easiest way to get javac recognized without hassle. Of course there are other methods...
|
thanks guys, i did download and install the package..... i do use the NetBeans 4.1 for develping my projects now.... but i was wondering how could i compile the programs using my shell.... i tried java filename.java but it didnt work.... any help would be appreciated.
Thanks. |
you need to put java in the PATH variable in your path
PATH = /javadirectory/bin:$PATH export PATH |
Quote:
this is what i have done so far: # Set the default system $PATH: PATH="/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/games:/home/admin/jdk1.5.0_05/bin" |
hiya
if you grab the jdk1.5.0_05 self extracting, save the file anywhere on your system, after extraction, the contents will be located in the /usr/java/jdk1.5.0_05/ the javac file you require is located in */usr/java/jdk1.5.0_05/bin* directory, also java is located in the same directory, you need to add both these files to your path, As root edit the /root/.bash_profile and include the path to the javac and java directory, **example** export CATALINA_HOME JAVA_HOME="/usr/java/jdk1.5.0_05" export JAVA_HOME PATH=$PATH:$HOME/bin:/usr/java/jdk1.5.0_05/bin:$PATH export PATH export JAVA_HOME=/usr/java/jdk1.5.0_05 export CLASSPATH=/usr/java/jdk1.5.0_05/lib/tools.jar:/usr/java/jdk1.5.0_05/jre/lib/rt.jar unset USERNAME HTH |
All times are GMT -5. The time now is 04:42 PM. |