I\'m usually working in Eclipse. In my program, I\'m using this miglayout-4.0-swing.jar file from this source: link.
Somehere in the .jar file is class with MigLayout.
Pretty old question, but for the sake of completeness:
You need both .
(current directory) and miglayout-4.0.jar
to be on your classpath. You have two ways to do so. The easiest is to use -cp
In your case, you'll need to run:
java -cp "path_to_miglayout_jar/miglayout-4.0-swing.jar:." myMain
or if you work on a Windows OS:
java -cp "path_to_miglayout_jar/miglayout-4.0-swing.jar;." myMain
If unsure if you need to use a ;
(colon) or a :
(or whatever the OS is asking for), you can take a look at java.io.File.pathSeparator
which contains the correct separator.
The other way would be to change your CLASSPATH variable.