mirror of https://github.com/jlizier/jidt
Making AutoAnalyser Python code only start JVM if not already started
This commit is contained in:
parent
817abd1de0
commit
90baf68ee7
|
|
@ -808,10 +808,11 @@ public abstract class AutoAnalyser extends JFrame
|
||||||
} else {
|
} else {
|
||||||
pythonCode.append("import readFloatsFile\n\n");
|
pythonCode.append("import readFloatsFile\n\n");
|
||||||
}
|
}
|
||||||
pythonCode.append("# Add JIDT jar library to the path\n");
|
pythonCode.append("if (not isJVMStarted()):\n");
|
||||||
pythonCode.append("jarLocation = \"" + jarLocation + "\"\n");
|
pythonCode.append(" # Add JIDT jar library to the path\n");
|
||||||
pythonCode.append("# Start the JVM (add the \"-Xmx\" option with say 1024M if you get crashes due to not enough memory space)\n");
|
pythonCode.append(" jarLocation = \"" + jarLocation + "\"\n");
|
||||||
pythonCode.append("startJVM(getDefaultJVMPath(), \"-ea\", \"-Djava.class.path=\" + jarLocation, convertStrings=True)\n\n");
|
pythonCode.append(" # Start the JVM (add the \"-Xmx\" option with say 1024M if you get crashes due to not enough memory space)\n");
|
||||||
|
pythonCode.append(" startJVM(getDefaultJVMPath(), \"-ea\", \"-Djava.class.path=\" + jarLocation, convertStrings=True)\n\n");
|
||||||
// 3. Matlab:
|
// 3. Matlab:
|
||||||
StringBuffer matlabCode = new StringBuffer();
|
StringBuffer matlabCode = new StringBuffer();
|
||||||
matlabCode.append("% Add JIDT jar library to the path, and disable warnings that it's already there:\n");
|
matlabCode.append("% Add JIDT jar library to the path, and disable warnings that it's already there:\n");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue