The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
September 2000



This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.


Program Compiles but doesn't run What I meant was

Posted by Sean Brown on January 30, 2001 at 8:09 PM

What I meant to say was:
Thanks for your tip. Running the program above helped me find the cause of a problem that I had where I couldn't run programs with packages via the java command line. This was because my command line looked something like:
d:\software\jdk122\bin\javac MyClass -classpath d:\javadev\classes -d d:\javadev\classes\test
instead of
d:\software\jdk122\bin\javac -classpath d:\javadev\classes -d d:\javadev\classes\test MyClass

so the compiler wouldn't know where to find my custom classes in packages.

Stupid mistake but I probably would have spent much more time with it without the trick you posted.

> Hi

> > Hi
> > You can just test whether java runtime is getting the classpath as c:\ or not. If java runtime gets the classpath as c:\ then I don't see any problem in your program. YOu can check it writing a simple program as follows.
> > Thanx
> > Kishori

> > //////////////
> > class Test {
> > public static void main ( String[] args ) {
> > System.out.println ( System.getProperty ("java.class.path" ) ) ;
> > }
> >
> > }


Sponsored Links

Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us