Shows an icon in the tray on Windows to display the Internet connection. Internet connection is done by sending a ping to some server (www.google.com or other) every second.
-
Improve/edit the source code (
.java
file). -
Compile all the classes of the code :
javac TrayIconDemo.java JLogFrame.java
. This will generate the class files (the ones with $ need to be included too) -
Create the jar, containing all compiled classes (
.class
files), images, the manifest :
jar -cfmv0 out/app.jar META-INF/MANIFEST.MF TrayIconDemo.class JLogFrame.class images
Links to understand the command above :
- https://docs.oracle.com/javase/tutorial/deployment/jar/build.html
- https://docs.oracle.com/javase/tutorial/deployment/jar/appman.html
When internet connection active (while ping received) :
When no internet connection (no ping from server) :