This content has been marked as final. Show 1 reply
1 person found this helpful
I have added a java file to a jar packageWhy? That's not where they normally live.
When I extracted the jar package swing-layout-1.0.2.jar the added file not found!Extracted it how?
Can someone tell me why?What package?
and I have second question
when I added the java file manually to the package (after extracting)
C:\Program Files\Java\jdk1.5.0_22\bin>javac -classpath "C:\Program Files\Java\jdk1.5.0_22\bin\org\jdesktop\layout"That's the strangest classpath I've ever seen. Problems:
1. Directories under the JDK are the last place you should put your own source code.
2. A classpath is a list of places where classes can be found according to their package structure. If your class is in the package org.desktop.layout, the directory containing org/desktop/layout should be in the classpath, not org/desktop/layout itself.
It's not found on the classpath for the reason(s) above.
NewJFrame.java:35: package org.jdesktop.layout does not exist