There seem to be plenty of questions asking how to get the classpath of a given import from inside of java or using an application, but I haven't been able to find a anything on SO about how to find the corresponding path for a given import without the use of any tool or java functionality.
I'd simply like to know how an import is supposed to map according to the contents of $CLASSPATH
.
NOTE I'm very new to java; so I apologize if the answer is painfully obvious.
// does this map to "$CLASSPATH/more/libs/for/you/you.jar"
import more.libs.for.you;
The reason why I need to know this is because I'm trying to figure out how to correctly package/install a jna so that I can import it correctly. Currently it's installed under /usr/share/java/jna
, but the proper import (according to the docs, if I understand them correctly) is com.sun.jna.*
but when I try importing jna
I get:
error: package com.sun.jna does not exist
I even tried installing jna
under /usr/share/java/com/sun/jna/
, but that didn't work either, and I still got the same error.
My $CLASSPATH
is /usr/share/java/*:$PWD:$CLASSPATH