There are numerous free java obfuscators available. We recommend
ProGuard. For JTray to work, some classes and methods must not be obfuscated. Below is an example of a proguard obfuscation file you could use with JTray.
-libraryjars <java.home>\lib\rt.jar
-injars myapp_pre.jar
-outjar myapp.jar
# keep all native method names and the names of their classes
-keepclasseswithmembernames class * {
native <methods>;
}
# keep class name JTrayManager
-keepnames class com.jpackages.jtray.JTrayManager
# keep method notifyCallback
-keep class com.jpackages.jtray.JTrayManager {
private void notifyCallback(int, int, int, int);
}