Class is public, should be declared in a file
843810Nov 17 2007 — edited Feb 20 2008Hi Guys,
�Class is public, should be declared in a file�. I have absolutely no idea what that error means in my case.
I am using NetBeans to compile my application. One of the jar files has inside a few *.java files. When I compile the app, NetBeans (which is done by ant inside NetBeans ) I get this error �Class X is public, should be declared in a file named x.java�, but the java files are inside the jar file � I don�t want to compile them.
If I remove *.java files from the jar file it compiles OK, but why javac tries to compile *.java files from the jar files that are just on the classpath � that is a mystery.