I need to find out what the default file encoding is on a remote Java vm, in a Java program.
Is there a way to execute Charset.defaultCharset() on the remote vm and get its value back... without altering the program running on the remote jvm?
Update:
I am trying to find out what the default Charset is for a WebLogic 11g or WebLogic 12c server... that I did not start, cannot restart and I do not have the 'right' to deploy code onto it.
I also need to be able to determine the default Charset of the server process from inside a Java program that I am writing. It may execute on the same machine as the server... or not. It is very doubtful that the the server and my program will start with the same environment.
I would prefer a method which depends on very few assumption... so that usually means more code...
I probably cannot execute Charset.defaultCharset() on the server... so I should not have said 'execute Charset.defaultCharset()'. Sorry about that folks. I need to do something that will provide the answer that is as correct as executing Charset.defaultCharset() from inside the server process.