How to set System properties (awt.toolkit) in Java 1.7 Or how to set java runtime parameters in Java 1.7? -
my application needs set customtoolkit(myapp.mytoolkit) replacing default java toolkit (sun.awt.windows.wtoolkit).
java 1.6 till java 1.6 had modified deployment.properties file , worked. see changes in java control panel , custom toolkit used picked up. classpath set used work.
\locallow\sun\java\deployment\deployment.properties\deployment.properties shows...
awt.toolkit = myapp.mytoolkit javaplugin.vm.options = -djava.class.path=c:\progra~2\java\jre6\classes;c:\users\administrator\tre\mytool\hletkdevglobalorgcom\loadjar.jar;; -xbootclasspath/a:c:\progra~2\java\jre6\lib\deploy.jar;c:\progra~2\java\jre6\lib\plugin.jar -xmx96m -djavaplugin.maxheapsize=96m -xverify:remote -djavaplugin.version=1.6.0_33 -djavaplugin.nodotversion=160_33 -dbrowser=sun.plugin -dtrustproxy=true -dapplication.home=c:\progra~2\java\jre6 -classpath=c:\users\administrator\tre\mytool\hletkdevglobalorgcom\loadjar.jar;; -dawt.toolkit=myapp.mytoolkit
control panel - runtime parameters show...
-classpath=c:\users\administrator\tre\mytool\hletkdevglobalorgcom\loadjar.jar;; -dawt.toolkit=myapp.mytoolkit
java 1.7.0_75 in 1.7 when modify deployment.properties file, changes shown in java control panel, runtime parameter settings custom toolkit not being picked up. , classpath setting not being used.
tried following...
- system.setproperty("awt.toolkit","myapp.mytoolkit"); system.getproperty("awt.toolkit") returns myapp.mytoolkit. toolkit.getdefaulttoolkit() returns default sun toolkit. working in standalone java program. doesnot work in applet. our application starts jnlp file.. launching applet.
- java_opts system variable
- java_tool_opts system variable
please let me know 1. if know way set system properties awt.toolkit in java 1.7 or later? 2. why settings done in java control panel not being recognized. -dawt.toolkit or -classpath etc.
for applets can specify vm arguments using <param/> tag.
more information can found on oracle website: http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/applet/applet_deployment.html
example:
<jnlp>
...
<applet-desc
...your applet arguments...
>
<param name="java-vm-args" value="#your arguments passed in deployment.properties in former versions#" />
</applet-desc>
</jnlp>
Comments
Post a Comment