Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / First Aid / July 2006

Tip: Looking for answers? Try searching our database.

javaws using a dll

Thread view: 
trpost@gmail.com - 25 Jul 2006 22:26 GMT
I have a small java application that reads the registry through the use
of a .dll. I am packaging this app in a jar and then deploying it via
java web start. When I run things locally, I have no problems, but when
I deploy it through javaws, I get errors about accessing methods within
the .dll. Is there any trick to creating a jar with the dll for
deployment via javaws.

Thanks
Thomas Fritsch - 26 Jul 2006 18:45 GMT
> I have a small java application that reads the registry through the use
> of a .dll.  I am packaging this app in a jar and then deploying it via
> java web start. When I run things locally, I have no problems, but when
> I deploy it through javaws, I get errors about accessing methods within
> the .dll. Is there any trick to creating a jar with the dll for
> deployment via javaws.
Are you talking about
(1) a .dll deployed together with your java app like described in
http://java.sun.com/j2se/1.4.2/docs/guide/jws/developersguide/syntax.html#resources
or
(2) a .dll already existing in the windows systems directories ?

If (1): JavaWebStart requires your application to be signed by a
certificate, otherwise it won't work.
If (2): I don't know

Signature

Thomas

trpost@gmail.com - 28 Jul 2006 00:12 GMT
I have signed the .jar's, and tried creating a separate .jar with just
the dll and updated the .jnlp with the following:

<nativelib href="winlib.jar" download="eager"/>

When I launch the app via javaws, I get the following error:

java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.sun.javaws.Launcher.executeApplication(Unknown Source)
    at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
    at com.sun.javaws.Launcher.continueLaunch(Unknown Source)
    at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)
    at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)
    at com.sun.javaws.Launcher.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.UnsatisfiedLinkError: openSubKey
    at com.ice.jni.registry.RegistryKey.openSubKey(Native Method)
                .....

If I just don't include the winlib.jar on the server when I launch the
application, I get the same error, so it seems like the call to the
method in the .dll, just doesn't know where to find the .dll. I am
guessing it was found previously based on the classpath, but when I
deploy it via javaws, I cannot supply a classpath.

I have tried packaging a single .jar with the .dll and no luck..

help....

Thanks

> > I have a small java application that reads the registry through the use
> > of a .dll.  I am packaging this app in a jar and then deploying it via
[quoted text clipped - 11 lines]
> certificate, otherwise it won't work.
> If (2): I don't know


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.