Java 将custome utility JAR添加到Windows系统路径

Java 将custome utility JAR添加到Windows系统路径,java,windows,jar,path,Java,Windows,Jar,Path,是否可以将实用程序jar添加到窗口的系统路径 我的findclass.jar是一个可退出的jar,位于我的C:\目录中。 如果打开cmd.exe,请将目录更改为C:\,然后键入: java-jar findclass.jar\path\tojar.jar类的名称 它将在另一个jar中搜索给定的类。 如何将findclass.jar添加到窗口的系统路径中,这样就不需要将目录更改为C:\? 我尝试了set path=C:\;%PATH%和设置PATH=C:\findclass.jar;%路径% 但我

是否可以将实用程序jar添加到窗口的系统路径

我的
findclass.jar
是一个可退出的jar,位于我的
C:\
目录中。
如果打开cmd.exe,请将目录更改为
C:\
,然后键入:
java-jar findclass.jar\path\tojar.jar类的名称
它将在另一个jar中搜索给定的类。

如何将findclass.jar添加到窗口的系统路径中,这样就不需要将目录更改为
C:\

我尝试了
set path=C:\;%PATH%
设置PATH=C:\findclass.jar;%路径%

但我得到了
错误:当我试图从另一个目录执行jarfile findclass.jar时,无法访问它


无法将.jar文件添加到路径中吗?

将其添加到CLASSPATH环境变量中

仍在获取
错误:无法访问jarfile findclass.jar
>set classpath=C:\findclass.jar;%CLASSPATH%>java-jar findclass.jar\path\tojar.jar nameofclass.class
仍然会导致
>错误:无法访问jar文件findclass.jar
,除非我将cd插入C:\