I need help installing Apache.Commons.Lang on Mac jEdit
Steps Taken:
- I need help installing Apache.Commons.Lang on Mac jEdit.
- I have downloaded the file from Apache.
- I tried copying the "commons-lang3-3.3.2.jar" in many locations with no avail.
I tried testing my installation with this simple file:
import org.apache.commons.lang3.StringUtils;
public class TestOne {
public static void main(String[] args) {
String text = "Hello World";
System.out.println(StringUtils.reverse(text));
}
}
I receive the following error:
TestOne.java:1: error: package org.apache.commons.lang3 does not exist
import org.apache.commons.lang3.StringUtils;
^
TestOne.java:6: error: cannot find symbol
System.out.println(StringUtils.reverse(text));
^
symbol: variable StringUtils
location: class TestOne
2 errors
Thanks for any help/guidance!
(My First Post)
from the jedit manual:
The Java CLASSPATH
You didn't mention ant so I'm assuming 1 is out. I'll edit in case you do use it.
JCompiler has a classpath setting (look for JCompiler plugin's option). Add the jar file to the classpath there.
If you compile manually, you need to compile using: (see this for documentation) windows: javac -classpath path_to_jar;path_to_otherjar;path_to_folder someFile.java mac/linux: javac -classpath path_to_jar:path_to_otherjar:path_to_folder someFile.java
On osx/linux you separate the classpath elements with : (colon) not ; (semicolon)