Can someone tell me how to make a symbolic link (just like MKLINK does) and / or remove the symbolic link from Java. I found solutions that use Java as a shell and use their own Windows program to run this program, but I really want a clean solution for Java. Thank you in advance!
Starting with Java 7, you can easily do this with the NIO package.
Path target = Paths.get("target"); Path link = Paths.get("link"); Files.createDirectory(target); Files.createSymbolicLink(link, target);
, . unit test eclipse , ( , cmd.exe)
cmd.exe
, , Unix- .
Windows :
, .. . WMI. WMI java, , JaWin, Jinterop, Jintegra WMI script JScript o VBScript, Java.
subst, . Unix.
subst
. . ( INI). , java. , .