I know it sounds ridiculous, but its true!
It compiles and run fine. Now, when I change Klasa0 to Klasa1 it compiles but when i try to run it, I get:
Exception in thread "main" java.lang.NoSuchMethodError: Klasa1.<init>(Ljava/lang/String;)V
at Test.main(Test.java:3)
The same happens when i put 2 and 3 at the end of Klasax name.
Here comes the best, when I change it to Klasa4 it compiles but when I try to run it gives:
Exception in thread "main" java.lang.InstantiationError: Klasa4
at Test.main(Test.java:3)
When i change it to Klasa5 (6, 7, 8, 9 or 0) its OK, but not for (Klasa1, Klasa2, Klasa3 and Klasa4 - gives different error)
Unfortunately (for me) i 've checked it on two other machines and it runs fine with all names.
What kind of magic may be lurking in my JVM that stops me from running this code?
My version of
java is :
java version "1.6.0_06"
Java(TM) SE Runtime Environment (build 1.6.0_06-b02)
Java HotSpot(TM) Client VM (build 10.0-b22, mixed mode, sharing)
And i've tried to compile it with -source 1.3, 1.4 and 1.5. The effect is the same.
Anyone have a clue?