users@glassfish.java.net

Re: DLLs in Enterprise Application

From: <glassfish_at_javadesktop.org>
Date: Fri, 21 Dec 2007 06:09:05 PST

Big thanks for your answers, they have clarifierd the issue for me. Of course I know how to manage JNLP files, my first idea was to modify launcher generated by Application Server, by adding nativelib tag to resource section. But then I thought there should be better way to achieve it. The logical way for me is that I'm adding JAR with DLLs to my EAR, and I'm telling the Application Server to generate proper JNLP by set something in some descriptor. Unfortunatelly Tim tells it's impossible, that's really not good. So I went back to the idea with own JNLP, of course based on the automatically generated one. I made empty value for href in jnlp tag, then I added this line in resources:

<extension name="jdic" href="http://myAddress/jdic.jnlp"/>

Under myAddress I placed required JARs (signed by myself), and jdic.jnlp file with this contents:

<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+"
    codebase="http://myAddress"
    href="http://myAddress/jdic.jnlp">

    <information>
        <title>q</title>
        <vendor>q</vendor>
        <description>q</description>
        <description kind="short">q</description>
        <offline-allowed/>
    </information>

    <security>
        <all-permissions/>
    </security>

    <resources>
        <j2se version="1.4+"/>
        <jar href="jdic.jar"/>
        <jar href="jdic_icon.jar"/>
        <nativelib href="jdic-native.jar"/>
    </resources>

    <installer-desc/>
    <component-desc/>
</jnlp>

jdic-native.jar includes both jdic.dll and jdic_icon.dll, without subdirs. And this resource seems to be loaded, during launching I have got security warning about using it, I even have checked its presence in Web Start cache. But when I activate function in my app that requires jdic, I still have error message "no jdic in java.library.path". What can be wrong? Also in console I noticed this exception during launching the app:

org.jdesktop.jdic.init.JdicInitException: org.jdesktop.jdic.init.JdicInitException: Unexpected ClassLoader for webstart, only com.sun.jnlp.JNLPClassLoader is supported.

Can it be connected with my problem? Any ideas how to solve it?
[Message sent by forum member 'hardcode' (hardcode)]

http://forums.java.net/jive/thread.jspa?messageID=251126