How to make JOGL OSGI bundles with native libraries loaded correctly? - eclipse-plugin

I've been trying for days: http://forum.jogamp.org/JOGL-with-OSGi-td3773888.html#a4029139
This library has native dependencies embedded in jars.
http://search.maven.org/#artifactdetails|org.jogamp.jogl|jogl-all|2.0-rc11|jar
http://search.maven.org/#artifactdetails|org.jogamp.gluegen|gluegen-rt|2.0-rc11|jar
Can you provide detailed instructions to make osgified versions of this?
It would be nice if you can use bnd http://www.aqute.biz/Bnd/Bnd or bndtools http://bndtools.org/ in the process.
I've tried to make a gigantic bundle with everything embedded, but I cannot make karaf to find native libraries: I keep getting the error "no gluegen-rt in java.library.path"
I tried to make a fragment bundle but cannot make the pieces to match... Tried with bnd, tried with eclipse. Need help from more experienced people.
I have been trying to use that with Apache Karaf, so it would be excellent if you can make that work with Karaf 2.3.1
If you know how to do it with Eclipse RCP 4.2 then please help!

First of all this isn't a Karaf specific issue, you might want to start with a unit test first, using pax exam. For your issue you need to make sure the native libs don't have dependencies to each other.
You might be interested in the following links.
http://robertvarttinen.blogspot.de/2008/12/bundle-nativecode-in-osgi-manifest.html
http://holistictendencies.wordpress.com/2011/03/28/bundle-nativecode-using-platform-specific-dlls-from-osgi/
Load DLL (using JNA) inside an OSGi bundle

Related

Run Xamarin android unit tests for result

I had a question regarding the Test APK topic.
Is there a way to use the tests/RunApkTests.targets and
build-tools/scripts/TestApks.targets
files. so I can reuse the targets to run my own android unit tests and get results as part as our continuous integration?
I tried using the NUnit Tutorial with no success. I also created an issue here but I kept researching and found some potentially useful targets there.
I'd rather use these targets through a nuget package as opposed to manually downloading the target files and their associated files.
Any suggestions?
Thank you for your time!

Mule - Updating third party library in runtime

I'm using Mule Server 3.8 EE which brings commons-lang 2.4 with it. A third-party library in my project needs commons-lang 2.6, because it uses a method that was introduced in this version.
So when I just start my application, I get a java.lang.NoSuchMethodError
Is there a way to update the dependency in the runtime? What I tried so far:
including commons-lang 2.6 in my app -> no effect, the one from the runtime is picked up first
replacing the jar directly in the runtime -> errors in studio, that the 2.4 jar is missing
so maybe i am late BUT -- this is your answer. Add the libraries that are newer in the jar distribution to the Build Path. Under Java Build Path screen you should see the libraries listed. I needed to use Apache http-client 4.5.6 and that's very interesting because it brings with it a lot of other dependencies, so your question was VERY relevant. The solution is to rely on JAVA (and not mule -- oops Anypoint or whatever) conventions and make sure the JVM loads my class files first. Then, it won't load the old ones from mule's jar. And so I went to the tab Order and Export, and moved Mule to the bottom. This simple, trivial change makes it work. I think if we would work with command line and vim, we would all know this. But all the IDE gui and everything else makes us forget the simplest things. Please use it in good health. :)

Twitter-Bootstrap 3.3.7- Getting Started

I'm stumped. I cannot understand the getbootstrap.com Getting Started info. I'm running on Windows 7 Pro. I would like to use Pingendo - which I'm new to - to create my website.
I downloaded the distribution version bootstrap-3.3.7-dist.zip (pre-compiled) and unzipped it. Then I came to the MaxCDN code. Where do I put that code??
For the source code version, I see references to things I don't know about: Bower, npm, Composer, Grunt, Less, and SASS. All these appear to be Linux based tools - from the command lines shown. How does one accomplish the same thing under Windows without installing yet more tools? Do I even need to compile this code to use the greater features?
You can either add the downloaded bootstrap css and js files to your project and reference them or you can just use the cdn which is just the same files hosted on a server. You do now have to know about any of those to get started with Bootstrap. They are just additional ways to install it, and different preprocessors that you can leverage.

Eclipse 3.7 RCP Application with multiple plugins

