>
> Steve> With jdk 1.2 installed in /usr/local/java/jdk1.2 what would
> Steve> be the equivalent classpath to use in 1.2 for compilation?
> Steve> For execution?
>
> You need no classpath. Don't even set it to "".
>
I've found in my use of Java 2 (both at Sun and on my machine at home),
that if you have declared packages, and you have a directory structure
set up in your source directories, you still have to use the -classpath
command-line flag to javac. *However* you ONLY need to have the path to
the directory one level up from the beginning of *your* package name.
For example, if you have named your package
"com.anamorphic.MySpiffyClasses" and your build directory sits in
/usr/src/mysources/com/anamorphic/MySpiffyClasses, then your command
line would look like:
javac -classpath /usr/src/mysources SpiffyClass.java
For running, you just jar up all your classes and put that jar file in
<java>/jre/lib/ext and everything works.
--
Jeff Galyan
http://www.anamorphic.com
http://www.sun.com
jeffrey dot galyan at sun dot com
talisman at anamorphic dot com
Sun Certified Java(TM) Programmer
======================================================================
Linus Torvalds on Microsoft and software development:
"... if it's a hobby for me and a job for you, why are you doing such a
shoddy job of it?"
The views expressed herein do not necessarily reflect those of my
employer.
Sun Microsystems, Inc., has no connection to my involvement with the
Mozilla Organization.
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]