By Glauber Costa
Don Marti and I will soon be presenting OSv at JavaOne. We are excited about the conference, and thought we could give you a small preview of what we will be talking about.
As you already know, OSv is at the same time an operating system, and a library. It is as functional as an operating system, and as invisible as a library. This means that you shouldn’t really install your app into OSv, but rather, merge them both naturally as a single entity.
If you are using Java, there is a huge chance that one way or another, your project is built through Apache Ant, or similar tool.
If you have Capstan, our image building tool, that merges nicely and beautifully with your Ant-based build process. Here is how:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
The snippet above assumes that you already have a “jar” target in your build.
As you can guess from the image name, this example is a simple HelloWorld. The code, together with the complete build.xml file, can be downloaded on GitHub.
Adding that step to your existing build environment, allows you to have a first-class VM in a format consumable by QEMU/KVM. Booting in your hypervisor of choice, becomes just a matter of editing the file for the correct format.
And after that? Fire up Capstan and enjoy your VM!
1 2 3 4 5
Alternatively, boot the HelloWorld.qcow2 image that was copied to the local directory, with any tool you want.
Are you attending JavaOne? We will show you this and more, at Parc 55 – Powell I/II, Tuesday the 30th (12:30 PM)