There is such term like CLASSPATH
which is using that JVM could find custom classes or jar
files to import them to another packages (Am I right?). So, I created a few custom classes and placed them into package net.ederika
, then I created another project with net.bartikan
package name. My main idea is to import classes from net.ederika
package to the second project. I specified CLASSPATH
environment variable CLASSPATH EV and added to C:/DOC/JavaT net/edeirika/
files with extension .class
. I got this: Error with package importing
I used IntelliJ IDEA for this. What’s wrong with my actions? Bruce Eckel (“Thinking in Java” book) wrote that we specify CLASSPATH
, add there folders with out .class
files and JVM locates it. I’m really frustrated and confused with this topic and can’t merely go on reading that book. From “Thinking in Java” There is no really much info about it on the Internet, thus I ask here. files in CLASSPATH
specified folders
Advertisement
Answer
IDEA: File > Project Stucture > Libraries > +
> Java > Select Library Files > OK > Apply > OK