An extremely simple Java GUI program displaying ocean waves.
One can download the executable Java archive (JAR) file with the filename 'waves.jar' and execute the program like so:java -jar waves.jar
Compiling this Java program is as simple as it gets. There is nothing to put on the classpath. Simply navigate to where the 'Waves.java' file is and use the *javac* program like so to compile the program: javac Waves.java
. This will create two class files:
- Waves$1.class
- Waves.class
jar -cfm waves.jar MANIFEST.MF Waves*.class waves2.jpeg
I am using a regular expression with the Waves class files. This command will put anything that starts with Waves and ends with class into the jar. Make sure you only have the two Waves class files shown in the list above in your directory or you will have something you may not want.