Win a copy of Spring in Action (5th edition) this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

JRE 7 - Reset default toolkit  RSS feed

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I want to use my implemented toolkit while loading applets. So, I have set the Runtime Parameters -Dawt.toolkit=org.sug.MyToolkit in Java Controle panel. But when it is not picking MyToolkit, instead its default toolkit sun.awt.windows.WToolkit. I am able to set it perfectly in Java 6 but it is not working in java 7. Could you please help me.
 
Bartender
Posts: 3321
86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

I've never used that system property myself so can be of only limited help. I assume you have checked to make sure your toolkit class is on the classpath, that there is no environment variable called AWT_TOOLKIT etc.

The only reason I can think of that the behaviour may have changed between Java 6 and 7 is tightening of security. You may need to grant certain permissions to be able to change the toolkit and/or your applet jar may need to be signed. Do you get any security exceptions thrown on startup?
 
Mohammad Yousuf
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Tony.

No it is not showing any error message or exception. When any applet opens, on the java console, I am pressing S to dump all the system properties. In the properties, awt.toolkit value is different than I set. I am setting both toolkit and its class file in the java runtime parameters like below.

-classpath=C:\Users\msay\mytoolkit.jar; -Dawt.toolkit=org.sug.MyToolkit

No, I don't have any AWT_TOOLKIT set in my environment variables.
 
Tony Docherty
Bartender
Posts: 3321
86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you tried running it via appletviewer to see if it works locally under Java 7?
I think you can pass the -D arguments to the JVM via an AppletViewer switch - you'll need to check the documentation though.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!