Which java compiler is used by NetBeans?

后端 未结 5 799
你的背包
你的背包 2021-01-12 04:52

If I tell NetBeans (6.9) to compile on save, NetBeans warns me the compiled classes are not identical to classes compiled with JDK\'s compiler. The Java platform is set to \

相关标签:
5条回答
  • 2021-01-12 05:16

    Quite some time since question was asked, but I guess that what your looking for: http://wiki.netbeans.org/FaqCompileOnSave

    0 讨论(0)
  • 2021-01-12 05:20

    Why doesn't NetBeans use the JDK compiler?

    Quite simply because Sun's javac is intended to be used for batch-based compilation from the command line of definitively valid files. Whereas NetBeans (and other IDEs) do incremental compilation as you type, and quite often have additional features such as creating classes for invalid files (so you can run methodA if methodB has a syntax error in, etc.).

    Different tools for different requirements.

    0 讨论(0)
  • 2021-01-12 05:21

    Like Eclipse, Netbeans does not use standard javac so that it can offer incremental compilation and compilation of classes containing methods that have syntax errors.

    Unlike Eclipse (which uses its own Eclipse Java Compiler), Netbeans actually uses the internal API of javac for compiling, syntax highlighting, and error detection. This is a nice advantage, in that Netbeans is able to handle all of the latest Java language features and faithfully reproduces any nuances or bugs of javac's behavior.

    sources:

    • http://www.theserverside.com/tip/Digging-into-the-NetBeans-Java-Editor
    • http://wiki.netbeans.org/FaqCompileOnSave
    0 讨论(0)
  • 2021-01-12 05:23

    at Program Files\NetBeans 6.8\etc there is a netbeans_jdkhome value.

    0 讨论(0)
  • 2021-01-12 05:30

    Check Your Java Platform Manager : Tools->Java Platforms

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