Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What is classpath?

Status
Not open for further replies.

porkymin

Programmer
Dec 26, 2004
16
0
0
SG
Hi all,

I am a beginner in Java, but i am currently working on project on J2EE, stuffs like EJB, MDB, etc.
How can i help myself to learn concepts in Java fast so that i can work on J2EE? I don't even know what is a classpath, how do we set it and how application reads and interpret from it. On top of that, I would also like to find out how do we write build.xml file and compile.csh, can anyone kindly guide me?

Any kind help is greatly appreciated.
 
You are writing EJB, yet have no idea what a CLASSPATH is ?
How did you manage to get that job ? You must be living in fear !

--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
The classpath is a list of locations, where the JVM will search for classes (jars and directories).

You may set it in your ~/.profile.

Applications will search it themselves and not interpret.

You write a build.xml with your favorite editor. Details are found in an ant-howto.

I don't know anything about compile.csh. :)



seeking a job as java-programmer in Berlin:
 
Thanks to all for the advice.
Just to understand what is it meant by Application will search it themselves and not interpret them? It refers to classes in jars as declared in classpath?
 
It refers to classes in jars and directories, as declared in the classpath.

If the classpath is
CLASSPATH=/mnt/foolib:/foo/foo.jar

Classes are searched in /mnt/foolib and in /foo/foo.jar.

If the classname is foobar.Bar (foobar beeing the packagename) a directory foobar is expected in /mnt/foolib or in /foo/foo.jar and the Bar.class is expected in that directory.
You may have more and longer class/package-names, and a longer classpath - but that's it.

seeking a job as java-programmer in Berlin:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top