Java

Moderators: zibadian
Number of threads: 7836
Number of posts: 18235

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Hello all! tray problem. Posted by reggiemiller on 14 Aug 2007 at 1:18 AM
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.

Report
Re: Hello all! tray problem. Posted by zibadian on 14 Aug 2007 at 3:42 AM
: 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/JdicManager.html
Report
Re: Hello all! tray problem. Posted by reggiemiller on 14 Aug 2007 at 4:00 AM
: : 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();
Report
Re: Hello all! tray problem. Posted by zibadian on 14 Aug 2007 at 5:02 AM
: : : 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)?
Report
Re: Hello all! tray problem. Posted by reggiemiller on 14 Aug 2007 at 6:13 AM
: : : : 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.
Report
Re: Hello all! tray problem. Posted by reggiemiller on 17 Aug 2007 at 3:07 AM
The following : SystemTray.getDefaultSystemTray(); ends up with 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)

I've tried JdicManager.getManager().initShareNative();
but its the same.
I have tray.dll and jdic.dll in all the directories listed from System.getProperty("java.library.path");
I've tried making a .jar with the dll's : jdic-native.jar and place it in the build path, no use.
If i call: System.load("c:/windows/tray.dll"); it works fine.
Because this call of tray is somewhere in ClassLoader i cannot modify that.
If i call JdicManager.getManager().getBinaryPath(); i receive a " native lib path nullnull "

:) now what ?



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.