Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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.
Originally posted by btmiller 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.
Didn't you read the OP's post? He/she wants to compile programs, and was complaining that "javac" doesn't work. I don't think your link is to the right place , and actually java.sun.com is precisely the site to download both the development kit and the runtime environment (download page here). You want to go to "JDK 5.0 Update xx", accept the license agreement, get the "Linux self-extracting file", then run it. Search for "Java" in the forums for more information.
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.
Originally posted by mrcheeks you need to put java in the PATH variable in your path
PATH = /javadirectory/bin:$PATH
export PATH
this is the path but i wasnt sure how to do it, i do know that i have to edit the /etc/profile but i didnt want to mess with it... never done it before... could you explain a bit more please. thanks
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"
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,
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.