tags:

views:

41

answers:

2

I have

c:\sources with

A.java
B.java
com\pluto\B.class
Test.java

and

c:\packages with

com\pluto\oth\C.class

in Test.java there are references to B and C (correctly imported) but when I try to compile with (I'm in c:\sources)

javac -classpath \.;c:\packages Test.java 

the compiler tell me that it doesn't find B

but if I move B.java from c:\sources to another dir and then I compile with

javac -classpath .;c:\packages Test.java 

it does work!!

How must I set the current dir? . or \. and why do the first test fail?

... it seems as the compiler doesn't want to find a class file com/pluto/B.class and a source file with the same name B.java in the current dir where I'm compiling...

+4  A: 

Use . to refer to the current directory. \. refers to the root directory of the current drive (for example C:\).

Joachim Sauer
. or .\ to refer to the current directory
Dave.Sol
A: 
javac -classpath c:\sources;c:\packages Test.java
FractalizeR
it doesn't still work...
xdevel2000
You need to list source files here. Something can be wrong there
FractalizeR