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

Qt-jambi-interest Archive, March 2007
QtJambi, Java Web Start and Mac OS


Message 1 in thread

Hi,

I would like to know how can i package a qtjambi-mac.jar which contains
natives libs for mac os like qtjambi-linux.jar and qtjambi-win32.jar jars of
the Qt Jambi Java Web Start Demo Application ?

Best regards,
Laurent.

Message 2 in thread

Laurent Jourdren wrote:
> Hi,
> 
> I would like to know how can i package a qtjambi-mac.jar which contains 
> natives libs for mac os like qtjambi-linux.jar and qtjambi-win32.jar 
> jars of the Qt Jambi Java Web Start Demo Application ?


Hi Laurent,

Unfortunately this is not trivial to do ;-)

Qt needs to run on the main thread and so does Swing on the mac, so 
these toolkits don't play together at all on Mac OS X. Webstart is Swing 
based so you already have Swing running, which means you cannot load Qt 
Jambi.

The way to do it would be to start a new process with a new virtual 
machine from the webstart app and run Qt Jambi from here. Quite doable, 
but a bit more work.

best regards,
Gunnar


Message 3 in thread

2007/3/23, Gunnar Sletta <gunnar@xxxxxxxxxxxxx>:
>
> Laurent Jourdren wrote:
> > Hi,
> >
> > I would like to know how can i package a qtjambi-mac.jar which contains
> > natives libs for mac os like qtjambi-linux.jar and qtjambi-win32.jar
> > jars of the Qt Jambi Java Web Start Demo Application ?
>
>
> Hi Laurent,
>
> Unfortunately this is not trivial to do ;-)
>
> Qt needs to run on the main thread and so does Swing on the mac, so
> these toolkits don't play together at all on Mac OS X. Webstart is Swing
> based so you already have Swing running, which means you cannot load Qt
> Jambi.
>
> The way to do it would be to start a new process with a new virtual
> machine from the webstart app and run Qt Jambi from here. Quite doable,
> but a bit more work.


Gunnar, thanks for your reply,

One more question: if i can start another virtual machine from the webstart
app how can i pass jars and ressouces of the webstart app to the new virtual
machine ?

Best regards,
Laurent.

Message 4 in thread

2007/3/23, Laurent Jourdren <jourdren@xxxxxxxxx>:
>
>
> Gunnar, thanks for your reply,
>
> One more question: if i can start another virtual machine from the
> webstart app how can i pass jars and ressouces of the webstart app to the
> new virtual machine ?
>

Hi,

Sorry for my previous stupid question. I've been able to run Qt-jambi from
another virtual machine from the webstart app. It's work successfully under
linux but on Mac OS X, it seen that my qt-jambi-mac.jar doesn't contains
all the needed files.

When i launch (in command line):

$ DYLD_LIBRARY_PATH=/Users/jourdren/qtjambi-mac/qtjambi-mac-1.0.0-beta/lib \
java -XstartOnFirstThread \
-cp qtjambi-launcher.jar:qtjambi.jar \
com.trolltech.launcher.Launcher

Everything is ok, but with my qtjambi-mac.jar :

$ java -XstartOnFirstThread \
-cp qtjambi-launcher.jar:qtjambi.jar:qtjambi-mac.jar \
com.trolltech.launcher.Launcher

Exception in thread "main" java.lang.UnsatisfiedLinkError: __qt_initLibrary
at
com.trolltech.qt.core.QtJambi_LibraryInitializer.__qt_initLibrary(NativeMethod)
at
com.trolltech.qt.core.QtJambi_LibraryInitializer.<clinit>(QtJambi_LibraryInitializer.java:10)
at
com.trolltech.qt.core.QAbstractFileEngineHandler.<clinit>(
QAbstractFileEngineHandler.java:43) at
com.trolltech.qt.QtJambi_LibraryInitializer.<clinit>(QtJambi_LibraryInitializer.java:26)
at
com.trolltech.qt.QtJambiObject.<clinit>(QtJambiObject.java:27)


My qt-jambi-mac.jar contains the following files :

