[英]Import json-simple from Maven failed
I'm practicing Java JSON programming using JSON-Simple on this site which says:我正在这个网站上使用 JSON-Simple 练习 Java JSON 编程,它说:
All the jars available in maven repo is supported.支持 maven repo 中可用的所有 jars。
UPDATE:更新:
So I've now added the external maven library to project.所以我现在已经将外部 Maven 库添加到项目中。
But I still can't get it work.但我仍然无法让它工作。
I tried我试过
import com.googlecode.json-simple.JSONObject;
but got:但得到:
error: ';' expected
import com.googlecode.json-simple.JSONObject;
^
Then I tried然后我试过了
import com.googlecode.json_simple.JSONObject;
but got:但得到:
error: package com.googlecode.json_simple.parser does not exist
import com.googlecode.json_simple.parser.JSONParser;
^
How to make it works?如何使它起作用?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.