Hi,
Since JavaCPC can be run as an applet in a browser I assume it can be run with appletviewer.
(I've tried all emulators that run in an applet, and they also run with appletviewer).
I made an html file to run javacpc as applet in a browser and it work OK.
but where i run it with appletviewer (appletviewer.exe javacpc.HTML) it doesn't work!
this is the stack:
java.lang.ExceptionInInitializerError
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.security.AccessControlException: access denied (java.awt.AWTPermission setWindowAlwaysOnTop)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.awt.Window.setAlwaysOnTop(Unknown Source)
at jemu.core.device.sound.YMControl.<init>(YMControl.java:230)
at jemu.ui.JEMU.<clinit>(JEMU.java:63)
... 10 more
I need all stack including jemu.xxx.xxx then I can look in my codes to fix it probably.
Why do you want to run this in AppletViewer?
JavaCPC works also as executeable (Simply double-click the .jar file)
Found the problem:
YMControl.java:
Line 230:
this.setAlwaysOnTop(true);
remove it ;-)
(As applet in browsers, and as standalone application, this dont cause problems, because a new window is generated.)
But in AppletViewer this seems to be a problem.
(I don't think, I will modify this in my codes)