The Dll is straight forward to use.
- Name : JVMWrapper.dll
- Version : 1.0.0.1
You can download it at the bottom of the page.
It has 3 functions exported:
extern "C" __declspec(dllexport) void printDLLInfo();
extern "C" __declspec(dllexport) int launchJVMS(JVMLauncherOptions options); extern "C" __declspec(dllexport) int launchJVM( bool redirectOutput,
bool verboseJNI, bool disableJIT, bool useServerJVM, char * pathStdOutputLog, char * pathStdErrOutputLog, char * pathJVM, char * classPath, char * JVMFlags, char * JVMLDPaths, char * mainClass,
char * programArguments);
Information about the JVMLauncherOptions structure, in case you want to use it, it is contained on the header file.
These are the parameters explained:
- bool redirectOutput : If you want to redirect standard and error output to log files. If true, you need to set pathStdOutputLog and pathStdErrOutputLog.
- bool verboseJNI : Sets verbose execution of the JVM, for debugging / informational purposes.
- bool disableJIT : Disables Just in Time capabilities of the JVM.
- bool useServerJVM : Sets the execution to use jvm.dll server dll, on the JVM, you need the JDK installed.
- char * pathStdOutputLog : Path desired to dump the standard output.
- char * pathStdErrOutputLog : Path desired to dump the error output.
- char * pathJVM : Path to the JVM to be used.
- char * classPath : The classpath to be used, separated by the ; char.
- char * JVMFlags : The JVM flags desired to use, separated by the ; char ( -Xms512M;-Xmx1024M and so on).
- char * JVMLDPaths : If you want to set LD_LIBRARY path, in case you use native Win32 / C / C++ from your java program.
- char * mainClass : The java main class you want to run. Please use / instead of . (johannasoft/testClass instead of joahannasoft.testClass).
- char * programArguments : your java class main method desired parameters, separated by ; (arg1;arg2 and so on).
Example snipplet, using the JVMLauncherOptions structure:
JVMLauncherOptions o; o.classPath="c:\\temp\\SimpleTest.jar"; o.disableJIT=false; o.JVMFlags="-Xms128M;-Xmx246M"; o.JVMLDPaths="C:\\Program Files\\Java\\jdk1.7.0_21\\jre\\bin"; o.mainClass="johannasoft/jvmwrapper/test/SimpleTest"; o.pathJVM="C:\\Program Files\\Java\\jdk1.7.0_21"; o.useServerJVM=true; o.verboseJNI=true; o.programArguments="arg1;arg2;arg3"; o.redirectOutput=true; o.pathStdOutputLog="c:\\temp\\out.txt"; o.pathStdErrOutputLog="c:\\temp\\err.txt";
|
 Updating...
JVMWrapperDll-1.0.0.1.zip (13k) Johannasoft Software, 26 jun. 2013 0:59
|