//动态加载调用jar
String path = "jar:file:C:/Users/huajun/.m2/repository/com/alibaba/fastjson/1.2.47/fastjson-1.2.47.jar!/";
URLClassLoader load = new URLClassLoader(new URL[]{ new URL(path) },Thread.currentThread().getContextClassLoader().getParent());
Thread.currentThread().setContextClassLoader(load);
Class clazz = Thread.currentThread()
.getContextClassLoader()
.loadClass("com.alibaba.fastjson.JSON");
String text = "{\"gradename\": \"一年级\",\"termname\": \"上学期\",\"versionname\": \"人教新起点\"}";
Method hello = clazz.getMethod("parseObject", String.class, Class.class);
Map json= (Map)hello.invoke(clazz, text,Map.class);
System.out.println(json);
System.out.println(json.get("gradename"));