Hi,
I want to be able to set some of these:
-Dsun.java2d.translaccel=true
-Dsun.java2d.ddforcevram=true
-Dsun.java2d.opengl=True
but WebStart doesn’t let you, it only allows those given here: http://java.sun.com/j2se/1.5.0/docs/guide/javaws/developersguide/syntax.html#resources.
Before using WebStart I have been using System.exec(…) to restart a new VM with options however this doesn’t work with WebStart since I can’t find where the bin/java.exe file is. How can you set these options from WebStart? The JOGL guys must do it somehow since they need to set -Dsun.java2d.opengl=True. But how?
Thanks,
Keith
PS: Below is the code I used to use that no longer works with WebStart
public static void executeOptionedVM(boolean enableServerVM,
boolean enableOpenGL,
boolean enableCMSGC,
boolean enableDDScale,
boolean enableLargeMaxHeap,
boolean enableTranslAccel,
boolean enableDDForceVRAM,
boolean enableNoddraw) throws java.io.IOException, SecurityException{
String fileSeparator = System.getProperty("file.separator");
String classPathOption = "-classpath"+" "+"\""+System.getProperty("java.class.path")+"\"";
// the above is the problem, it returns deploy.jar in WebStart, not the actual classpath
System.out.println("System.getProperty(java.class.path)"+System.getProperty("java.class.path"));
String serverVMOption = "-server";
String openGLOption = "-Dsun.java2d.opengl=True";
String cmsGCOption = "-XX:+UseConcMarkSweepGC";
String ddScale = "-Dsun.java2d.ddscale=true";
String largeMaxHeap = "-Xmx128m";
String translAccel = "-Dsun.java2d.translaccel=true";
String ddForceVRAM = "-Dsun.java2d.ddforcevram=true";
String noddraw = "-Dsun.java2d.noddraw=true";
String commandString = System.getProperty("java.home")+fileSeparator+"bin"+fileSeparator+"java.exe"+" ";
if (enableServerVM){
commandString += serverVMOption+" ";
}
if (enableOpenGL){
commandString += openGLOption+" ";
}
if (enableCMSGC){
commandString += cmsGCOption+" ";
}
if (enableDDScale){
commandString += ddScale+" ";
}
if (enableLargeMaxHeap){
commandString += largeMaxHeap+" ";
}
if (enableTranslAccel){
commandString += translAccel+" ";
}
if (enableDDForceVRAM){
commandString += ddForceVRAM+" ";
}
if (enableNoddraw){
commandString += noddraw+" ";
}
String fullClassName = Main.class.getCanonicalName();
commandString += classPathOption+" "+fullClassName+" "+noOptions;
System.out.println(commandString);
System.out.println("about to launch new VM with options");
Runtime.getRuntime().exec(commandString);
}