How run file .jar on CentOS 6.2
hi all!
i have hc.jar in root. i want run hc.jar but i have a problem: [root@centos ~]# java hc.jar Exception in thread "main" java.lang.NoClassDefFoundError: hc/jar Caused by: java.lang.ClassNotFoundException: hc.jar at java.net.URLClassLoader$1.run(URLClassLoader.java:217) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:205) at java.lang.ClassLoader.loadClass(ClassLoader.java:321) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294) at java.lang.ClassLoader.loadClass(ClassLoader.java:266) Could not find the main class: hc.jar. Program will exit. CentOS installed jdk: [root@centos ~]# java -version java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.6) (rhel-1.43.1.10.6.el6_2-x86_64) OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode) thanks! |
syntax
Its $ java -jar hc.jar
|
All times are GMT -5. The time now is 02:44 PM. |