I'm new to java that goes without saying. I'm using IntelliJ. I've stumbled upon a problem I just don't understand. I've made a simplified program that illustrates my problem. It just checks if number is in an array.
import org.apache.commons.lang.ArrayUtils;
public class Test {
public static void main(String[] args) {
int[] list = new int[]{1,2,3};
Boolean help = ArrayUtils.contains(list, 3);
System.out.println(help);
}
}
(ctrl+shift+f10) runs good and returns true, however when i go and try to compile:
E:\...\W1>javac test.java
I get:
test.java:1: error: package org.apache.commons.lang does not exist
import org.apache.commons.lang.ArrayUtils;
^
test.java:7: error: cannot find symbol
Boolean help = ArrayUtils.contains(list, 3);
^
symbol: variable ArrayUtils
location: class test
2 errors
I have downloaded the commons-lang-2.6 and marked the folder as a library to the module that my program is in. I've even added the folder to the CLASSPATH. Any suggestions how to fix it and explanations why had this happened will be appreciated.