Sublime Forum

"error: invalid flag" when trying to build Java

#1

I have problem with my sublime I am running a Java script it gives me this error error: invalid flag: C:\Users\Khonology Usage: javac use --help for a list of possible options [Finished in 0.5s]

0 Likes

#2

The default build system configuration of ST 3211 encloses the file to compile into quotes.

{
	"shell_cmd": "javac \"$file\"",
	"file_regex": "^(...*?):([0-9]*):?([0-9]*)",
	"selector": "source.java"
}

The error message however looks like the file name passed to the javac executable was truncated at the first whitespace in the pathname, which should not happen due to the quotes.

Looks like you are still on ST2???

0 Likes