You are not logged in.

#1 2011-02-16 21:16:07

roobre
Member
From: Spain
Registered: 2010-10-10
Posts: 34

Problem running .jar files manually

Hi there!

I'm currently having some problems when I try to run .jar files downloaded from the net.

The command I use is:

java 'path/to/file.jar'

And i always get an error like this:

Exception in thread "main" java.lang.NoClassDefFoundError: /home/roobre/file/jar
Caused by: java.lang.ClassNotFoundException: .home.roobre.file.jar
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
Could not find the main class: /home/roobre/file.jar.  Program will exit.

But java works ok with arch packages downloaded from the AUR, such as Minecraft, Arduino, Geogebra, etc...

What am I doing bad?

Best regards, Roobre.

Last edited by roobre (2011-02-16 21:16:45)

Offline

#2 2011-02-16 21:32:02

skunktrader
Member
From: Brisbane, Australia
Registered: 2010-02-14
Posts: 1,543

Re: Problem running .jar files manually

try

java -jar path/to/file.jar

Offline

#3 2011-02-17 15:10:11

roobre
Member
From: Spain
Registered: 2010-10-10
Posts: 34

Re: Problem running .jar files manually

It worked nice (I should have tried that, I'm stupid >.<)

Best regards ^_^

Offline

#4 2011-04-12 16:36:50

G0d's-servant
Member
From: Islamic Republic of Iran
Registered: 2011-03-18
Posts: 39

Re: Problem running .jar files manually

I run jar files with "java -jar file.jar". but don't give any output such as error, warning and . . . also don't run program.

[tux@myhost ~]$ java -jar Desktop/toonel.jar 
[tux@myhost ~]$ 

?

Offline

#5 2011-04-12 19:20:57

Stebalien
Member
Registered: 2010-04-27
Posts: 1,237
Website

Re: Problem running .jar files manually

G0d's-servant wrote:

I run jar files with "java -jar file.jar". but don't give any output such as error, warning and . . . also don't run program.

[tux@myhost ~]$ java -jar Desktop/toonel.jar 
[tux@myhost ~]$ 

?

Your problem is unrelated. Please start a new thread and try to avoid thread hijacking https://wiki.archlinux.org/index.php/Fo … _Hijacking.


Steven [ web : git ]
GPG:  327B 20CE 21EA 68CF A7748675 7C92 3221 5899 410C
Do not email: honeypot@stebalien.com

Offline

Board footer

Powered by FluxBB