I created a program that more or less holds an array of strings as an object and randomly prints one.
so basicaly
class Fun
{
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?