3

Before my recent update to Java 1.7.0_25, I was able to initialize a new JApplet from a browser embedded JavaFX 2.2 application. Now I get this exception:

java.lang.NullPointerException
    at javax.swing.SwingUtilities.appContextGet(Unknown Source)
    at javax.swing.TimerQueue.sharedInstance(Unknown Source)
    at javax.swing.JApplet.<init>(Unknown Source)
    at com.glavsoft.viewer.Viewer.<init>(Viewer.java:165)

The source of the problem is that this static method call returns null:

AppContext.getAppContext()

AppContext is from the AWT package. When I run the JavaFX 2 application as a standalone, the AppContext loads fine.

How can I get the AWT AppContext or else initialize a new stub JApplet with it's own AWT context?

Nealvs
  • 306
  • 1
  • 5
  • *"The source of the problem is that this static method.."* Why static? Sounds suspicious.. For better help sooner, post an [SSCCE](http://sscce.org/). – Andrew Thompson Jun 27 '13 at 18:01
  • 1
    Have a look at http://stackoverflow.com/questions/17275259/nullpointerexception-in-invokelater-while-running-through-java-webstart and http://stackoverflow.com/questions/17223304/appcontext-is-null-from-rmi-thread-with-java-7-update-25?lq=1. – Jacob Wallace Jun 27 '13 at 21:01
  • I am also having the same issue with my JavaFX application. After some research found that this is a bug in Java 7u25. See the link below. http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8021381 Be reading the comments it seems they are treating this as not a critical bug. But it is for me :(! – user2753296 Sep 08 '13 at 08:15
  • My reading of the comments on the linked bug is that a fix has been implemented and is in the [java7u40 early access build](http://jdk7.java.net/download.html), which will be generally available [in the second week of September 2013](http://openjdk.java.net/projects/jdk7u/releases/7u40.html) – jewelsea Sep 08 '13 at 10:47

0 Answers0