Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I would suggest to try the following. This is more of a hack and would require some tinkering. But mastering this approach would probably pay off in a long run. Especially, if you do a lot of benchmarking. </p> <p>Having said that I am positive that HS (nowadays, Oracle) should have an option to redirect compiler output to a file. You just need to look for it hard enough :-) HS should have an option to print out all their JVM and compiler options and among them might be the one that redirects the output to a file. </p> <p>Anyways, I digressed...</p> <p>1) There should be src.zip in your $JAVA_HOME or %JAVA_HOME%. It contains the source code for Java Class Library.</p> <p>2) Modify the System.out to redirect all output to a particular fail or simply make it insert some special symbol on which you could grep to capture the stdout and stderr. Unfortunately, I can't be more specific with this particular step, since our company's policy forbids us to inspect the contents of src.zip. I could only imagine how difficult this step would be. Maybe it is as trivial as swapping "out" with your output stream or as difficult as modifying every single print method that your app uses directly. I don't even know how many natives the System.out uses </p> <p>3) Put your compiled version in a jar file. </p> <p>4) Add this option to your command line: -Xbootclasspath/p:full_path_to_your_jar This will tell JVM to use your version of the class first. "P" stands for prepend. </p> <p>Hopefully this helps...</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload