Compiler is creating extra class files with $ in them

前端 未结 1 746
小蘑菇
小蘑菇 2021-01-23 12:46

I\'m using Eclipse and I\'ve written a Java application using SWT. When Eclipse compiles my program, it renames my main file into 4 different files like this:

  • Main
1条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-23 13:37

    The $ classes are for anonymous inner classes and perfectly normal.

    Could we see the command line you ran? You probably need to write java MainFile instead of java MainFile.class.

    0 讨论(0)
提交回复
热议问题