I'm trying to use charva, and according to the instructions, I should just be able to point LD_LIBRARY_PATH to a shared library and put the jar on my classpath and then I should be able to use the library.
Yet while I have the jar on the classpath, the following code fails w开发者_开发知识库ith "package charva does not exist":
import charva.awt;
class ...
when I attempt to compile it.
I'm probably messing this up because I have no experience with java packages: why am I getting a package does not exist message if the jar is on the classpath?
I'm pretty sure that the jar isn't broken as the library came with a test script and a demo which appeared to be working correctly.
Thanks.
You don't point LD_LIBRARY_PATH to a shared library. You point it to a directory containing one or more of them.
Assuming that you have a .so for the right architecture, you need LD_LIBRARY_PATH as well as -Djava.library.path (unless the Java code is especially tricky).
More to the point, your question concerns a compile-time error. This has to just be that you didn't tell javac about the jar with -cp.
精彩评论