EclipseSource News

Memory management in J2V8 has never been easy. Because J2V8 bridges V8 and Java, three different memory models are in play. Both Java and JavaScript provide a managed memory model with their own GC. JNI / C++ which sits in the middle is completely unmanaged. This leads to a complex situation since both JavaScript and Java will free memory if they think it's unused, but...

Read More

When J2V8 was first released, all callbacks from JavaScript to Java required a registered Java method. That is, all Java methods that you wished to invoke had to be first registered with J2V8. For some applications this was fine, but it made for a complex programming model. Furthermore you could not use anonymous inner classes or Java 8 lambdas. With J2V8 4, this has changed. J2V8...

Read More

Last week I finally published the Node.js bindings for Java. These bindings allow developers to embed the Node.js runtime directly onto the JVM through the Java Native Interface. In March I gave a pre-release presentation at EclipseCon on this work, which was recorded by InfoQ. You can check it out at: https://www.infoq.com/presentations/node4j-nodejs-java. The slides are also available on SlideShare....

Read More

When J2V8 was first released, all Java characters passed between Java and V8 were converted to 8bit C-Style strings. For many applications this was just fine, but if your JavaScript contained 16 bit Unicode characters, then you were hosed. https://twitter.com/waynebeaton/status/757609271496286208 With J2V8 4 this has been fixed. All strings are now referenced as uint16_t in C++. Using the JNI API we were able to get the 2 byte string...

Read More

When J2V8 was first released, all Java characters passed between Java and V8 were converted to 8bit C-Style strings. For many applications this was just fine, but if your JavaScript contained 16 bit Unicode characters, then you were hosed. https://twitter.com/waynebeaton/status/757609271496286208 With J2V8 4 this has been fixed. All strings are now referenced as uint16_t in C++. Using the JNI API we were able to get the 2 byte string...

Read More

J2V8 provides the technology to link V8 and Node.js with the JVM. Using JNI, Java developers can directly call V8 and Node.js APIs. This seamless integration brings improved JavaScript performance, NPM modules and the Node.js APIs to the Java ecosystem. An alternative approach could have been to invoke two separate processes (Java and Node.js) with a service protocol between them. However, one of the advantages of the single...

Read More

After over a year of development, I am very excited to announce that J2V8 4 is publicly available on all supported platforms. J2V8 is a set of V8 bindings for Java. This means that you can embed V8 (Google's ultra fast JavaScript engine) into your Java applications. J2V8 4 is built on Node.js, which means you can also integrate Node.js with the JVM (On Windows, Mac and...

Read More

REST APIs that serve their content via HTTP have limited options for authentication. One of these is request signing. With a little bit of custom specification the standard approach HMAC can be utilized for efficient and secure authentication. In my last blog entry I explained an approach for using API Keys in a REST API. This approach has a significant drawback, which comes from the necessity...

Read More

In the last years we have been heavily using JSON Schema, a web standard to describe JSON instances/your data in web applications. For example in the JSONForms project we make heavy use of JSON Schema. JSONForms is an AngularJS-based framework to simplify the creation of forms for data entry and edit in web applications. It allows you to declaratively define the content and layout of a form and to embed...

Read More

With the release of Eclipse Neon, we are proud to announce that RAP 3.1 is released and available for download. Incidentally, just yesterday RAP celebrated its 10th birthday since creation review! We'd like to take this opportunity to thank our users, committers and contributors, without whom this technology would not be what it is. On to the highlights of this release. New service interface ClientFileLoader Custom widgets often require their...

Read More