Over a million developers have joined DZone.

Enhanced Javeleon Plugin for Upcoming NetBeans IDE 7.2

DZone's Guide to

Enhanced Javeleon Plugin for Upcoming NetBeans IDE 7.2

· Java Zone ·
Free Resource

Download Microservices for Java Developers: A hands-on introduction to frameworks and containers. Brought to you in partnership with Red Hat.

The Javeleon plugin for NetBeans IDE has been around for a while now.

It permits for easy installation of Javeleon, easy setup for a range of pre-defined project types, including NetBeans Platform applications, Java SE projects and Maven-based NetBeans Platform application projects.

While it has always been our intention to make it as easy to use as possible, there are some minor annoyances in the current plugin for NetBeans IDE version 7.0+. In the following short paragraphs I’ll explain the root cause of these annoyances. Then I’ll introduce you to the plugin in the works for the upcoming NetBeans IDE 7.2 that resolves all of these.

Why do the JVM suddenly crash during startup with Javeleon?

Some of our users have experienced that the JVM crashes during startup when using Javeleon. They may have been running with Javeleon for a long time, but after updating their JDK-version, Javeleon refuses to startup. The reason is that Javeleon, at the first startup, creates a version-specific bootstrap cache that it uses to speed up the startup for all subsequent runs. This cache is stored in the default OS temp dir. That is why we told you to add a specific "JaveleonBoot/myBootFolder" as part of the bootclasspath vm argument (or for those of you who don't know what I’m talking about, that's probably because the Javeleon plugin will automatically add this information to project metadata when you add Javeleon to a project). When developers report a vm-crash during startup, we always ask them to clear the Javeleon boot cache which in more than 9 out of 10 occurrences resolves the issue.

Help, my JVM crashes without of heap or perm gen!

Javeleon increases the memory footprint of applications due to bytecode transformations that permits dynamic class reloading. Therefore, it may happen that the VM runs out of memory. The cure is to manually increase memory with –Xmx or the –XX:MaxPermSize VM option. While increasing the memory resolves the issue it is suboptimal that these settings must be added to the permanent project metadata.

How does the new Plugin help me?

In the upcoming NetBeans IDE 7.2 release, the core NetBeans engineers have created an infrastructure enabling additional arguments to be passed to the VM. The new Javeleon plugin utilizes this new infrastructure to allow developers to change JDK-version without the need to worry about the Javeleon boot cache. In essence, you just need to right-click the project and choose properties. Then you end up with the following screenshot which shows how the new plugin operates and what kind of additional JVM arguments you can pass running Javeleon for each specific project.

Javeleon options pane


It will provide all the relevant details about the Javeleon installation. First of all the status of the license is shown (remember that Javeleon is FREE for both non-commercial and commercial purposes).

The most important option is the “Enable Javeleon for this Project”. With a single click you are ready to go dynamic!

With the plugin you can also enforce the usage of the server Hotspot compiler, which is by far better at optimizing the additional Javeleon bytecode.

Likewise, there are options to override the project memory settings for Javeleon usage. 

Likewise, there are options to override the project memory settings for Javeleon usage.Remember that all of this does not require changing one bit of metadata in the project. BTW, if you haven’t already tried out Javeleon 2.0 RC please don’t hesitate to give it a spin. Just add http://javeleon.org/javeleon-for-netbeans-7.2/ as an update center in one of the recent nightly builds of the IDE. The current plugin for NetBeans IDE 7.0 and 7.1 branches also contain 2.0 RC. Just change the version part of the above URL to fit your IDE version (i.e. 7.0 for NB IDE 7.0 and 7.0.1, 7.1 for NB 7.1 and 7.1.1).  Have fun with Javeleon, and please report any issues to support@javeleon.org.

Download Building Reactive Microservices in Java: Asynchronous and Event-Based Application Design. Brought to you in partnership with Red Hat


Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}