• Post Reply Bookmark Topic Watch Topic
  • New Topic

JDK and Linux?  RSS feed

 
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I use Linux(Red Hat 7.1). How can I setup path for JDK?
Thanks in advance
 
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It all depends which users of the system you want to have the JDK in the PATH. If it's just you, then you can add the path in your .profile file (the equivalent of autoexec.bat for each user when you log in)
For example, if you have installed java at /usr/local/java/jdk1.3.1 then add the following line to the file .profile in your home directory.
PATH=$PATH:/usr/local/java/jdk1.3.1/bin
Don't worry if you can't see this file using "ls", it doesn't show files starting with a "." unless you use "ls -a"
If, on the other hand, you want all users to have it in their path, then you will need to log in as "root" and add the same line to the file /etc/profile
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!