Package not found; javac

Posted by Muneeb on Stack Overflow See other posts from Stack Overflow or by Muneeb
Published on 2010-06-14T23:06:18Z Indexed on 2010/06/14 23:12 UTC
Read the original article Hit count: 213

Filed under:
|

This is annoying.

I have a directory structure like this

-lib
   --some jar files

-packageName
   --Main.java
   --SomeOtherPackage
      --SomeOtherJavaClass.java

Main.java imports SomeOtherPackage. And both java files uses jars in the lib.

What I do is add the jar files independently in the CLASSPATH. And then run as: javac packageName/Main.java

but it gives the error that Package not found SomeOtherPackage . Shouldn't it automatically realize the dependency and build SomeOtherPackage as well? What would be the javac command and the classpath for the above case?

Thanks

© Stack Overflow or respective owner

Related posts about java

Related posts about javac