Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 06-04-2012, 10:54 PM   #1
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 Method)
at java.lang.ClassLoader.loadClass(
at sun.misc.Launcher$AppClassLoader.loadClass(
at java.lang.ClassLoader.loadClass(
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-
OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)

Old 06-04-2012, 11:38 PM   #2
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.


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 02:52 PM
Can't run a Jar File or App browser Linux - Newbie 2 05-21-2008 02:19 PM
How to run a java jar file. sabliny Programming 7 11-05-2005 02:59 PM
how to run a jar file in redhat9.0 balanagireddy Linux - Newbie 10 06-07-2004 07:12 AM
Using Tomcat to run a .jar file davee Linux - Software 1 08-15-2003 06:47 AM

All times are GMT -5. The time now is 10:31 AM.

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