I had created a jar file with three classes using this cmd line:
C:\...\db>jar cvf views.jar Line.java Points.java Shapes.java
I can add the jar file to IDE but I can’t import it to the code.
Another thing is the classes in the jar file are xxx.java, but when looking in another jar file i noticed that the classes are xxx.class
I don’t know if that is the problem or not.
Jar is nothing but archiving (zipping)
You are clearly zipping the
.javafiles to yourjarfile.First Compile your
.javafiles usingjavacthan issue your
jarcommand on the generated.classfilesRefer How to Create Jar