./libcom_trolltech_qt_core.1.0.0.jnilib
./libcom_trolltech_qt_core.1.0.jnilib
./libcom_trolltech_qt_core.1.jnilib
./libcom_trolltech_qt_core.jnilib
./libcom_trolltech_qt_gui.1.0.0.jnilib
./libcom_trolltech_qt_gui.1.0.jnilib
./libcom_trolltech_qt_gui.1.jnilib
./libcom_trolltech_qt_gui.jnilib
./libcom_trolltech_qt_network.1.0.0.jnilib
./libcom_trolltech_qt_network.1.0.jnilib
./libcom_trolltech_qt_network.1.jnilib
./libcom_trolltech_qt_network.jnilib
./libcom_trolltech_qt_opengl.1.0.0.jnilib
./libcom_trolltech_qt_opengl.1.0.jnilib
./libcom_trolltech_qt_opengl.1.jnilib
./libcom_trolltech_qt_opengl.jnilib
./libcom_trolltech_qt_sql.1.0.0.jnilib
./libcom_trolltech_qt_sql.1.0.jnilib
./libcom_trolltech_qt_sql.1.jnilib
./libcom_trolltech_qt_sql.jnilib
./libcom_trolltech_qt_svg.1.0.0.jnilib
./libcom_trolltech_qt_svg.1.0.jnilib
./libcom_trolltech_qt_svg.1.jnilib
./libcom_trolltech_qt_svg.jnilib
./libcom_trolltech_qt_xml.1.0.0.jnilib
./libcom_trolltech_qt_xml.1.0.jnilib
./libcom_trolltech_qt_xml.1.jnilib
./libcom_trolltech_qt_xml.jnilib
./libcom_trolltech_tools_designer.1.0.0.jnilib
./libcom_trolltech_tools_designer.1.0.jnilib
./libcom_trolltech_tools_designer.1.jnilib
./libcom_trolltech_tools_designer.jnilib
./libQtAssistantClient.4.dylib
./libQtCore.4.dylib
./libQtDesigner.4.dylib
./libQtDesignerComponents.4.dylib
./libQtGui.4.dylib
./libqtjambi.1.0.0.jnilib
./libqtjambi.1.0.jnilib
./libqtjambi.1.jnilib
./libqtjambi.jnilib
./libQtNetwork.4.dylib
./libQtOpenGL.4.dylib
./libQtSql.4.dylib
./libQtSvg.4.dylib
./libQtXml.4.dylib
./META-INF
./META-INF/MANIFEST.MF
./qt_system_libs

qt_system_libs contains the string "libstdc++.6.dylib".

Best regards,

Laurent.

Message 5 in thread

Laurent Jourdren wrote:

 > Everything is ok, but with my qtjambi-mac.jar :
 >
 > $ java -XstartOnFirstThread \
 > -cp qtjambi-launcher.jar:qtjambi.jar:qtjambi-mac.jar \
 > com.trolltech.launcher.Launcher

Hi Laruent,

It seems that the native libraries are not being loaded. Could you try 
running the other virtual machine with the option, 
-Dcom.trolltech.qt.verbose-loading=true ? That will tell you a bit more 
on where this fails. What should happen in this case is that Qt Jambi 
should unpack the jnilibs from the .jar file and put them in your temp 
folder, then load them. You should get the message

"Loaded(libraryName) using cached."

in the command line if this works.

Your lib files look ok, though the qt_system_libs file probably doesn't 
need to contain anything for Mac OS X.

-
Gunnar


Message 6 in thread

2007/3/26, Gunnar Sletta <gunnar@xxxxxxxxxxxxx>:
>
> Laurent Jourdren wrote:
>
> > Everything is ok, but with my qtjambi-mac.jar :
> >
> > $ java -XstartOnFirstThread \
> > -cp qtjambi-launcher.jar:qtjambi.jar:qtjambi-mac.jar \
> > com.trolltech.launcher.Launcher
>
> Hi Laruent,
>
> It seems that the native libraries are not being loaded. Could you try
> running the other virtual machine with the option,
> -Dcom.trolltech.qt.verbose-loading=true ? That will tell you a bit more
> on where this fails. What should happen in this case is that Qt Jambi
> should unpack the jnilibs from the .jar file and put them in your temp
> folder, then load them. You should get the message
>
> "Loaded(libraryName) using cached."
>
> in the command line if this works.
>
> Your lib files look ok, though the qt_system_libs file probably doesn't
> need to contain anything for Mac OS X.



Hi Gunnar,

Thanks for the tip, with -Dcom.trolltech.qt.verbose-loading=true, it show me
that i forgot to add libstdc++.6.0.4.dylib(*) to the jar. But whatever the
string ("libstdc++.6.0.4.dylib","libstdc++.6.dylib","libstdc++.dylib") in
qt_system_libs, i have now the following message :

java.lang.UnsatisfiedLinkError: no stdc++ in java.library.path
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
        at java.lang.Runtime.loadLibrary0(Runtime.java:822)
        at java.lang.System.loadLibrary(System.java:992)
        at com.trolltech.qt.Utilities.loadLibrary(Utilities.java:68)
        at com.trolltech.qt.Utilities.loadSystemLibraries(Utilities.java:48)
        at com.trolltech.qt.QtJambi_LibraryInitializer
.<clinit>(QtJambi_LibraryInitializer.java:19)
        at com.trolltech.qt.QtJambiObject.<clinit>(QtJambiObject.java:27)
java.lang.NullPointerException
        at com.trolltech.qt.Utilities.loadLibrary(Utilities.java:91)
        at com.trolltech.qt.Utilities.loadSystemLibraries(Utilities.java:48)
        at com.trolltech.qt.QtJambi_LibraryInitializer
.<clinit>(QtJambi_LibraryInitializer.java:19)
        at com.trolltech.qt.QtJambiObject.<clinit>(QtJambiObject.java:27)
java.lang.UnsatisfiedLinkError: no QtCore in java.library.path
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
        at java.lang.Runtime.loadLibrary0(Runtime.java:822)
        at java.lang.System.loadLibrary(System.java:992)
        at com.trolltech.qt.Utilities.loadLibrary(Utilities.java:68)
        at com.trolltech.qt.Utilities.loadQtLibrary(Utilities.java:54)
        at com.trolltech.qt.QtJambi_LibraryInitializer
.<clinit>(QtJambi_LibraryInitializer.java:20)
        at com.trolltech.qt.QtJambiObject.<clinit>(QtJambiObject.java:27)
... many more lines after

(*) for the test, libstdc++.6.dylib and libstdc++.dylib, copy of
libstdc++.6.0.4.dylib are also in the jar.

What must be the contents of the qt_system_libs to allow loading of
libstdc++ ?

Best regards,

Laurent.

Message 7 in thread

Laurent Jourdren wrote:
> 
> 
> 2007/3/26, Gunnar Sletta <gunnar@xxxxxxxxxxxxx 
> <mailto:gunnar@xxxxxxxxxxxxx>>:
> 
>     Laurent Jourdren wrote:
> 
>      > Everything is ok, but with my qtjambi-mac.jar :
>      >
>      > $ java -XstartOnFirstThread \
>      > -cp qtjambi-launcher.jar:qtjambi.jar:qtjambi-mac.jar \
>      > com.trolltech.launcher.Launcher
> 
>     Hi Laruent,
> 
>     It seems that the native libraries are not being loaded. Could you try
>     running the other virtual machine with the option,
>     -Dcom.trolltech.qt.verbose-loading=true ? That will tell you a bit more
>     on where this fails. What should happen in this case is that Qt Jambi
>     should unpack the jnilibs from the .jar file and put them in your temp
>     folder, then load them. You should get the message
> 
>     "Loaded(libraryName) using cached."
> 
>     in the command line if this works.
> 
>     Your lib files look ok, though the qt_system_libs file probably doesn't
>     need to contain anything for Mac OS X.
> 
> 
> 
> Hi Gunnar,
> 
> Thanks for the tip, with - Dcom.trolltech.qt.verbose-loading=true, it 
> show me that i forgot to add libstdc++.6.0.4.dylib(*) to the jar. But 
> whatever the string 
> ("libstdc++.6.0.4.dylib","libstdc++.6.dylib","libstdc++.dylib") in 
> qt_system_libs, i have now the following message :

