Trolltech Home | Qt-jambi-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qt-jambi-interest Archive, August 2006
webstart (take two)


Message 1 in thread

Thanks for ignoring the other post, this is the correct one.

Hi,
I have experimentet a bit with jambi and webstart and have sucsessfull 
startet a webstart application using both jambi and jogl on windows.
All I did was to put all needed dlls in an extra jar file and load the 
jar file containing the application and the jar file containing the 
native dlls using my jnlp.

<resources os="Windows" arch="x86">
    <nativelib href = "qt_windows_natives.jar" />
</resources>

And I needed to load the dlls in the correct way in my main file.
To acomplish this I had a look at the dependencies of the dll files.

I did it this way:

        java.lang.System.loadLibrary("QtCore4");
        java.lang.System.loadLibrary("QtGui4");
        java.lang.System.loadLibrary("QtOpenGL4");
        java.lang.System.loadLibrary("QtNetwork4");
        java.lang.System.loadLibrary("QtSql4");
        java.lang.System.loadLibrary("QtXml4");

        java.lang.System.loadLibrary("msvcr71");
        java.lang.System.loadLibrary("msvcp71");
// (don't know if I need this or not)

        java.lang.System.loadLibrary("qtjambi");

        java.lang.System.loadLibrary("com_trolltech_qt_core");
        java.lang.System.loadLibrary("com_trolltech_qt_gui");
        java.lang.System.loadLibrary("com_trolltech_qt_opengl");


I think it should be possible to deploy the natives libs in different 
jars which should be loaded with the jnlp.
I will try to get this working on linux as well tomorrow.
I also like to have a look at building a fatjar containing platform 
specific libs so it can run on windows and linux


I think it would be nice to have various native jars for all platforms 
in the final product.
And I also would like a webstart distribution for the whole jambi stuff. 
so that it can be referenced in jnlp files.
Like it is done by jogl so that i can use:

<extension name="jogl" 
href="http://download.java.net/media/jogl/builds/archive/jsr-231-webstart-current/jogl.jnlp"/>
to get the lib loaded



MFG,


Vincent Eberle


Message 2 in thread

hi again,
I just wanted to tell you that I have sucessfully started my test
application via webstart running ubuntu 6.06 LTS.
But I had to rename the so files in the lib folder and put them in an
extra jar.

I named them libQtCore4.so and so on. And I got rid of the
		java.lang.System.loadLibrary("msvcr71");
		java.lang.System.loadLibrary("msvcp71");
lines. This way I could use the same loading class for windows and linux.

And I added these lines to the jnlp:
   <resources os="Linux" arch="i386">
      <nativelib href = "qt_linux_natives.jar" />
    </resources>
    <resources os="Linux" arch="x86">
      <nativelib href = "qt_linux_natives.jar" />
    </resources>


MFG,


Vincent Eberle


ps: of course all jars need to be signed with the same key

> Thanks for ignoring the other post, this is the correct one.
> 
> Hi,
> I have experimentet a bit with jambi and webstart and have sucsessfull
> startet a webstart application using both jambi and jogl on windows.
> All I did was to put all needed dlls in an extra jar file and load the
> jar file containing the application and the jar file containing the
> native dlls using my jnlp.
> 
> <resources os="Windows" arch="x86">
>    <nativelib href = "qt_windows_natives.jar" />
> </resources>
> 
> And I needed to load the dlls in the correct way in my main file.
> To acomplish this I had a look at the dependencies of the dll files.
> 
> I did it this way:
> 
>        java.lang.System.loadLibrary("QtCore4");
>        java.lang.System.loadLibrary("QtGui4");
>        java.lang.System.loadLibrary("QtOpenGL4");
>        java.lang.System.loadLibrary("QtNetwork4");
>        java.lang.System.loadLibrary("QtSql4");
>        java.lang.System.loadLibrary("QtXml4");
> 
>        java.lang.System.loadLibrary("msvcr71");
>        java.lang.System.loadLibrary("msvcp71");
> // (don't know if I need this or not)
> 
>        java.lang.System.loadLibrary("qtjambi");
> 
>        java.lang.System.loadLibrary("com_trolltech_qt_core");
>        java.lang.System.loadLibrary("com_trolltech_qt_gui");
>        java.lang.System.loadLibrary("com_trolltech_qt_opengl");
> 
> 
> I think it should be possible to deploy the natives libs in different
> jars which should be loaded with the jnlp.
> I will try to get this working on linux as well tomorrow.
> I also like to have a look at building a fatjar containing platform
> specific libs so it can run on windows and linux
> 
> 
> I think it would be nice to have various native jars for all platforms
> in the final product.
> And I also would like a webstart distribution for the whole jambi stuff.
> so that it can be referenced in jnlp files.
> Like it is done by jogl so that i can use:
> 
> <extension name="jogl"
> href="http://download.java.net/media/jogl/builds/archive/jsr-231-webstart-current/jogl.jnlp"/>
> 
> to get the lib loaded
> 
> 
> 
> MFG,
> 
> 
> Vincent Eberle


Message 3 in thread

Vincent Eberle wrote:

> Hi,
> I have experimentet a bit with jambi and webstart and have sucsessfull 
> startet a webstart application using both jambi and jogl on windows.
> All I did was to put all needed dlls in an extra jar file and load the 
> jar file containing the application and the jar file containing the 
> native dlls using my jnlp.
> 
> <resources os="Windows" arch="x86">
>    <nativelib href = "qt_windows_natives.jar" />
> </resources>

Thanks for hint. We're fairly new to webstart as well so this info comes 
in handy.

> And I needed to load the dlls in the correct way in my main file.
> To acomplish this I had a look at the dependencies of the dll files.
> 
> I did it this way:
> 
>        java.lang.System.loadLibrary("QtCore4");
>        java.lang.System.loadLibrary("QtGui4");
>        java.lang.System.loadLibrary("QtOpenGL4");
>        java.lang.System.loadLibrary("QtNetwork4");
>        java.lang.System.loadLibrary("QtSql4");
>        java.lang.System.loadLibrary("QtXml4");
> 
>        java.lang.System.loadLibrary("msvcr71");
>        java.lang.System.loadLibrary("msvcp71");
> // (don't know if I need this or not)

On XP based Windows, these libraries come preinstalled. On older systems 
like Windows 2000 you won't have these unless you installed Visual 
Studio 2003 at some point.


> I think it would be nice to have various native jars for all platforms 
> in the final product.

We'll definitly consider putting these things together for easy 
deployment. We've been playing quite a bit around with how to get both 
single jar file deployment and webstart deployment now

> And I also would like a webstart distribution for the whole jambi stuff. 

I think well ship this for the final release at least.

-

Best regards,
Gunnar