[Date Prev][Date Next][Index][Thread] [SGT Mail Archive] [SGT Main Page]

JPlotLayout in JApplet



*************************************************
Message from the sgt mail list.
*************************************************

Hi List,

I've written a program that uses JPlotLayout for plotting. The main class is written to be used as a standalone Java application or as an applet. It works well as an application but when loaded as an applet (with appletviewer, Sun Java 6) it fails with an ExceptionInInitializerError (complete error message below).

The line that causes the error is where I create the JPlotLayout:

        plot = new JPlotLayout(JPlotLayout.LINE, false, false,
                               yLabel + xLabel, null, false);

I guess JPlotLayout is trying to do something an applet is not allowed to do. Is there anything I can do about this? Is it known to be possible to use JPlotLayout in an applet?

The complete error message is (the class that creates a JPlotLayout is "FuncDraw"):

java.lang.ExceptionInInitializerError
	at gov.noaa.pmel.sgt.SGLabel.<init>(Unknown Source)
	at gov.noaa.pmel.sgt.swing.JPlotLayout.<init>(Unknown Source)
	at bosondos.FuncDraw.<init>(Unknown Source)
	at bosondos.PlotBox.init(Unknown Source)
	at bosondos.PlotBox.<init>(Unknown Source)
	at bosondos.SetMaxBox.<init>(Unknown Source)
	at bosondos.DOSBox.<init>(Unknown Source)
	at bosondos.BosonDOS.init(Unknown Source)
	at sun.applet.AppletPanel.run(AppletPanel.java:424)
	at java.lang.Thread.run(Thread.java:619)
Caused by: java.security.AccessControlException: access denied (java.util.PropertyPermission java.runtime.version read) at java.security.AccessControlContext.checkPermission(AccessControlContext.java:323) at java.security.AccessController.checkPermission(AccessController.java:546)
	at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
	at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1285)
	at java.lang.System.getProperty(System.java:652)
	at gov.noaa.pmel.swing.MRJUtil.fixFontMetrics(Unknown Source)
	at gov.noaa.pmel.sgt.LabelDrawer2.<clinit>(Unknown Source)
	... 10 more

Thanks in advance for any help,

	Elias Assmann

--
Wenn weniger mehr ist, ist nichts alles.


*************************************************
To remove yourself from this mailing list,
send mail to <epic-majordomo@noaa.gov> with
"unsubscribe sgt" in the message body.


Privacy Notice, External Links Disclaimer.