PDA

View Full Version : qtjambi



momesana
16th June 2007, 22:57
Hi everybody,

I know this has been voiced before but regardless of this I will repeat it: We should have a Qtjambi section. Ideally duplicating existing Qt/C++ forum bits for use with qtjambi, so we have sections like qtjambi programming, general java programming etc. Meanwhile, in the absense of the mentioned, I'll post my questions here.

I am pretty new to java. I had a little bit of exposure to java before but thats been a few years ago. Recently with the advent of the stable qtjambi release, I grabbed myself an online java book and started learning java. I started my experiments by developing the most basic qt based qtjambi application possible. A mere subclass of QWidget.

Now, my problem is that I would like to know how to include the native libraries into the main jar file. I can put the native libs into a jar file of their own and reference them from within the applications manifest file and then things work. Using webstart also works fine and splitting the libs into different jars make sense there. But I would like to know how want to put files into a single selfcontained jar. The question is how to deal with the native libs. Does anone have an Idea?

Thanks
momesana

momesana
18th June 2007, 14:21
Ok,
I've put all the native libs into the jars root directory, as was more or less outlined by the qtjambi docs: (http://doc.trolltech.com/qtjambi-1.0.0beta/com/trolltech/qt/qtjambi-deployment.html)



To deploy Qt Jambi applications using the executable .jar file approach is straight forward:

jar mcf myApplication.jar <manifest file> <my class files>
<my resources> <native libraries>

Simply put all resources, native libraries and application .class files into one single .jar file. Remember to add a mainfest file to make the file executable.


But, how can I make qtjambi/java find the libs if I put them into their own neat subdirecty instead of stuffing them all into the jars root directory?

Any help would be appreciated
momesana