Applet development with Native Libs

Can anyone point me at a good advanced resource/book for multi-platform java applet development with native libraries (1.4-1.6 versions)?

I’m fairly familiar with applet development using “pure” java, but now it’s time when I have to deliver a product in a form of a java applet and it will have some native libraries written in C++… I’m interested in pitfalls and common practices of how I should organize my C++ code to make sure it will be picked up correctly on Windows, MacOS and Linux

Thanks a bunch!

I’m struggling to understand why you should need to do this - Graphics? (try JOGL or LWJGL) Input devices? (try Jinput)
I know that problems with applets and natives are common - just take a look at the JOGL threads to see some of the issues…

Basically just go and look at the source for, say, LWJGL and see how that’s laid out. Though as SimonH says, unless you’ve got a vast pile of legacy C++ you want to make use of, there’s probably no point at all in writing any more, just do everything you can in Java.

Cas :slight_smile:

Well, the native part is a combination of high performance math libraries and some legacy code (it works and we really dont want to rewrite in Java due to the time constraints), it’s not related to graphics.
Native libs are still a necessity for heavy computation stuff where Java (no pun intended) would consume too much memory and constantly will be hitting GC (even using best practices of object pooling, etc)…
Everything that can be written in Java will be written in Java, the rest will be in C++ (sorry guys)…
I’ll look at LWJGL sources (tnx for the idea!), I also would like to know if someone actually made a book/articles about best/correct ways of working with applets and satellite native libs in multi-platform universe…

Thanks

You should bundle your application in an jnlp-extension and use the next gen java plugin (https://jdk6.dev.java.net/plugin2/jnlp/) or the JNLPAppletLauncher to start your app https://applet-launcher.dev.java.net/

[quote=“tau,post:4,topic:31699”]
Might it not be better to write the GUI native as well? I’m pure java and I shrink from the thought of a reliable crosstalk between applets & natives… is there a really good reason to use applets? Must the GUI run in a browser or something? JNLPAppletLauncher would certainly be the route to take if so.
I’m the biggest java fan ever but I’m not sure java’s the right solution here - when dependent on platform-specific code java’s WORA advantages become meaningless. It’s easy to knock up a GUI in visual studio, so I’d get windows solid using that then look at options on linux & mac - better to have known issues on the minor platforms than have unexpected (& possibly ongoing) java library issues on the PC.

Java is a tool, not a religion :wink:

Cylab, thanks a lot for the link! It looks very close to what i’m looking for… Seems like I might use the same smooth approach as JOGL does when loading OpenGL into applets…