What is the right way to make an RCP application that is “ready for plugins”? I have struggled to do this basic concept and am trying to accomplish this in Eclipse 3.7 (latest 3.x version).
Step 1
I would like to explore this by using 3 eclipse plugin projects:
• HelloWorldRCP
• HelloWorldPluginA
• HelloWorldPluginB
Would it make sense to make HelloWorldRCP with all the common things such as a menu-bar with an Edit menu including cut, copy and paste menu items? The HelloWorldPluginA could add an additional menu-item called “Alpha” and HelloWorldPluginB could add yet another menu-item called “Beta”? However, the cut, copy and paste functionality could still work within Plugin A and B?
Step 2
Next, how do I deploy this as a “product”? I have made a new product configuration and defined the dependencies from the default runtime configuration that was made. I do notice that there are a lot of dependency jars that are included, but I don’t think I use them. For example, I don’t use data-binding to my knowledge, but it keeps coming up as a required dependency.
I go to Export | Eclipse Product and an executable environment is created in my desired folder. However, when I copy this to another machine it seems to keep referencing the original machines Java installation location. How does one get around this?
I have tried to bundle a jre with the Product Export but nothing is created. I have also just tried copying my jre6 as a jre folder. This does seem to work.
Next problem here is the 32/64 bit Java execution environments. What is advised here? I have been aiming to build on 32 bit only and then hopefully that will run on 32 or 64bit platforms. Is this correct?
Step 3
I need to web-start this now. The old way of initiating an Eclipse 3.5 application, using a startup.jar has changed. I now use the equinox launcher and reference it in the jnlp instead of the startup.jar. However, I keep getting an exception which seems related to the 32/64 bit equinox win32_64 jar. I notice that the export writes a folder and not a jar. I read somewhere that this is a “clever trick” to allow compatibility for both 32 and 64bit runtime environments.
The problem here is that I need a jar and not a folder so that I can sign the jars required and deploy accordingly.
Does anyone have a Java Web-start example for and Eclipse 3.7 RCP application? Or any advice?
You are going to need a lot of time to learn everything you've asked about here.
Here is one of the best places to start... http://www.vogella.com/eclipse.html
That site covers a lot of basics. But you need a little more than basics.
The best example of a working RCP product with some of the features you require can be found at ... http://max-server.myftp.org/trac/mp3m
This guy (Kai) makes all of the source code available via SVN, and he has some very advanced stuff going on in his application. He also has a good blog with some advanced RCP tips and tricks. http://www.toedter.com/blog/
Another thing you'll want to investigate is Tycho. I realize that you didn't mention anything about building your application, but I've found that using Tycho for building has made my most recent foray into Eclipse RCP 100 times better than the other times I've done RCP work. So, my advice, get to know Tycho. http://wiki.eclipse.org/Tycho/Reference_Card
The learning curve of Eclipse RCP is somewhat steep, but I think it's worth the effort.
Good Luck!

Deploying Qt QML-based application on OSX (with WebKit)

We wrote an application that makes heavy use of QML, and now that it's time to try to deploy it I'm running into really irritating issues because of the reliance on QtWebKit
I compile the application and everything works fine on my computer. Then I run the macdeployqt script on the .app, and for whatever reason the WebView QML component is saying: "Module QtWebKit is not installed"
What is the proper way to deploy a QML-based application on OSX that relies on QtWebKit/WebView?
macdeployqt doesn't handle the QML import plugins yet:
http://bugreports.qt-project.org/browse/QTBUG-14342
You can do it manually (e.g. for QMLViewer):
1) Copy the plugins you're interested in from the $QTDIR/imports directory into $QTDIR/bin/QMLViewer.app/Contents/MacOS, so that there's e.g.
QMLViewer.app/Contents/MacOS/QtWebKit/qmldir
2) Fix the references of the import plugin to the Qt frameworks using install_name_tool:
install_name_tool -change /path/to/qt/*lib/QtCore.framework/Versions/4/QtCore #executable_path/../Frameworks/QtCore.framework/Versions/4.0/QtCore QMLViewer.app/Contents/MacOS/QtWebKit/libqmlwebkitplugin.dylib
Do the same for the other Qt libraries that the plugin depends on (at least QtGui).
More info on fixing references can be found in http://doc.trolltech.com/4.7/deployment-mac.html
MartinJ's answer gave me a hard time.
For those who use Qt Quick 2 - use QtWebkit from folder $QTDIR/qml instead, or you're going to have a lot of messages that plugin qtwebkit does not implement qqmltypesextensioninterface.