Want to call C++ code from Java code using JavaCPP?

对着背影说爱祢 提交于 2019-12-24 09:54:05

问题


I want to call c++ code from java code by using JavaCPP.

I am trying to run there own example of LegacyLibrary on http://code.google.com/p/javacpp/

when I try to compile code with following command mentioned at site only

 javac -cp javacpp.jar:. LegacyLibrary.java

I get the following exception on console

I don't under where I am wrong. I am specifying the path of jar which contains com.google.javacpp.* classes.


回答1:


You're on Windows, so you should be using ;, not : as a separator for the elements in your classpath.

Try with:

javac -classpath javacpp.jar;. ....

(Assuming that jar file is indeed in your current directory.)



来源:https://stackoverflow.com/questions/9717582/want-to-call-c-code-from-java-code-using-javacpp

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!