简体   繁体   English

NetBeans无法在罐子中找到东西

[英]NetBeans cannot find stuff in a jar

I'm working on a project which wraps some C++ code using SWIG and then need to write a java interface around it. 我正在一个项目中,该项目使用SWIG包装了一些C ++代码,然后需要围绕它编写一个Java接口。 I can do this no problem manually but NetBeans is opaque enough I can't seem to get it to work. 我可以手动完成此操作,但是NetBeans不够透明,我似乎无法使其正常工作。 I have a C++ project which builds the JNI and then packages the SWIG wrapper Java files and the JNI into a JAR. 我有一个C ++项目,该项目将构建JNI,然后将SWIG包装Java文件和JNI打包到JAR中。

I add that JAR to the Java project. 我将该JAR添加到Java项目中。 It clearly shows up in the GUI, but my main code can't call any of the code contained in the JAR. 它清楚地显示在GUI中,但是我的主要代码无法调用JAR中包含的任何代码。 I've tried every permutation of package names and so on without any luck. 我尝试了包名称的所有排列,等等,但是没有任何运气。 I tried to directly set the classpath using compiler flags in NetBeans but couldn't tell if it was actually doing it. 我试图使用NetBeans中的编译器标志直接设置类路径,但无法确定它是否确实在做。

在此处输入图片说明

The JAR file needs to contain the java class files. JAR文件需要包含Java类文件。 It appears to only contain the source files.. 它似乎只包含源文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM