似乎无法运行jar文件 [英] cannot seem to run jar file
问题描述
如何使用tsch脚本在Unix环境中设置类路径。我尝试按以下方式设置路径,但会给我错误
How do i set the classpath in a unix environment using tsch script. I try to set the path as follows but it gives me errors
setenv CLASSPATH $ CLASSPATH:路径,但在$(/)中说-Bad:修饰符不起作用。我不明白为什么我不能设置此类路径。由于这个原因,我无法按我的意愿运行我的.jar可执行文件,而我的时间已用完。当我尝试运行.jar文件时,出现以下错误
setenv CLASSPATH $CLASSPATH : path but it doens't work saying -Bad : modifier in $(/). i dont understand why i cannot set this class path. Due to this i cannot run my .jar executable as i want to and i am running out of time. When i try to run the .jar file it give s me the following error
新错误...当我尝试运行jar文件以及我的jar文件实际所在的路径,这是我收到的错误
new error...it shows this when i try to run the jar file along with the path to where my jar file is actually located and this is the error i receive
Error occurred during initialization of VM
java.lang.Error: Properties init: Could not determine current working directory.
at java.lang.System.initProperties(Native Method)
at java.lang.System.initializeSystemClass(System.java:1070)
推荐答案
听起来这里至少有两个问题:
It sounds like there are at least two issues here:
1)setenv CLASSPATH $ CLASSPATH:路径,但说-Bad
:$(/)中的修饰符不起作用。
1) setenv CLASSPATH $CLASSPATH : path but it doens't work saying -Bad : modifier in $(/).
这听起来像是 tsch错误,调用 setenv,而 $ CLASSPATH的值不正确。看看您的$ CLASSPATH(或在此处发布):问题应该很明显。
This sounds like a "tsch" error calling "setenv" with a bad value for "$CLASSPATH". Take a look at your $CLASSPATH (or post it here): the problem should be apparent.
2)VM初始化期间发生错误
2) Error occurred during initialization of VM
这是因为您还没有拥有类路径。但是,修复您的 setenv()语法不一定能解决 java init问题-我们只需要一次将其迈出一步。
This is because you don't have a classpath yet. But fixing your "setenv()" syntax might not necessarily fix the "java init" problem - we'll just have to take it one step at a time.
请发布 echo $ CLASSPATH
的值,然后将之前的值尝试为 setenv。这应该可以帮助我们解决问题1)
Please post the value of echo $CLASSPATH
, the value before you try "setenv". That should help us fix problem 1)
这篇关于似乎无法运行jar文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!