File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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: 9313
    
  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?