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?
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?
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