I really doubt the qt_system_libs is relevant at all for you. Leave it 
out of the qtjambi_mac.jar file. It is used to specify runtime libs for 
systems where this is not standardized. When distributing our binaries 
to windows 2000, we need to load msvcr71.dll prior to loading QtCore.dll 
for instance. I would assume that this is not required for Mac OS X.

What I do see however is that you get a nullpointer exception there. 
This is caused by a bug in the loader class. You can work around it by 
passing the vm option: 
-Dcom.trolltech.qt.internal.jambipath=anything_will_do

Can you see if that helps?

-
Gunnar


Message 8 in thread

2007/3/26, Gunnar Sletta <gunnar@xxxxxxxxxxxxx>:
>
> Laurent Jourdren wrote:
> >
> >
> > 2007/3/26, Gunnar Sletta <gunnar@xxxxxxxxxxxxx
> > <mailto:gunnar@xxxxxxxxxxxxx>>:
> >
> >     Laurent Jourdren wrote:
> >
> >      > Everything is ok, but with my qtjambi-mac.jar :
> >      >
> >      > $ java -XstartOnFirstThread \
> >      > -cp qtjambi-launcher.jar:qtjambi.jar:qtjambi-mac.jar \
> >      > com.trolltech.launcher.Launcher
> >
> >     Hi Laruent,
> >
> >     It seems that the native libraries are not being loaded. Could you
> try
> >     running the other virtual machine with the option,
> >     -Dcom.trolltech.qt.verbose-loading=true ? That will tell you a bit
> more
> >     on where this fails. What should happen in this case is that Qt
> Jambi
> >     should unpack the jnilibs from the .jar file and put them in your
> temp
> >     folder, then load them. You should get the message
> >
> >     "Loaded(libraryName) using cached."
> >
> >     in the command line if this works.
> >
> >     Your lib files look ok, though the qt_system_libs file probably
> doesn't
> >     need to contain anything for Mac OS X.
> >
> >
> >
> > Hi Gunnar,
> >
> > Thanks for the tip, with - Dcom.trolltech.qt.verbose-loading=true, it
> > show me that i forgot to add libstdc++.6.0.4.dylib(*) to the jar. But
> > whatever the string
> > ("libstdc++.6.0.4.dylib","libstdc++.6.dylib","libstdc++.dylib") in
> > qt_system_libs, i have now the following message :
>
> I really doubt the qt_system_libs is relevant at all for you. Leave it
> out of the qtjambi_mac.jar file. It is used to specify runtime libs for
> systems where this is not standardized. When distributing our binaries
> to windows 2000, we need to load msvcr71.dll prior to loading QtCore.dll
> for instance. I would assume that this is not required for Mac OS X.
>
> What I do see however is that you get a nullpointer exception there.
> This is caused by a bug in the loader class. You can work around it by
> passing the vm option:
> -Dcom.trolltech.qt.internal.jambipath=anything_will_do
>
> Can you see if that helps?


Gunnar,

Thanks for your help, but unfortunately, i don't see any change to the
result.
May be I must wait a little for the next version of qtjambi ?
Do you known if that issue will be resolved in the next release candidate of
qtjambi and if webstart app for Mac OS X will be easily available ?

In addition, you said in a previously in this thread that Swing and Qt-Jambi
share the same thread under Mac OS X. I read some months ago that Qt can use
different event-loops (like GTK+ event loop under linux), so if Qt-Jambi
under Mac OS X use another event-loop (not the same thread that Swing), it
will may be possible to run webstart apps without launch a new virtual
machine ?

Best regards,

Laurent.

Message 9 in thread

Laurent Jourdren wrote:

> Thanks for your help, but unfortunately , i don't see any change to the 
> result.
> May be I must wait a little for the next version of qtjambi ?
> Do you known if that issue will be resolved in the next release 
> candidate of qtjambi and if webstart app for Mac OS X will be easily 
> available ? 

