-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

If I remember correctly.. if you do like.. "javac foo1.java" it should 
work only if the CLASSPATH is set (either by default with the JDK's config 
or by the environment). If it doesn't work, then you have something wrong 
in your configuration.. not the JDK.

I have no CLASSPATH set in my environment. The JDK is installed at 
/usr/local/j2sdk1.3.1/ (been there since June).

Make sure you don't have the CWD in any path variable (including PATH and 
CLASSPATH if you have one). The CWD is ./ (the thing you prepend to files 
so they execute from the current working directory). Having this in path 
variables can cause ambiguities as well as cause the JDK not to work.

When you go to run an applet with the java command, you do like:

# java foo2

Remember not to put .class on the end since "java" automatically puts it 
on when searching.

etc etc


On Sat, 24 Nov 2001, John P. Verel wrote:

> I may have not stated the question correctly.
> 
> I have two files, foo1.java and foo2.java
> foo2.java imports foo1.  On my Windows machine, I can simply execute
> javac foo2.java and javac compiles foo1.java and foo2.java.  Same jdk on
> Linux does not.  In neither case do I have a classpath set.  On my
> windows machine, I have a dot at the end of the path search to denote
> the current address.  I had expected the Linux version to automatically
> find foo1.java compile it and import the class file into foo2, but that
> is not happening.
> 
> John
> On 11/24/01, 10:26:19PM -0500, [EMAIL PROTECTED] wrote:
> > On Sat, 24 Nov 2001, John P. Verel wrote:
> > 
> > > Running jdk-1.3.1-fcs.  When I attempt to compile a .java file that
> > > imports a class that is yet uncompiled but whose source file is in the
> > > current directory, I get an error message saying the the class file
> > > cannot be found.  On my W95 machine at work with the same jdk, the
> > > compiler finds and compiles any such uncompiled source.
> > >
> > > I've fiddled with CLASSPATH, PATH, etc. all with no luck.  Any ideas on
> > > this one?
> > 
> > Your classpath must be wrong. From your above description, my bet is you
> > are using ";" in your classpath so it gets cropped before your src tree is
> > included.
> > 
> > If not, then make sure you have the root of your source tree int he
> > classpath. If you are developing com.foo.SnazzyApp.YourClass and you are
> > in
> > 
> > /home/jverel/dev/java/src/com/foo/SnazzyApp
> > 
> > you should compile with
> > 
> > javac -classpath /home/jverel/dev/java/src YourClass.java
> > 
> > 
> > hth
> > charles
> > 
> > 
> > 
> > 
> > _______________________________________________
> > Redhat-list mailing list
> > [EMAIL PROTECTED]
> > https://listman.redhat.com/mailman/listinfo/redhat-list
> 
> 

- -- 
- -Statux
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: pgpenvelope 2.10.2 - http://pgpenvelope.sourceforge.net/

iD8DBQE8AH2DZriHHoi+4toRAr7AAJ9BiOZjXc/KVWRYDPumvvF/AiAgyQCguwYL
jQSEHUJxK55hJd6AJERuewU=
=N/Bp
-----END PGP SIGNATURE-----



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to