Community
Participate
Working Groups
OS: Linux (Fedora3) - Kernel: 2.6.9-1.667 - arch: i686 Java: 1.6.0 ----- The following code should throw java.lang.NegativeArraySizeException, and when it happens the OS craches and nothing more can be done, but restart the OS through pressing the restating button. It just happens when I run this code inside the Eclipse. public class Testador { public static void main(String[] args) throws Exception { byte[] b = new byte[-120120]; } }
Moving to JDT/Debug
Did you run or debug the code? What happens when you run or debug the same code outside Eclipse? Anything in the .log file?
It happens when I run such code. Unfortunately I cannot reproduce such erro outside the Eclipse even though inside the Eclipse but in other workspace. I mean: (1) when I run it outside the Eclipse it works properly; (2) when I run it inside the Eclipse, but in a different workspace, it works properly; (3) when I run it inside the Eclipse, in my usual workspace, it craches the OS. The expected output of such code which can be seen in the standard IO for (1) and (2) is: Exception in thread "main" java.lang.NegativeArraySizeException at Testador.main(Testador.java:16)
I have not been able to reproduce this bug, and if it works outside of eclipse and inside of eclipse with other workspaces, I am inclinded to think there is something wrong with your current workspace. marking as WORKSFORME