Why not jar file contains both class and java file.

jdk's tools.jar file contains both class and and java.
when copile,error reports:

Information: 4 errors
Information: 61 warnings
Error: line (18) class Main is public, should be declared in a file named Main.java
D:\jdk\j2sdk1.3.1_01\lib\tools.jar(sun/tools/javac/Main.java):18: class Main is public, should be declared in a file named Main.java
(source unavailable)




Please sign in to leave a comment.