Search code examples
javanetbeansidenetbeans-platform

Bug in Netbeans IDE Dev 201802140002?


Here is the code that's expected to produce error:

public class App {

    public static void main (String[] args) {
        tick();
    }

    public static void tick () {
        System.out.print("hi");

Note that the closing angled bracket of both, the method tick() and class App is missing. Although the IDE indicates this error while writing code, this compiles and runs just fine. It doesn't look like an issue with Java (or my OS) as doing javac in the command line surely does fail.

What's even funnier...the following code throws a Runtime exception after successfully executing tick():

public class App {

    public static void main (String[] args) {
        tick();

    public static void tick () {
        System.out.print("hello..");

Here I skipped closing bracket of main too.

I have installed the development version of Netbeans that has support for Java 9.


Solution

  • Ah...I see it now. At some point of time I checked the "Always run without asking" checkbox and since then my IDE is ignoring all the compile time errors without any warnings.

    enter image description here

    Sorry guys...my bad.