I've be able to reproduce these problems on Mac OS X, so I'll 
investigate and get back to you.

> In addition, you said in a previously in this thread that Swing and 
> Qt-Jambi share the same thread under Mac OS X. I read some months ago 
> that Qt can use different event-loops (like GTK+ event loop under 
> linux), so if Qt-Jambi under Mac OS X use another event-loop (not the 
> same thread that Swing), it will may be possible to run webstart apps 
> without launch a new virtual machine ?

The problem is actually that the Mac OS windowing system can only be 
accessed by one thread and since Swing runs its own thread and we run 
our own thread this crashes horribly... Just try running without 
-XstartOnMainThread ;-)

There is possible that a solution exists, but right now I cannot see any.

-
Gunnar


Message 10 in thread

Hi Gunnar,

Thanks for your all answers,

I found a very dirty hack to run qtjambi apps with java webstart:

1. Tar the lib dir of qtjambi-mac-1.0.0-beta.tar.gz in
qtjambi-mac-1.0.0-beta.tar (*)
2. Package the tar in a jar :
    $ jar cf qtjambi-mac-1.0.0-beta.jar qtjambi-mac-1.0.0-beta.tar
3. Add this new jar to your jnlp file as ressource
4. In your app before starting the new virtual machive for qtjambi, unzip
the qtjambi-mac-1.0.0-beta.jar from the webstart cache (usualy:
~/Library/Caches/Java/cache/javaws/http/...) in a temporary dir
5. Untar qtjambi-mac-1.0.0-beta.tar in the temporary dir
6. Start the new virtal machine with :
      * DYLD_LIBRARY_PATH set to your temporary dir
      * -XstartOnFirstThread arg
      * classpath set to the jar you need for your app that are in the
webstart cache

(*) We must use a tar file because symbolics links in lib dir are necessary
for qtJambi.

To simplify the job, I run the following bash script (actualy a draft) with
System.exec() to start a qtjambi webstart app:

#!/bin/bash
export
DYLD_LIBRARY_PATH=/Users/jourdren/Library/Caches/MyAppWebstart/1.0.0-beta/
export
CACHE=/Users/jourdren/Library/Caches/Java/cache/javaws/http/Dtoto.com/P80/DMmy/DMapp/DMwebstart
mkdir -p $DYLD_LIBRARY_PATH
cd $DYLD_LIBRARY_PATH
unzip -n $CACHE/RMqtjambi-mac-1.0.0-beta.jar
tar xkf qtjambi-mac-1.0.0-beta.tar
java -XstartOnFirstThread -cp $CACHE/RMqtjambi-
1.0.0-beta.jar:$CACHE/RMqtjambi-mac-1.0.0-beta.jar:$CACHE/RMqtjambi-launcher-1.0.0-beta.jar
com.trolltech.launcher.Launcher



I hope this can help,

Best regards,

Laurent.


2007/3/27, Gunnar Sletta <gunnar@xxxxxxxxxxxxx>:
>
> Laurent Jourdren wrote:
>
> > Thanks for your help, but unfortunately , i don't see any change to the
> > result.
> > May be I must wait a little for the next version of qtjambi ?
> > Do you known if that issue will be resolved in the next release
> > candidate of qtjambi and if webstart app for Mac OS X will be easily
> > available ?
>
> I've be able to reproduce these problems on Mac OS X, so I'll
> investigate and get back to you.
>
> > In addition, you said in a previously in this thread that Swing and
> > Qt-Jambi share the same thread under Mac OS X. I read some months ago
> > that Qt can use different event-loops (like GTK+ event loop under
> > linux), so if Qt-Jambi under Mac OS X use another event-loop (not the
> > same thread that Swing), it will may be possible to run webstart apps
> > without launch a new virtual machine ?
>
> The problem is actually that the Mac OS windowing system can only be
> accessed by one thread and since Swing runs its own thread and we run
> our own thread this crashes horribly... Just try running without
> -XstartOnMainThread ;-)
>
> There is possible that a solution exists, but right now I cannot see any.
>
> -
> Gunnar
>
>

Message 11 in thread

