When i compile my programs at tafe, it has no trouble find other classes "the ones i plan to instansinate"
but on my home computer, it can only find the file im working on and can see the other classes even thou they are in the same directory...
can anyone help please?
will compile but can find other classes
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
Okay, I keep seeing your suggestion, MudGuard, to add a . or ;.; or something similar to CLASSPATH, but so far I haven't seen a good description of what CLASSPATH is exactly or how to modify it.
I have the same problem as ravana, in that I can compile all day long, but when it comes time to run a java application, I get the error
Exception in thread "main" java.lang.NoClassDefFoundError: (class name)
So how exactly do I add a . to this mysterious CLASSPATH that everyone's talking about?
I have the same problem as ravana, in that I can compile all day long, but when it comes time to run a java application, I get the error
Exception in thread "main" java.lang.NoClassDefFoundError: (class name)
So how exactly do I add a . to this mysterious CLASSPATH that everyone's talking about?
Okay I finally found directions for this procedure at http://www.textpad.com/support/faq/java.html (the TextPad FAQ, which I had not used yet -- DO'H!).
cannot find .class files in the current directory
So, I have ".;" as the first item in the classpath. I even stuck the full path string into the classpath but I still get:
--------------------
C:\Documents and Settings\jwolff\Application Data\TextPad\RationalSortTester.java:82: class Rational is public, should be declared in a file named Rational.java
public class Rational implements Comparable
^
1 error
Tool completed with exit code 1
--------------------
My classpath is:".;cs2.jar;C:\Program Files\Java\j2re1.4.0\lib\ext\QTJava.zip;D:\share\dwolff;"
the Relational class is indeed in Relational.java, in the same directory as the RelationalTester.java is and compiled correctly not 3 seconds before I get the message included above.
So, what am I doing wrong?
--------------------
C:\Documents and Settings\jwolff\Application Data\TextPad\RationalSortTester.java:82: class Rational is public, should be declared in a file named Rational.java
public class Rational implements Comparable
^
1 error
Tool completed with exit code 1
--------------------
My classpath is:".;cs2.jar;C:\Program Files\Java\j2re1.4.0\lib\ext\QTJava.zip;D:\share\dwolff;"
the Relational class is indeed in Relational.java, in the same directory as the RelationalTester.java is and compiled correctly not 3 seconds before I get the message included above.
So, what am I doing wrong?
Re: cannot find .class files in the current directory
Rational != Relational
You are working too hard. Take a nap. :' )
You are working too hard. Take a nap. :' )