Skip to content

Porting Java applications to OSv

tzach edited this page Nov 9, 2014 · 8 revisions

The easiest way to Port a Java application to OSv is using Capstan.

You can use the following example as a starting point.

Using a ready Java enable OSv VM

  1. Build JVM & CLI image first
make image=java,cli
  1. Run OSv instance
./scripts/run.py -n
  1. Upload new .jar file
curl -X POST http://192.168.122.89:8000/file/js.jar [email protected]
  1. Change cmdline to run .jar file
curl -X POST -d cmdline="java.so -jar js.jar" \
http://192.168.122.89:8000/os/cmdline
  1. Reboot OSv instance
curl -X POST http://192.168.122.89:8000/os/reboot


### Troubleshooting
In case your Java application goes outside the JVM and uses system calls, it might fail on a missing symbol or a system call.
We will publish a short guide on how to solve these issues soon.
 
Clone this wiki locally