You are not logged in.

#1 2013-01-17 15:40:28

lspci
Member
From: Virginia, USA
Registered: 2012-06-09
Posts: 242

[Solved] Something wrong with the JDK

What's up with the JDK?  I've tried both the one on the official repos and the jdk in the AUR, but both of them return this error when I try to execute a program named Program.java

$ java Test
Error: Could not find or load main class Test

Last edited by lspci (2013-01-17 15:57:38)


Please don't be a help vampire. | Bitbucket

Give a little more for a little less today.  smile

Offline

#2 2013-01-17 15:47:44

satanselbow
Member
Registered: 2011-06-15
Posts: 538

Re: [Solved] Something wrong with the JDK

And you've got the "Help Vampire" link in you sig... give me strength...

Offline

#3 2013-01-17 15:57:21

lspci
Member
From: Virginia, USA
Registered: 2012-06-09
Posts: 242

Re: [Solved] Something wrong with the JDK

satanselbow wrote:

And you've got the "Help Vampire" link in you sig... give me strength...

lol, I already solved it too.  tongue

Java was trying to run the file as if it where under the directory where java was installed.  So run the program thusly,

$ java -cp . Test

Please don't be a help vampire. | Bitbucket

Give a little more for a little less today.  smile

Offline

Board footer

Powered by FluxBB