On 2008-04-26, Ulf Meinhardt <ulf2m@[EMAIL PROTECTED]
> wrote:
> D:\java\output\aaa\bbb\ccc\myclass.class
>
> myclass.java contains the following package information:
>
> package aaa.bbb.ccc;
>
> The current path in the command prompt is
>
> D:\java>
---<CUT
> But when I enter a statement like:
>
> javac -cp D:\java\output\aaa\bbb\ccc;%CLASSPATH% test.java
>
> then the compiler complains that he cannot find myclass:
Try thinking of packages being directories when you're working on the
commandline. You already seem to be doing that since you've setup a
directory
structure aaa\bbb\ccc. Now, in order to find the classes in the package
the
compiler expects to be able and access a directory structure aaa\bbb\ccc
which
then contains myclass.class.
But your classpath doesn't have that, it only points to the directory
where
myclass.class resides but that directory doesn't contain the actual
directory
structure.
Try just compiling without setting any classpath, or, if your classpath
contains specific settings try: javac -cp .;%CLASSPATH test.java
Groetjes, Peter
--
..\\ PGP/GPG key: http://www.catslair.org/pubkey.asc


|