Minor Update - 25th April 06
Fixed some issues with #define usage within namespaces and with single character defines

Mailing list problems
Sorry that the mailing list has been down so long, and apologies to anyone frustrated trying to use it. It's been down since our server move, and I haven't had much time to sort these things out. Hopefully it'll be back in action in the next week or so.

Minor Update - 12th April 06
Fixed a few propblems with the parser, and updated the runtime libs slightly

JavaOSG update - 11 April 06
Tree just posted an update to JavaOSG, our Java bindings for the Open Scene Graph graphics library, generated with NoodleGlue. This update supports the final 1.0 version of OSG.

Server move 28th-30th Nov. 2005
NoodleGlue will be moving server at some point in the next few days (28th, 29th or 30th of November). The Subversion server has already been moved to the new machine, but DNS etc. has not been updated yet, so please do NOT check anything into subversion until we announce the move is complete - you will lose your changes. Thanks for your patience.

Minor Release - 8th August 05
Fixed a bug which prevents some methods being generated in non-namespaced classes.
Also (hopefully!) the tools now buildable and runable on Linux.

New Release - 18th July 05
Another release! This includes improved support for non-namespaced types; fixed bugs in enum value declarations and even added an example with enumerations and #defines!

New Release - 11th July 05
A new version has been uploaded which fixed a few compile problems on Linux and also fixed a couple of bugs in the code generator

Article in C/C++ Users Journal
There's an article about NoodleGlue in the July issue of the C/C++ Users Journal. It gives a brief overview of how the binding process works, and examples of how to generate your first simple wrappers.

First light!
Initial open-source version 0.8 is released on 13th June 2005. Source and binary downloads are available here


Bridging the divide between C++ and Java

During the development of the Noodle Heaven interactive music platform, it was necessary to create an advanced solution for automatically wrapping C/C++ class libraries in JNI code for access from Java. We needed a system more powerful and feature-rich than existing solutions. In Java, we needed to work within the JavaBean specification and we therefore wanted to increase the usefulness of C/C++ objects in Java by making them more JavaBean friendly. We also wanted to be able to directly subclass C++ classes in Java and be able to pass references freely back and forth across the Java bridge. The result was "NoodleGlue", a JNI wrapper generator and runtime library which we think is more flexible, efficient and more feature-complete than other wrapping solutions.

Now we're releasing NoodleGlue to the open source community.

This website is currently a little rough around the edges, but we thought it was more important to release the code than to worry about making a fancy website. Hopefully the site will start to look a bit better and become more complete over the next weeks. Similarly, documentation for NoodleGlue is a bit sparse but we've set up a mailing list where you can ask about any problems, and with your help we hope to release improved documentation soon. Any contributions to the documentation, or build files for other platforms will be very gratefully received.

NoodleGlue architecture

What does it do ?

NoodleGlue is a system which generates the source code necessary to create Java "wrapper" files which mirror your C++ classes. The NoodleGlue generator applications create several types of source file, both Java and C++, which must be compiled along with your application. At runtime your application will use a runtime library which will be automatically loaded whenever you use one of the bridged classes.

The diagram to the right shows a very simplified view of where the generated NoodleGlue code sits between your C++ and Java code. In reality, the NoodleGlue "Java Bridge" is made up of several complex layers which work together to provide near-seamless integration between Java and C/C++.

Main Features

  • Far quicker and more reliable than manually writing painful JNI code. Using NoodleGlue can save months of laborious and error prone coding - we do the tedious work for you.
  • Much more complete and flexible than alternative wrapping technologies such as SWIG, and much more applicable to legacy code than GCJ.
  • Almost all compatible features of C++ can be mirrored in Java, including templates, enums etc.
  • References to Java objects may be passed to C++ code which can treat them exactly like a native C++ object (calling methods etc)
  • C++ classes may be subclassed in Java, and used in C++ with complete flexibility - for instance a Java class may override a method of a C++ class, and the new object can be passed as a parameter to C++ code, which will use the overriding Java method.
  • The inheritance hierarchy is maintained - even multiple inheritance of pure abstract classes in C++ is translated into multiple interface declarations in Java.
  • Extremely low execution overhead - in most cases the code generated is much more efficient than hand generated code. There is virtually no overhead imposed upon objects above the unavoidable JNI code required when traversing from one language to the other.
  • With C++ code that uses reference counting rather than manual deletion of objects (or can be adapted to do so) almost all memory management is automatic.
  • Custom translation modules allow optimisations for very efficient bridging and caching of complex types.
  • Optional automatic recognition of Java patterns such as "get" and "set" methods, which allows automatic enhancement of the code by adding support for Java conventions such as Property Change events etc.
  • "HyperWrapping" allows additional methods to be added to the Java proxies without subclassing, and with no overhead.
click here for a more detailed feature list.

Noodleglue in the field

To see NoodleGlue in action, have a look at our "Noodle Player" application. Noodle Player uses wrappers generated by Noodleglue to create Java versions of OpenGL, OpenSceneGraph and our own native audio libraries as well as several other open-source C++ libraries. This is a complex multimedia application with a high degree of interaction between Java and C++.

Or look directly at the code generated for the OpenSceneGraph Java bindings, we have released the NoodleGlue generated bindings as JavaOSG.


The NoodleGlue applications (NoodleGlueParser and NoodleGlueGenerator) are licensed under the GPL license. The NoodleGlue runtime and any code you create with the tools are free for use in your own applications without restriction.

Powered by magnolia – www.magnolia.info
J2EE Content management system based on JSR-170