package org.json does not exist
Here are some details:
$ echo $CLASSPATH
/usr/share/java
$ ll /usr/share/java/json*
-rw-r--r-- 1 root root 49176 Jun 12 22:31 /usr/share/java/json-20160212.jar
$ jar tf /usr/share/java/json-20160212.jar
META-INF/MANIFEST.MF
META-INF/
META-INF/maven/
META-INF/maven/org.json/
META-INF/maven/org.json/json/
META-INF/maven/org.json/json/pom.properties
META-INF/maven/org.json/json/pom.xml
org/
org/json/
org/json/CDL.class
org/json/Cookie.class
org/json/CookieList.class
org/json/HTTP.class
org/json/HTTPTokener.class
org/json/JSONArray.class
org/json/JSONException.class
org/json/JSONML.class
org/json/JSONObject$1.class
org/json/JSONObject$Null.class
org/json/JSONObject.class
org/json/JSONString.class
org/json/JSONStringer.class
org/json/JSONTokener.class
org/json/JSONWriter.class
org/json/Property.class
org/json/XML.class
org/json/XMLTokener.class
$ javac JsonParser.java
JsonParser.java:1: error: package org.json does not exist
import org.json.*;
I specified the .JAR and IT WORKED: $ javac -cp /usr/share/java/json-20160212.jar JsonParser.java
Comments
Post a Comment