Created
December 13, 2025 13:05
-
-
Save gchait/e7fa44e38dce5a8d4c803932149ce2e0 to your computer and use it in GitHub Desktop.
Run Java stdlib from Bash without JShell
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| echo 'public class X{public static void main(String[]a)throws Exception{System.out.println(java.net.InetAddress.getLocalHost().getCanonicalHostName());}}' > X.java \ | |
| && javac X.java && java X && rm X.java X.class |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment