This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes class in the default package not found by javac? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "class in the default package not found by javac?" Watch "class in the default package not found by javac?" New topic
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
Sheriff

Joined: Aug 03, 2008
Posts: 9293
    
  17

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: class in the default package not found by javac?