Subj : Re: not a valid Win32 application... To : borland.public.cpp.borlandcpp From : "peter" Date : Wed Nov 05 2003 02:27 pm makefile is: " BATCH=C:\Java\1421\lib\jvm1.lib batchuser.exe: batchuser.obj $(BATCH) ILINK32 -L -aa batchuser.obj,,, $(BATCH) batchuser.obj: batchuser.c bcc32 -c batchuser.c " batchuser.c is: " #include #include #include "C:\Java\1421\include\jni.h" void main () { JNIEnv *env; JavaVM *jvm; JDK1_1InitArgs vm_args; jint res; jclass cls; jmethodID mid; jstring jstr; jobjectArray args; char classpath[1024]; printf("someday we will have output to follow this:\n"); //after this we will have a call to some batch stuff.... printf("now we will link some stuff!:\n"); /* IMPORTANT: specify vm_args version # if you use JDK1.1.2 and beyond */ vm_args.version = 0x00010001; JNI_GetDefaultJavaVMInitArgs(&vm_args); /* Append USER_CLASSPATH to the end of default system class path */ vm_args.classpath = classpath; /* Create the Java VM */ res = JNI_CreateJavaVM(&jvm,&env,&vm_args); printf("ALL DONE!!!\n"); }//end main " .