Slacker News Slacker News logo featuring a lazy sloth with a folded newspaper hat
  • top
  • new
  • show
  • ask
  • jobs
Library

Comment by elFarto

8 hours ago

You can also use a shebang and mark the file as executable on Linux:

  #!/usr/bin/java --source 25
  
  void main(String[] args) throws Exception {
    var addr = java.net.InetAddress.getByName(args[0]);
    System.out.println(addr);
  }

0 comments

elFarto

Reply

No comments yet

Contribute on Hacker News ↗

Slacker News

Product

  • API Reference
  • Hacker News RSS
  • Source on GitHub

Community

  • Support Ukraine
  • Equal Justice Initiative
  • GiveWell Charities