• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

class in the default package not found by javac?

 
Yury Ivanov
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9509
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Yury, welcome to javaranch.

You would've found the answer on google like this one...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic