: : : : I'm using eclipse and
: : : :
: : : : I have a simple class that simply calls:
: : : : org.jdesktop.jdic.tray.SystemTray s =
: : : : org.jdesktop.jdic.tray.SystemTray.getDefaultSystemTray();
: : : :
: : : : and i get this:
: : : :
: : : : org.jdesktop.jdic.init.JdicInitException:
: : : : java.lang.NullPointerException
: : : : at org.jdesktop.jdic.init.JdicManager.initShareNative(Unknown Source)
: : : : at org.jdesktop.jdic.tray.internal.ServiceManager.<clinit>(Unknown
: : : : Source)
: : : : at org.jdesktop.jdic.tray.SystemTray.<clinit>(Unknown Source)
: : : :
: : : : in the build path i have jdic.jar 0.9.7 , and in my project i've
: : : : included tray.dll
: : : :
: : : : Any ideas? Lots of thanks.
: : : :
: : : :
: : : It appears that the jdesktop was not initialized properly. You need
: : : to first initialize the JdicManager by calling its getManager() and
: : : initShareNative() methods.
: : : Source:
: : :
http://jsourcery.com/api/java.net/jdic/0.9.1/org/jdesktop/jdic/init/J
: : : dicManager.html
: :
: : Hm, I've initialized JdicManager, and I'm getting
: : JdicInitException with same output but
: : when I'm calling initShareNative();
: Have you tried placing the tray.dll in your system path folder (like
: windows folder)?
Good ideea, it works ! Thousands of thanks! :).
I've made a System.out.println(System.getProperty("java.library.path"));
and place the tray.dll under much of the resulting folders.
Thanks again.
Although i still receive an exception
org.jdesktop.jdic.init.JdicInitException: java.lang.NullPointerException
at org.jdesktop.jdic.init.JdicManager.initShareNative(Unknown Source)
at org.jdesktop.jdic.tray.internal.ServiceManager.<clinit>(Unknown Source)
at org.jdesktop.jdic.tray.SystemTray.<clinit>(Unknown Source)
it works for what i need. so it looks like it isn't enough to place the dll file just under current project folder.