문제

This is probably a silly question, but how or where do I add jgrapht so my java compiler in terminal will include it? I've got the .jar file but don't know where to put it.

I'm using Mac OS X ML and Netbeans.

도움이 되었습니까?

해결책

To use an external Java library you need to add it to your classpath. The Java documentation has some great information on how to set it.

Assuming you're using the javac compiler, you'll use a command similar to:

javac -classpath path to jgrapht jar file ... other options and files here ...

See also: Compiling Java

You specifiacally mention Netbeans, so you'll also want to look at this question, and this blog post.

I hope this helps! :)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top