如何最好地将UNC文件路径添加到Java类路径 [英] How best to add UNC file paths to a Java Classpath

查看:147
本文介绍了如何最好地将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>

这篇关于如何最好地将UNC文件路径添加到Java类路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