Importing JSON_simple package problem
I am using JSON_simple library. I placed the jar files json-simple-1.1 and json-rpc in my classpath. It throws me a <package not found error>.
I resolved the same issue by a method I read somewhere (to include the jars in a specific folder, which I don't remember now and hence the problem, but it was not a recommended solution). How to resolve it? I've hit the wall. Thanx..!开发者_JAVA技巧!
I see two possibilities:
- The jar is not really in the classpath used by the java-instance starting your program.
- You are not referencing the correct package-name in your import-statement spelling error. For json-simple it's:
import org.json.simple
orimport org.json.simple.parser
.
From remote I cannot analyse further your problem. Try to check your import-statement. If that is right, give us more information about how you include the jar into the classpath.
精彩评论