| Author |
class in the default package not found by javac?
|
Yury Ivanov
Greenhorn
Joined: Jan 23, 2010
Posts: 1
|
|
Hi All,
I have the source directory structure like this:
+
|---Used.java
|
\---test--+- Test.java
Test.java:
Used.java:
The current diractory is where Used.java sits.
When I invoke
javac Used.java test\Test.java
(regardless of whether I include "-classpath . " or not)
I get the compiler error:
test\Test.java:4: cannot find symbol
symbol : class Used
location: class test.Test
new Used();
^
1 error
However Used.class is compiled successfully!
Why could be this? Thanks for any help!
|
 |
Ankit Garg
Saloon Keeper
Joined: Aug 03, 2008
Posts: 9189
|
|
Hi Yury, welcome to javaranch.
You would've found the answer on google like this one...
|
SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
|
 |
 |
|
|
subject: class in the default package not found by javac?
|
|
|