質問

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