my .jar file won't do anything.
Posted
by David
on Stack Overflow
See other posts from Stack Overflow
or by David
Published on 2010-04-21T05:02:15Z
Indexed on
2010/04/21
5:03 UTC
Read the original article
Hit count: 255
I created a program that more or less holds an array of strings as an object and randomly prints one.
so basicaly
class Happy
{
string[] namestrings = new string[#]
constructor()
{ fill with some strings}
public static void main (String[]arg)
{
create instance of class
do some junk with it
method that prints it
}
method that prints it {}
another method
}
when i compile and run it on the command line it works fine but when on the comand line i type in jar -cf Happy.jar Fun.class
i get a .jar file called Happy and when i click on it i get an error message that reads "the java Jar file happy could not be launched read the consol for possible error messages" I have a mac i'm running lepord if that makes a diference. Whats going on?
© Stack Overflow or respective owner