Skip to content

Instantly share code, notes, and snippets.

@62mkv
Last active July 28, 2020 06:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 62mkv/168f9140ad0d5fea04b696ed65de124b to your computer and use it in GitHub Desktop.
Save 62mkv/168f9140ad0d5fea04b696ed65de124b to your computer and use it in GitHub Desktop.
Java useful tips

To wire-print requests/responses over HTTP for SOAP/XML:

-Dcom.sun.xml.ws.transport.http.client.HttpTransportPipe.dump=true -Dcom.sun.xml.ws.transport.http.HttpAdapter.dump=true -Dcom.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.dump=true -Dcom.sun.xml.internal.ws.transport.http.HttpAdapter.dump=true -Dcom.sun.xml.internal.ws.transport.http.HttpAdapter.dumpTreshold=true

Snippet to quickly get Java system properties:

public class My {
  public static void main(String[] argc) {
     System.getProperties().stringPropertyNames().forEach(name -> System.out.println(name + "=" + System.getProperty(name)));
  }
}

Save this file, then run javac My.java && java My

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment