As most of you are aware, haiku's nightly builds provide a nice vdmk with a blank BFS partition you can mount. Unfortunately, this will leave you with a main drive with just about 84 megs, and a /Blank_BFS mount point. My suggestion is to first create a blank vfs drive in VirtualBox, mount it as a secondary drive in your haiku virtual machine. Once you start up haiku, go to applications, and use the DriveSetup utility.
Then use the installer to install haiku to that drive. Then just shut down, and remove the haiku-image.vdmk from the virtual machine. I know this is a rather short tutorial, but its worth considering if you want room to tinker properly.
Thanks to the hard work of hamish during google's summer of code 2012, there is now a mostly stable port of the OpenJDK for haiku. During his most recent entry he posts a link to the binaries, containing his work through august. I'm not sure how long that archive will be available on his dropbox so i've mirrored it here just in case.
Now to make instalation rather easy, i've prepared this small script.
OR BE REALLY LAZY..
Unfortunately that script only takes you part of the way, and i'd rather not have it modify your SetupEnvironment file, thats best done manually. So for the next step you should do the following.
Now find the section that looks like this
and make the following modifications..
Trust me, its so worth updating your SetupEnvironment script if you want to be able to run java apps the lazy way "java -jar" without setting up the environment manually on every boot. Once you have made the modification, reboot haiku to make sure it loads on start up. After you've finished starting up, open a terminal and test java.
If all went according to plan, you should be good to go