How to make a symlink in Java/JVM when running in Linux? Are there any other ways to this than using Java Native Interface (JNI) or java.lang.Runtime.exec("/bin/ln -s /some/path symlink")
?
Creating a symlink is very platform dependant, but I mostly care about running on Linux, nice bonus would be if a shortcut would be created in Windows.
Runtime.exec()
, then make sure to use the version that takes an array, or you get nasty suprises. Also, follow the advice here: javaworld.com/jw-12-2000/jw-1229-traps.html – Pectoral