Laurent Jourdren wrote:
> Hi Gunnar,
> 
> Thanks for your all answers,
> 
> I found a very dirty hack to run qtjambi apps with java webstart:
> 
> 1. Tar the lib dir of qtjambi-mac-1.0.0-beta.tar.gz in 
> qtjambi-mac-1.0.0-beta.tar (*)
> 2. Package the tar in a jar :
>     $ jar cf qtjambi-mac-1.0.0-beta.jar qtjambi-mac-1.0.0-beta.tar
> 3. Add this new jar to your jnlp file as ressource
> 4. In your app before starting the new virtual machive for qtjambi, 
> unzip the qtjambi-mac-1.0.0-beta.jar from the webstart cache (usualy: 
> ~/Library/Caches/Java/cache/javaws/http/...) in a temporary dir
> 5. Untar qtjambi-mac-1.0.0-beta.tar in the temporary dir
> 6. Start the new virtal machine with :
>       * DYLD_LIBRARY_PATH set to your temporary dir
>       * -XstartOnFirstThread arg
>       * classpath set to the jar you need for your app that are in the 
> webstart cache
> 
> (*) We must use a tar file because symbolics links in lib dir are 
> necessary for qtJambi.
> 
> To simplify the job, I run the following bash script (actualy a draft) 
> with System.exec() to start a qtjambi webstart app:

I was going to suggest something similar... ;-) Cool that you got it 
working.

Digging a bit I might have found a slightly simpler solution.

