I am executing a junit test case
I got the following error,
A fatal error has been detected by the Java Runtime Environment:
Internal Error (classFi
I resolved this by
Do you run on a supported platform (Windows, one of a few Linux versions?) If not, that is the first to try.
If you ARE on a supported platform, then downgrade to _17 and see if THAT helps.
Then make a bug report to Sun and hope they will fix it someday (unless you want to give them money for fixing it faster).
Another possible explanation: hardware failure. Ruled out if you can reproduce the error on different machines.
Go to Run As -> Run Configurations->classpath->BootStrap Entries Click on Advance, then Add Library and select JRE System Library as a first entry. Apply and Run...
Go to Run As -> Run Configurations... and select the configuration you are using.
Select the Class Path tab and select BootStrap Entries.
Click on Advance, then Add Library and select JRE System Library.
Bring it up and make it the first entry in the BootstrapEntries List.
Apply and Run...
This could be a JVM bug; see @Zac's answer. But it could also be that your junit test case is causing a corrupted bytecode file to be loaded. Try rebuilding all your .class
files, and if that does not fix the problem try refetching any external libraries that your code depends on.