Unable to build with Java on Sublime Text

59
June 13, 2019, at 12:40 PM

I am trying to use java on sublime text. I set the build system to JavaC, and put some simple code from a text book I have and press ctrl+B to run the program.

This is the code:

class Example{
    public static void main(String args[]) {
        System.out.prinln("Hello World");
    }
}

I get an error message that says:

error: invalid flag: 
Usage: javac <options> <source files>
use --help for a list of possible options
Answer 1

you have that save the file with the name of class.

    class Example{
      public static void main(String args[]) {
         System.out.prinln("Hello World");
      }
   }
READ ALSO
Can we call synchronized method of an object inside the constructor of the object in Java?

Can we call synchronized method of an object inside the constructor of the object in Java?

I am new to JavaI am wondering if it is possible to call a synchronized method inside constructor

20
Display annotation markers in Eclipse compare editor

Display annotation markers in Eclipse compare editor

Unable to display annotation markers in Eclipse compare editor when I tried comparing two files

33
Failed startup of context o.e.j.w.WebAppContext@34cd072c

Failed startup of context o.e.j.w.WebAppContext@34cd072c

I am running Docker, the container got started but throws the below error

63