2

I am trying to set the Java system property jsse.enableSNIExtension to false, but when I try running this java just outputs help information:

java -Djsse.enableSNIExtension=false 

What am I doing wrong?

Michael Mrozek
  • 93,103
  • 40
  • 240
  • 233
mibzer
  • 1,032

1 Answers1

5

You forgot the name of the class to run. Normally Java programs are run like this:

$ java MainClass
$ java -jar foobar.jar

You can use -D to set system properties, but you still need the class or JAR to run:

$ java -Djsse.enableSNIExtension=false MainClass
$ java -Djsse.enableSNIExtension=false -jar foobar.jar

As far as I know you can't set system properties permanently; even if you did it programmatically it would only be for that run, so you need to keep passing the -D flag each time you run whatever it is that's not working

Michael Mrozek
  • 93,103
  • 40
  • 240
  • 233