libqtjambi.jnilib depends on libQtCore.4.dylib and libQtGui.4.dylib. 
When the java virtual machine needs the native symbols from the qtjambi 
lib, we explicitly load it using 
com.trolltech.qt.Utilites.loadLibrary(). Because of the dependencies on 
the Qt libs this doesn't work out of the box, so we load the Qt libs 
into the process prior to loading the qtjambi lib. On Windows and Linux 
it is enough for the system loader that a library is loaded into the 
process for the dynamic linker to resolve the depencies. On Mac OS X, 
this is not the case ;-(. Dependencies, as far as I found so far, need 
to be either referenced using rpath or patched to the install directory 
using install_name_tool.

Using install_name_tool it is possible to patch native libraries to have 
dependencies only relative to the directory the native library was 
loaded from. I tried this out and it works.

The attached script should patch your libraries if you run it inside the 
$QTJAMBI/lib folder.

I hope this helps,
Gunnar
find . -name "*lib" -exec install_name_tool -change libQtAssistantClient.4.dylib @loader_path/libQtAssistantClient.4.dylib {} \;
find . -name "*lib" -exec install_name_tool -change libQtAssistantClient.4.dylib @loader_path/libQtAssistantClient.4.dylib {} \;
find . -name "*lib" -exec install_name_tool -change libQtCore.4.dylib @loader_path/libQtCore.4.dylib {} \;
find . -name "*lib" -exec install_name_tool -change libQtDesigner.4.dylib @loader_path/libQtDesigner.4.dylib {} \;
find . -name "*lib" -exec install_name_tool -change libQtGui.4.dylib @loader_path/libQtGui.4.dylib {} \;
find . -name "*lib" -exec install_name_tool -change libQtXml.4.dylib @loader_path/libQtXml.4.dylib {} \;
find . -name "*lib" -exec install_name_tool -change libQtNetwork.4.dylib @loader_path/libQtNetwork.4.dylib {} \;
find . -name "*lib" -exec install_name_tool -change libqtjambi.1.jnilib @loader_path/libqtjambi.1.jnilib {} \;


Message 12 in thread

2007/3/28, Gunnar Sletta <gunnar@xxxxxxxxxxxxx>:

> I was going to suggest something similar... ;-) Cool that you got it
> working.
>
> Digging a bit I might have found a slightly simpler solution.
>
> libqtjambi.jnilib depends on libQtCore.4.dylib and libQtGui.4.dylib.
> When the java virtual machine needs the native symbols from the qtjambi
> lib, we explicitly load it using
> com.trolltech.qt.Utilites.loadLibrary(). Because of the dependencies on
> the Qt libs this doesn't work out of the box, so we load the Qt libs
> into the process prior to loading the qtjambi lib. On Windows and Linux
> it is enough for the system loader that a library is loaded into the
> process for the dynamic linker to resolve the depencies. On Mac OS X,
> this is not the case ;-(. Dependencies, as far as I found so far, need
> to be either referenced using rpath or patched to the install directory
> using install_name_tool.
>
> Using install_name_tool it is possible to patch native libraries to have
> dependencies only relative to the directory the native library was
> loaded from. I tried this out and it works.
>
> The attached script should patch your libraries if you run it inside the
> $QTJAMBI/lib folder.


Hi Gunnar,

Thanks for your help,
I applied your path and then create a jar with the patched libs.
Unfortunaly, it seem that it didn't work. :-(

I used the following commands :

$ tar xzf qtjambi-mac-1.0.0-beta.tar.gz
$ cd qtjambi-mac-1.0.0-beta
$ cd lib && cp ~/Desktop/mac_install_name_fixup.sh .
$ bash mac_install_name_fixup.sh
$ touch qt_system_libs
$ jar cf ../qtjambi-mac.jar *
$ cd .. && cp ~/Desktop/qtjambi-launcher.jar .
$ java -XstartOnFirstThread -Dcom.trolltech.qt.verbose-loading=true -cp
qtjambi-launcher.jar:qtjambi.jar:qtjambi-mac.jar
com.trolltech.launcher.Launcher

The result:
java.lang.UnsatisfiedLinkError: no QtCore in java.library.path
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
        at java.lang.Runtime.loadLibrary0(Runtime.java:822)
        at java.lang.System.loadLibrary(System.java:992)
        at com.trolltech.qt.Utilities.loadLibrary(Utilities.java:68)
        at com.trolltech.qt.Utilities.loadQtLibrary(Utilities.java:54)
        at com.trolltech.qt.QtJambi_LibraryInitializer
.<clinit>(QtJambi_LibraryInitializer.java:20)
        at com.trolltech.qt.QtJambiObject.<clinit>(QtJambiObject.java:27)
...many more lines following

I think, i must have missed something, but I don't know what.

Best regards,

Laurent.

Message 13 in thread

Laurent Jourdren wrote:
> Hi Gunnar,
> 
> Thanks for your help,
> I applied your path and then create a jar with the patched libs. 
> Unfortunaly, it seem that it didn't work. :-(

Hi Laurent,

I'll investigate further and try to get all of this to work for the next 
beta release. Until then, you'll have to run with your initial 
workaround with the DYLD_LIBRARY_PATH. Sorry for the inconvenience

Best regards,
Gunnar


Message 14 in thread

Hi Gunnar,

2007/3/29, Gunnar Sletta <gunnar@xxxxxxxxxxxxx>:
>
> Laurent Jourdren wrote:
> > Hi Gunnar,
> >
> > Thanks for your help,
> > I applied your path and then create a jar with the patched libs.
> > Unfortunaly, it seem that it didn't work. :-(
>
> Hi Laurent,
>
> I'll investigate further and try to get all of this to work for the next
> beta release. Until then, you'll have to run with your initial
> workaround with the DYLD_LIBRARY_PATH. Sorry for the inconvenience


Thanks for all your work.

I found some pages on the net about the thread issue between Java Web Start
and toolkit other than Swing/AWT. With SWT, it is not very clear if is
possible to run SWT with WebStart (i think it's not).

Some documentation and comments say yes:

http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.platform.doc.isv/guide/java_web_start.htm
http://www.ggtools.net/grand/ (can't test because i have a macintel)

other say no:

http://www.borderlandconsulting.com/bc/articles/jnlp_osx_swt_launcher/
https://bugs.eclipse.org/bugs/show_bug.cgi?id=63306
http://www.eclipse.org/swt/faq.php#javawebstart

May be, you (trolltech) and the SWT team must ask to Apple to fix the bug.
If Apple don't want, we will have to wait that the openJDK project release a
Mac OS X version of the JDK. :-(

I hope this helps,

Best regards,

Laurent.