• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JRE 7 - Reset default toolkit

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 3323
86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 3323
86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic