Skip to content

Part 1: Getting Started with Parsers

JEB Plugin Development Tutorial part 1/8

The JEB API provides the ability to develop parser plugins (referred to as parsers) for any file type. All native JEB plugins use that same API.

A parser can process binary data, textual data, or even the output of other parsers, which is the case for debugger or decompiler plugins.

This series of tutorials will help developers understand the major features and organization of the JEB API, and will guide them through the development of their own parsers and plugins. We will use the official front-end - the UI client - throughout this series, although extensions development is in no way constricted to the use of a particular front-end.

Load a parser#

There are two ways to load plugins.

Release model#

Copy the jar plugin to your plugins folder. You can configure your plugins folder via the Edit, Options menu (or Preferences on Mac). Refer to that section for additional details.

If you are using third-party (aka, non native) plugins, the release model is easy to use. For example, head over to our GitHub account. You will find a few open-source parsers, such as an Android OAT parser. Instead of compiling them from source, you may decide to use the pre-compiled jars, available in the release section.

With the release model, the classname is defined in the Jar manifest. There is nothing to configure in the options.

If you have a jar plugin that you would like to use, simply drop it in the plugins folder. Then, restart JEB. Your plugin will be automatically loaded.

Development model#

In that case, you need to specify the classpath of your plugin, as well as its classname (that is, the fully-qualified name of the plugin class, as we will describe later). You can modify these options in the same dialog box, in the Development tab:

The development model is ideal when actively developing a plugin, and dealing with compiled Java classfiles that have not been packaged yet.

Check if a parser is loaded#

As we explained earlier in this guide, You can check if your parser is loaded by opening the parsers dialog:

Note that you may also disable parsers, by ticking or unticking the checkbox in front of the parser type.

Develop a new parser#

JEB plugins are developed in Java. We recommend you to use the Eclipse IDE for plugins development.

  • Create a new Java project

    • In Eclipse: File, New, Java Project - use the default settings
  • Add the API to your project. The API can be included by adding the Jar reference to your build path

    • In Eclipse: right click on your project, select Build path, Add external archives. The API file is contained in the JEB application under bin/cl/jeb.jar.
  • Link the javadoc to jeb.jar: it is located in doc/apidoc.zip

    • In Eclipse: right click on your project and select Build path, configure build path. Expand jeb.jar and edit the javadoc location
    • Set the Archive path textbobx to point to your apidoc.zip file
    • Set the Path within Archive textbox to reference
  • Create a new class that implements IPlugin: it will be the entry point of your project.

    • In Eclipse: the project is automatically compiled in a bin/ directory

For example:

package com.jeb.sample;

import com.pnfsoftware.jeb.core.IPlugin;  // simplest plugin type

public class SamplePlugin implements IPlugin {
    @Override
    public IPluginInformation getPluginInformation() {
        return new PluginInformation("Sample", "Description", "PNF Software", Version.create(1, 0));
    }
}
  • Open JEB and add your project bin folder to the Plugin Classpath entries and add the classname: com.jeb.sample.SamplePlugin.

  • Restart JEB, you should see a message in the Logger panel: Development plugin loaded: class com.jeb.sample.SamplePlugin

This means that your project is correctly configured and that you can start the development of your plugin!