Jump to content

how to run Java compiler?


Guest linux_newbie
 Share

Recommended Posts

Guest linux_newbie

hai all

 

i have just installed Java complier J2SE Developer Kit 1.5.0 plus Netbeans 4.0 from java.sun.com. I followed the instructions and installed it. Now I am trying to do a simple Hello world program but I cant seem to execute it. I get the folllowing message,

 

bash:javac command not found

 

I also checked in the /usr/j2sdk-1.5.0/bin directory and command javac exists. do i need to change the path ro set the path like we do in windows ?

 

please let me know

 

thanks...

 

LNB

 

[moved from Software by spinynorman]

Link to comment
Share on other sites

Yes - you do need to add the bin directory of your java install to the path. The easiest way of doing this is to add "export PATH=$PATH:<path to java install>/bin" to your .bashrc

 

Edit: you'll need to log out and back in to see the changes to your path...

Edited by phunni
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...