JNI Part 2: Visual Studio setup for DLL Project

Here is the simple steps to DLL project in Visual Studio

  1. Open Visual Studio
  2. Click File->New Project, and select Empty project
  3. Write Name and select location
  4. Click ok
JNI: Creating new Dll project
JNI: Creating new Dll project
  1. Go to Project->Properties
  2. On the left side, select general in configuration properties
  3. Select Dynamic Library(.dll) as configuration Type
Dll Project Configuration
Dll Project Configuration
  1. Next click C/C++
  2. Add jdk include and win32 path in Additional Include Directories
  3. If you have installed jdk in c program files then the path is
  4. C:\Program Files\Java\jdk1.6.0_18\include; C:\Program Files\Java\jdk1.6.0_18\include\win32
  5. Click OK button.
Dll Project Add Include Directories
Dll Project adding include directories
  1. Now the configuration of the project is done. Next step is to add files to the project.
  2. As shown in below image, right click on the “Header Files” folder and select Add, Existing Item
  3. Select Header files and add to the project.
DLL adding files
DLL adding files

Finally solution explorer will look like:

Solution Explorer after adding files
Solution Explorer
  1. Build Solution: Go to Build->Build Solution
  2. Solve the errors if any found in output window.
  3. Once the build is successful then the generated dll will be in the output directory.

6 Responses to “JNI Part 2: Visual Studio setup for DLL Project”

  1. paritosh

    How can i do visual studio setup for Microsoft Visual C++ 2010 Express edition.

    • Margery

      An inresetting discussion is worth comment. I believe that you just must write a lot more on this topic, it could not be a taboo topic but typically people are not sufficient to speak on such subjects. For the next. Cheers

  2. Dexter Merrell

    Es importante que tengas en cuenta algunas cosas antes de animarte a practicar sexo anal con tu pareja.


Leave a Reply