We often get the following stack trace from Windows users:
java.lang.UnsatisfiedLinkError: sun.awt.image.ImageRepresentation.setBytePixels(IIII[BIILsun/awt/image/ByteComponentRaster;I)V at sun.awt.image.ImageRepresentation.setBytePixels(Native Method) at sun.awt.image.ImageRepresentation.setPixels(Unknown Source) at sun.awt.image.ImageDecoder.setPixels(Unknown Source) at sun.awt.image.GifImageDecoder.sendPixels(Unknown Source) at sun.awt.image.GifImageDecoder.parseImage(Native Method) at sun.awt.image.GifImageDecoder.readImage(Unknown Source) at sun.awt.image.GifImageDecoder.produceImage(Unknown Source) at sun.awt.image.InputStreamImageSource.doFetch(Unknown Source) at sun.awt.image.ImageFetcher.fetchloop(Unknown Source) at sun.awt.image.ImageFetcher.run(Unknown Source)
This happens when the user has updated Java, and then first tries to start our application without rebooting. Obviously, updating Java requires (like everything else on Windows) a reboot of the machine in order to return it to a usable state.
This is not an exception that we can catch, since none of our codes are in the call stack. We can handle the exception from Thread.UncaughtExceptionHandler , which we are doing now.
Instead, we would like to be able to check at startup whether we are in a need to reboot after the update, either by calling this exception directly, or by catching it, or by performing some other checks. (At present, we have no idea what even causes this ...) Does anyone know how we can do this?
source share