I’m on Windows and I’ve tried the -classpath under javac to no avail. Also tried moving the jar to the src directory, but java file still won’t compile. Trying to do a simple import of httpclient in the script.
import org.apache.http.client.*;
Install your JDK and leave it alone. Do not copy .jar files into your JDK folders!
I’d recommend getting an IDE like Eclipse or Netbeans, if you don’t already have one.
I would set up a new project, create or import your source, and set a class path for the project.
If that doesn’t work, please tell us:
a) your OS and version
b) your JDK and version
c) your IDE
d) cut/paste the EXACT error message
e) cut/paste the relevant code