I am in need of the json package, these are the imports i need to resolve:
import org.json.simple.JSONObject;
//import net.sf.json.JSONObject;
class json
{
public static void main(String[] args)
{
JSONObject obj=new JSONObject();
obj.put("name","foo");
obj.put("num",new Integer(100));
obj.put("balance",new Integer(1000));
obj.put("is_vip",new Boolean(true));
System.out.print(obj);
}
}
i have downloaded the json package (json-simple-1.1.1.jar) from google code. Now i don't know how to install it in my fedora 14. I am using java version 1.6.0_20. Is there any specific version of json that i could download for this java version?
I have tried to execute it using the command
java -jar json-simple-1.1.1.jar
but i got a message showing
"Failed to load Main-Class manifest attribute from json-simple-1.1.1.jar"
javac json.java
– ambrosia1993 Feb 14 '14 at 09:09and run by
java json