如何最好地将UNC文件路径添加到Java类路径
问题描述:
是否使用Java(1.4)在类路径中使用Windows UNC文件位置(\\服务器名\文件存储\等)?
Using Java (1.4) is there a way in which to use Windows UNC file locations (\\servername\filestore\etc) within the classpath?
答
基本上,您只需要将反斜杠换成正斜杠即可:
Basically you just need to swap the back slashes with forward slashes:
java -classpath '//servername/filestore/etc;.' <classname>