Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/dorkbox/systemTray/util/SystemTrayFixes.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,12 @@ boolean isSwingTrayLoaded(String className) {
try {
ClassLoader cl = ClassLoader.getSystemClassLoader();
// if we are using swing, the classes are already created. We cannot fix things when it's already loaded.
return ClassUtils.isClassLoaded(cl, className) || ClassUtils.isClassLoaded(cl, "java.awt.SystemTray");

try {
return ClassUtils.isClassLoaded(cl, className);
} catch (Throwable e) {
return ClassUtils.isClassLoaded(cl, "java.awt.SystemTray");
}
} catch (Throwable e) {
if (SystemTray.DEBUG) {
logger.debug("Error detecting if the Swing SystemTray is loaded, unexpected error.", e);
Expand Down