I'm trying to set up IntelliJ IDEA (13 and 12, on Mac) to use a Java class included a jar file for my Java application.
The two jars are downloaded from http://introcs.cs.princeton.edu/java/stdlib/stdlib.jar and http://algs4.cs.princeton.edu/code/algs4.jar .
I've set the jar as a module dependency by the following procedure
* Start from the "project window";
* Select my main Java module;
* Use menu File | Project Structure;
* In Project Settings, select Modules, and select my Java application as interested module in the middle window;
* On the window to the right, select "Dependencies" tab, and press "+" and select "Jars or directories" and navigate to the jar file, add select it so the custom jar file is added as a new entry in the window, check the Export checkbox and set Scope pulldown set as "Compile";
* Press OK.
However, after setting this, in a Java class file in my Java application, if I use a class defined in the custom jar file, it still prompts me "Cannot resolve symbol 'SomeClass'".
Any idea what I'm doing wrong and how to fix this?
The Libraries and Global libraries are both empty currently. I did try to set the two jars there (separately) and add them as dependencies for the Java app, and it did NOT work, so I deleted them from Libraries and Global libraries. The above setting is using add module dependency as files directly (without first registering them as libraries), which still does not work.
Please help! I'm desperate. Have spent many many hours on this.