one more question, related to java/CLASSPATH

Jim Stapleton stapleton.41 at gmail.com
Sat Jul 1 22:37:29 UTC 2006


wow, I feel dumb now. It's been a few years since I've dealt with Java.

Thank you,
-Jim

On 7/1/06, Micah <micahjon at ywave.com> wrote:
> Jim Stapleton wrote:
> > OK, sorry for being a continuous bother on this, but google is
> > failling me, and I cannot find a reason for this issue. Java will not
> > run an app, and everything I've read says that "." should be in the
> > classpath to make it work, so I'm thinking this is a BSD-Java
> > implementation related issue. Any ideas?
> >
> >
> > sjss at elrond 11:54:17 (0) ~/dev/java/test > java -classpath . test.java
> > Exception in thread "main" java.lang.NoClassDefFoundError: test/java
> > sjss at elrond 11:54:27 (0) ~/dev/java/test > java -version
> > java version "1.5.0-p3"
> > Java(TM) 2 Runtime Environment, Standard Edition (build
> > 1.5.0-p3-root_01_jul_2006_07_53)
> > Java HotSpot(TM) Client VM (build 1.5.0-p3-root_01_jul_2006_07_53, mixed
> > mode)
> > sjss at elrond 11:54:43 (0) ~/dev/java/test > ls
> > test.class  test.java
> >
> >
> > I don't know what other info to send. Running 6.1, the specific port
> > was ports/java/jdk15
> >
> >
> > Thanks,
> > -Jim
>
> Java expects the name of a class, not the name of a file. You should
> invoke your test using "java test"
> The command "java test.java" is trying to execute a class named "java"
> in the "test" package.
>
> FWIW my classpath is:
> ./:/usr/local/share/java/classes/junit.jar:/usr/local/freetts/lib/
>
> HTH,
> Micah
>


More information about the freebsd-questions mailing list