AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Java netbeans tutorial8/15/2023 ![]() ![]() ![]() In the Properties dialog box, select the C Compiler node under the Build properties.Ĭlick the Include Directories and Headers … button and click Add in the Include Directories and Headers dialog box.īrowse into your JDK directory, and select the include subdirectory. Right-click the JNIDemoCdl project node and choose Properties. However,Re: as you said, because this is such an old tutorial, it probably won't work properly now anyway.įor example, here is the part where I think the problem started: Setting Project Properties Re: Could you be a little more specific as to what I did setting up the C/C++ environment? My interpretation of this is that I added include headers and directories as the location of the include and include/linux directories. No problem with running a trivial "Hello World" application. Gmake: *** Error 2īUILD FAILED (exit value 2, total time: 74ms) Gmake: Leaving directory '/home/jerryw/NetBeansProjects/JNIDemoCdl' usr/include/stdio.h:27:10: fatal error: bits/libc-header-start.h: No such file or directory In file included from /usr/lib/jvm/java-1.8.0-openjdk-amd64/include/jni.h:39, Gcc -shared -m32 -c -g -I/usr/lib/jvm/java-1.8.0-openjdk-amd64/include -I/usr/lib/jvm/java-1.8.0-openjdk-amd64/include/linux -include /usr/lib/jvm/java-1.8.0-openjdk-amd64/include/classfile_constants.h -include /usr/lib/jvm/java-1.8.0-openjdk-amd64/include/jni.h -include /usr/lib/jvm/java-1.8.0-openjdk-amd64/include/jvmti.h -include /usr/lib/jvm/java-1.8.0-openjdk-amd64/include/jvmticmlr.h -include /usr/lib/jvm/java-1.8.0-openjdk-amd64/include/linux/jni_md.h -fPIC -MMD -MP -MF "build/Debug/GNU-Linux/JNIDemo.o.d" -o build/Debug/GNU-Linux/JNIDemo.o JNIDemo.c Rm -f "build/Debug/GNU-Linux/JNIDemo.o.d" "/usr/bin/gmake" -f nbproject/Makefile-Debug.mk dist/libJNIDemoCdl.so Gmake: Entering directory '/home/jerryw/NetBeansProjects/JNIDemoCdl' "/usr/bin/gmake" -f nbproject/Makefile-Debug.mk QMAKE= cd '/home/jerryw/NetBeansProjects/JNIDemoCdl' The build failed message is rather lengthy. "Library File /usr/lib/jvm/java-1.8.0-openjdk-amd64/include/jni.h When hovering over the lightbulb the following message appears which I have tried and tried to google and troubleshoot without success, it appears that the source of this warning is the jni.h file. The following image shows the yellow warning lightbulb on line 1 The code for this method of the JNIDemoCld.c file follows. I have completed the majority of the steps to do this however I am stuck at the "Implementing a Method" step. My goal is to complete the beginning netbeans java / c JNIDemo application that can be found at the website ![]()
0 Comments
Read More
Leave a Reply. |