Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/unix/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/sql-server-2008/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 无法从属性文件中读取_Java_Unix_Properties_Jar - Fatal编程技术网

Java 无法从属性文件中读取

Java 无法从属性文件中读取,java,unix,properties,jar,Java,Unix,Properties,Jar,我有一个java应用程序,在eclipse中运行和直接从jar运行时都可以正常工作 当从另一个jar(2.jar)中的另一个类(2.class)访问我的jar(1.jar)中的一个类(1.class)时,会发生错误“读取属性文件失败”,inturn是通过shell脚本调用的。我尝试在脚本中显示类路径,并将放置属性文件的路径添加到类路径中。知道为什么吗 Shell脚本-->2.jar-2.class-->1.jar-1.class属性文件在哪里?在1.jar中还是在文件系统上?这可能是权限问题吗?

我有一个java应用程序,在eclipse中运行和直接从jar运行时都可以正常工作

当从另一个jar(2.jar)中的另一个类(2.class)访问我的jar(1.jar)中的一个类(1.class)时,会发生错误“读取属性文件失败”,inturn是通过shell脚本调用的。我尝试在脚本中显示类路径,并将放置属性文件的路径添加到类路径中。知道为什么吗


Shell脚本-->2.jar-2.class-->1.jar-1.class

属性文件在哪里?在1.jar中还是在文件系统上?这可能是权限问题吗?另外,你确定它的路径是正确的吗?要不要共享一些代码?我怀疑属性文件不是你的程序所期望的。属性文件位于我放置1.jar的同一目录中。是的,路径是正确的