LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 06-04-2012, 09:54 PM   #1
khactungxd
LQ Newbie
 
Registered: Jun 2012
Posts: 1

Rep: Reputation: Disabled
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!
 
Old 06-04-2012, 10:38 PM   #2
r0h1t
LQ Newbie
 
Registered: Sep 2008
Distribution: Fedora 17 x86_64
Posts: 5

Rep: Reputation: 2
Smile syntax

Its $ java -jar hc.jar
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't run a jar file on other machines Cyhaxor Programming 7 06-09-2008 01:52 PM
Can't run a Jar File or App browser Linux - Newbie 2 05-21-2008 01:19 PM
How to run a java jar file. sabliny Programming 7 11-05-2005 01:59 PM
how to run a jar file in redhat9.0 balanagireddy Linux - Newbie 10 06-07-2004 06:12 AM
Using Tomcat to run a .jar file davee Linux - Software 1 08-15-2003 05:47 AM


All times are GMT -5. The time now is 12:20 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration