MacJava! Tutorial Commands
==========================
If you don't like reading instructions, run through the whole tutorial
by just pasting the commands below into the terminal.
Notes:
1) Be sure you have the latest version of openjdk installed:
brew install openjdk
2) When the "ShowTime" application is launched, quit the application
to continue on with the remaining commands.
3) For details visit: https://centerkey.com/mac/java
Copy-and-paste commands
-----------------------
echo">>> Start"java--versionmkdir showtime
cd showtime
curl --remote-name https://centerkey.com/mac/java/ShowTime.java
cat ShowTime.java
javac --version
javac ShowTime.java
ls-oecho"Main-Class: ShowTime"> MainClass.txt
cat MainClass.txt
jar --version
jar cmfv MainClass.txt ShowTime.jar *.class
ls-oecho"Click the red button (marble) to exit the program."java-jar ShowTime.jar
curl --remote-name https://centerkey.com/mac/java/ShowTime.png
sips --version
sips --resampleHeightWidth120120--padToHeightWidth175175\
ShowTime.png --out ShowTime-background.png
cp-v ShowTime-background.png ShowTime-background-darkAqua.png
mkdir ShowTime.iconset
sips --resampleHeightWidth128128\
ShowTime.png --out ShowTime.iconset/icon_128x128.png
iconutil --convert icns ShowTime.iconset
ls-omkdir-p package/macos
cp-v *.png *.icns package/macos
jpackage --versionecho"Packaging..."
jpackage --name ShowTime --input. --main-jar ShowTime.jar \
--resource-dir package/macos --type pkg
echo"Installer file:"ls-o *.pkg
open ShowTime-1.0.pkg
echo">>> Done"
-----------------------