compiles well with eclipse but not with javac

Hello.

I am using Windows XP and eclipse 3.0.2.

I have j2sdk-1_4_2_07-windows also.

I built class files from the code below with eclipse.

On jre, It silently runs and exits as expected.

But when compiled with javac, It does not.

It dumps a stack trace.

Which compiler is right?

publicclass ANullPointerException{

private Object o =new Object();

private Sub sub =new Sub();

privateabstractstaticclass Super{

protectedabstract Object access();

private Super(){

access();

}

}

privateclass Subextends Super{

protected Object access(){

return o;

}

}

publicstaticvoid main(String[] args){

new ANullPointerException();

}

}

the stack trace was as below

java.lang.NullPointerException

at ANullPointerException.access$200(ANullPointerException.java:1)

at ANullPointerException$Sub.access(ANullPointerException.java:15)

at ANullPointerException$Super.<init>(ANullPointerException.java:9)

at ANullPointerException$Super.<init>(ANullPointerException.java:5)

at ANullPointerException$Sub.<init>(ANullPointerException.java:13)

at ANullPointerException$Sub.<init>(ANullPointerException.java:13)

at ANullPointerException.<init>(ANullPointerException.java:3)

at ANullPointerException.main(ANullPointerException.java:20)

Exception in thread"main"

I found 3 class files built by eclipse. They were

ANullPointerException$Sub.class,

ANullPointerException$Super.class and

ANullPointerException.class.

No missing or extra files found, I think.

But I found 4 class files built by javac. They were

ANullPointerException$1.class,

ANullPointerException$Sub.class,

ANullPointerException$Super.class and

ANullPointerException.class.

I do not know why ANullPointerException$1.class is needed.

Thank you in advance.

[3090 byte] By [Efvoca] at [2007-10-1 13:58:05]
# 1
I found the answer myself.I have been setting the eclipse's .class file compatibility to 1.4.But it is not javac's default.So all I need to do is javac -target 1.4 ANullPointerException.java.Sorry for a noise
Efvoca at 2007-7-10 17:13:49 > top of Java-index,Developer Tools,Java Compiler...