• Post Reply Bookmark Topic Watch Topic
  • New Topic

Setting Paths  RSS feed

 
Azam Bukhari
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. first of all from which command we got to know the path / classpath i.e. set on a Red Hat 9 LINUX machine.

I am confused as there are more then three versions of jdk lying in here i.e jdk 1.3, jdk1.4, jdk.1.5.0,; now how should i know which is th evalid one!!

2. How do we set path for jdk on LINUX

3. Most Important; if I want to add a 3rd party API (jar file) to my class path what shd I do., I mean what step should I take? what I aready had done is that I had added this *.jar file of mine to $ /jdkx.x/jre/lib/ext/ folder . I have to log in with root for doing all this as with my login I don't have enough rights.,

REQUEST: friends pls answer me ASAP in the simplest possible way as you can for my querries!! I am really very new to LINUX !!
 
Stefan Wagner
Ranch Hand
Posts: 1923
Linux Postgres Database Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Fast answers:

1) Path:


1a) which java: (believe it or not)


2) set your path (for java):

# or


2a) set it permanently (and for every shell)
It depends on your shell.
for me, using bash, it's /home/stefan/.bashrc
Insert the 'export....' command there.

3) Difficult to say.
Perhaps this will work:
put your 3rd-party-jars to
/home/azam/lib/ext/foobar.jar
Set your Classpath with .bashrc


(note: if you don't cut'n'paste the code, be carefully! The tilde in the CLASSPATH looks like a minus in my browser with default-size!)
[ September 28, 2004: Message edited by: Stefan Wagner ]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!