Over a million developers have joined DZone.
Platinum Partner

Getting Started with the Lobo Java Web Browser's Sources

· Java Zone

The Java Zone is brought to you in partnership with ZeroTurnaround. Discover how you can skip the build and redeploy process by using JRebel by ZeroTurnaround.

Maybe you want to contribute to the Lobo browser's source code. Alternatively, maybe you want to create plugins for Lobo, as outlined in the last few days, such as in the recent article entitled How to Add Syntax Coloring for XML in the Lobo Java Web Browser. Either way, you're going to want to download the sources and work with them. Here's an outline of what that entails.

If you are using Eclipse, the Lobo site provides everything you need, right here. However, if you're using NetBeans IDE, there's currently no document showing you what to do once you've downloaded the browser's sources. These you can get from the site's CVS repository, as explained here. Now, let's assume you've downloaded the sources, what next? Here is an outline:

  1. Import the Lobo Sources. In the New Project wizard (Ctrl-Shift-N), choose Java | Java Project with Existing Sources. Under "Source Package Folder", browse to the location where you downloaded the sources. There, select the following folders (i.e., multiple folders):
    • XAMJ_Project/Primary_Extension
    • XAMJ_Project/HTML_Renderer
    • XAMJ_Project/Platform_Core
    • XAMJ_Project/Platform_Public_API
    • XAMJ_Project/Commons
  2. Set the Required Libraries. After you have completed the above task, right-click the Libraries node and add the following JARs from the Lobo download (i.e., these are not from the sources, but from the end-user's distro), in the ext folder:
    • cobra-no-commons.jar
    • js.jar
    • xpp3-
  3. Set the Required VM Arguments. Right-click the project node and choose Properties. In the Run tab, set these VM Options:

    -Dext.dirs=${lobo.dir}/XAMJ_Build/ext -Dext.files=${lobo.dir}/Primary_Extension

    Switch to the Files window and in the nbproject/project.properties file, define the lobo.dir property and check that the run.jvmargs property is correct. This is how they should be:

    run.jvmargs=-Dext.dirs=${lobo.dir}/XAMJ_Build/ext -Dext.files=${lobo.dir}/Primary_Extension

    If you need to play with these settings, you can just do so here in the project.properties file, instead of the u.i, because it is easier to do so, especially if you're changing properties a lot.

  4. Verify the Setup. First, check that the Projects window looks as follows, taking note of the fact that you have 5 source package folders:

    Next, make sure that this is what you see in the Files window:

    Finally, look in the project.properties file and make sure that the VM arguments are as specified above.
  5. Run the Browser. Right-click the project node and choose Build. Once the project is successfully built, choose Run. You should now see the browser, deployed like any other Java application in the IDE:

You might need to troubleshoot before step 5 can be successfully completed. One thing I did was to switch off the security manager (which is set in org.lobobrowser.main.ReuseManager), which is in XAMJ_Project/Platform_Core. In general, if you need to tweak anything, that's probably the module you'll need to be in. Bear in mind that the entry point for the application is there too, in the form of org.lobobrowser.main.EntryPoint. By the way, one thing I found is that I had to tweak the location of the icons that appear in the toolbar buttons.

With this, I hope you have all the info you need for getting started developing Lobo, either by directly extending the source code or by creating plugins. Another possibility is that you want to integrate some of the functionality in your own applications. Having the source code correctly set up is a great place to start.

The Java Zone is brought to you in partnership with ZeroTurnaround. Discover how you can skip the build and redeploy process by using JRebel by ZeroTurnaround.


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

{{ parent.tldr }}

{{ parent.urlSource.name }}