• Post Reply Bookmark Topic Watch Topic
  • New Topic

Java 8u31 issue - Mac OS  RSS feed

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

I am experiencing the following exception in Mac Os. but its working fine in Windows.
I see there was no issue with Java 8 u10. After updated to Java 8 u31 facing the issue.

Exception in thread "AWT-EventQueue-2" java.lang.NullPointerException
at sun.net.util.URLUtil.getConnectPermission(URLUtil.java:84)
at sun.awt.SunToolkit.checkPermissions(SunToolkit.java:921)
at sun.awt.SunToolkit.imageExists(SunToolkit.java:898)
at sun.lwawt.macosx.LWCToolkit.getImage(LWCToolkit.java:555)
at javax.swing.ImageIcon.<init>(ImageIcon.java:198)
at javax.swing.ImageIcon.<init>(ImageIcon.java:217)


Thanks,
Raghavendra.
 
Campbell Ritchie
Marshal
Posts: 55768
163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

Please show us the code you are getting that Exception with. I suspect it has nothing to do with Java8u31 or with MacOS but with your Java® code.
 
Rob Spoor
Sheriff
Posts: 21092
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Line 217 says this(location, location.toExternalForm());, which means the argument is not null. Line 198 is image = Toolkit.getDefaultToolkit().getImage(location);. I don't see any problems there.

The exception indicates that the error occurs during permission checking. I've decompiled URLUtil using JAD, and the getConnectPermission is more or less this:
Line 84 would indicate that url must be null. That means it must be different from the URL passed to the ImageIcon constructor.

In short: I have no idea why this fails...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!