- Joined
- Jul 24, 2006
- Messages
- 3
- Reaction score
- 0
Hello,
I am an intermediate java programmer and for some reason I can not getthe JNI example to work. The reason for this is I can not get a simple helloWorld dll created because when it comes to c++ i have no experience or scholling in this darn language. http://java.sun.com/docs/books/jni/html/start.html#769 is the reference I am using but I cant get past 2,5 because I am unable to create a simple .dll
this is the code as it should be in C++...
#include <jni.h>
#include <stdio.h>
#include "HelloWorld.h"
JNIEXPORT void JNICALL
Java_HelloWorld_print(JNIEnv *env, jobject obj)
{
printf("Hello World!\n");
return;
}
I could get this to work somewhat, in the directory i was in, using the c++ commandline compiler in VS6 i went from looking from one include to the next(I had to copy and paste the missing header files from another location in to my working directory for the compiler to find what it was looking for but i am still getting errors)
Any Ideas???
Thank you
I am an intermediate java programmer and for some reason I can not getthe JNI example to work. The reason for this is I can not get a simple helloWorld dll created because when it comes to c++ i have no experience or scholling in this darn language. http://java.sun.com/docs/books/jni/html/start.html#769 is the reference I am using but I cant get past 2,5 because I am unable to create a simple .dll
this is the code as it should be in C++...
#include <jni.h>
#include <stdio.h>
#include "HelloWorld.h"
JNIEXPORT void JNICALL
Java_HelloWorld_print(JNIEnv *env, jobject obj)
{
printf("Hello World!\n");
return;
}
I could get this to work somewhat, in the directory i was in, using the c++ commandline compiler in VS6 i went from looking from one include to the next(I had to copy and paste the missing header files from another location in to my working directory for the compiler to find what it was looking for but i am still getting errors)
Any Ideas???
Thank you