사용자 도구

사이트 도구


java:jshell

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
java:jshell [2022/01/09 16:10]
kwon37xi
java:jshell [2022/01/09 16:12]
kwon37xi [shebang]
줄 2: 줄 2:
   * [[java:9|Java 9]] 에서 추가된 Java Shell   * [[java:9|Java 9]] 에서 추가된 Java Shell
  
-===== hashbang =====+===== shebang =====
   * ''#!'' 형태로 jshell 실행하기   * ''#!'' 형태로 jshell 실행하기
   * [[https://gist.github.com/ffissore/012d7e32a096fde5266f49038c93dcaf|with jshell-wrapper you get runnable java scripts: it removes the heading shebang, adds an "/exit" for good measure, and passes the result to jshell]]   * [[https://gist.github.com/ffissore/012d7e32a096fde5266f49038c93dcaf|with jshell-wrapper you get runnable java scripts: it removes the heading shebang, adds an "/exit" for good measure, and passes the result to jshell]]
  
 <code sh> <code sh>
-# 이 내용을 jshell-wrapper로 저장하고 #!/path/to/jshell-wrapper 로 hashbang 지정+# 이 내용을 jshell-wrapper로 저장하고 #!/path/to/jshell-wrapper 로 shebang 지정
 TMP=`mktemp` TMP=`mktemp`
 tail -n +2 $@ >> $TMP tail -n +2 $@ >> $TMP
줄 17: 줄 17:
 #put this file in /usr/local/bin/ or somewhere in your $PATH #put this file in /usr/local/bin/ or somewhere in your $PATH
 </code> </code>
 +  * [[https://bugs.openjdk.java.net/browse/JDK-8167440|[JDK-8167440] jshell tool: support shebang(#!; executable UNIX scripts) - Java Bug System]] shebang 공식 지원에 관한 issue
 ===== 참조 ===== ===== 참조 =====
   * [[https://examples.javacodegeeks.com/core-java/java-9-jshell-tutorial/|Java 9 Jshell Tutorial | Examples Java Code Geeks - 2018]]   * [[https://examples.javacodegeeks.com/core-java/java-9-jshell-tutorial/|Java 9 Jshell Tutorial | Examples Java Code Geeks - 2018]]
java/jshell.txt · 마지막으로 수정됨: 2022/01/09 16:12 저자 kwon37xi