When I run the following code...
JSONObject jsonObject = null; JSONParser parser=new JSONParser(); // this needs the \"json-simple\" library try {
You have imported the wrong class. Change
import org.json.JSONObject;
to
import org.json.simple.JSONObject;