Java linux:一个简单的linux脚本正在屏幕上显示一些组件

Java linux:一个简单的linux脚本正在屏幕上显示一些组件,java,linux,Java,Linux,当我运行一个脚本来执行一个java应用程序时,出现了这个屏幕 sh Joii.sh Usage: java [-options] class [args...] (to execute a class) or java [-options] -jar jarfile [args...] (to execute a jar file) where options include: -d32 use a 32-bit d

当我运行一个脚本来执行一个java应用程序时,出现了这个屏幕

sh Joii.sh

Usage: java [-options] class [args...]
           (to execute a class)
   or  java [-options] -jar jarfile [args...]
           (to execute a jar file)

where options include:
    -d32          use a 32-bit data model if available

    -d64          use a 64-bit data model if available
    -server       to select the "server" VM
                  The default VM is server.

    -cp <class search path of directories and zip/jar files>
    -classpath <class search path of directories and zip/jar files>
                  A : separated list of directories, JAR archives,
                  and ZIP archives to search for class files.
    -D<name>=<value>
                  set a system property
    -verbose[:class|gc|jni]
                  enable verbose output
    -version      print product version and exit
    -version:<value>
                  require the specified version to run
    -showversion  print product version and continue
    -jre-restrict-search | -jre-no-restrict-search
                  include/exclude user private JREs in the version search
    -? -help      print this help message
    -X            print help on non-standard options
    -ea[:<packagename>...|:<classname>]
    -enableassertions[:<packagename>...|:<classname>]
                  enable assertions
    -da[:<packagename>...|:<classname>]
    -disableassertions[:<packagename>...|:<classname>]
                  disable assertions
    -esa | -enablesystemassertions
                  enable system assertions
    -dsa | -disablesystemassertions
                  disable system assertions
    -agentlib:<libname>[=<options>]
                  load native agent library <libname>, e.g
                    see also, -agentlib:jdwp=help and -age
    -agentpath:<pathname>[=<options>]
                  load native agent library by full pathna
    -javaagent:<jarpath>[=<options>]
                  load Java programming language agent, se
    -splash:<imagepath>
                  show splash screen with specified image

-classpath
参数中有一个等号,但它需要空格

试一试

顺便说一句,当您提供类路径时,您不需要导出它,当它被导出时,您也不需要提供它。所以在你的情况下,这也应该起作用

    java com.tata.topListQuoteSamples.TOPLISTSample

正如评论员所说,问题在于调用
java
命令的方式,shell脚本还可以。因此,请先手动尝试。

您以错误的方式调用了java。试着先手动操作。在你的类路径上不应该有equals操作符
java-classpath$classpath com.tata.topListQuoteSamples.TOPLISTSample
java -classpath $CLASSPATH com.tata.topListQuoteSamples.TOPLISTSample
    java com.tata.topListQuoteSamples.TOPLISTSample