2

Is it even possible to start OpenVPN trough Java application? If it is possible what is the best way to do it so it's cross-platform and works on all platforms that have OpenVPN installed.

TheKarlo95
  • 1,144
  • 9
  • 17

1 Answers1

3

You can run openvpn with Java like this:

Runtime rt = Runtime.getRuntime();
Process pr = rt.exec("openvpn your_config.ovpn");

This will run openvpn via the command line. It is cross platform, too, as it will work on Mac, Linux and Windows.

Steampunkery
  • 3,839
  • 2
  • 19
  • 28