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?

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

  • thanks for you answer. Is there possibility to change that variable on client side ? – mibzer Aug 16 '12 at 10:01
  • @mibzer I don't know what you mean by "client side" – Michael Mrozek Aug 16 '12 at 13:55
  • I mean by changing this variable not by connecting to server and change it but rather doing it over Java Console. – mibzer Aug 27 '12 at 8:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.