當前位置:編程學習大全網 - 網站源碼 - 怎麽讓JAVA應用在Eclipse中也能調用shutdownhook

怎麽讓JAVA應用在Eclipse中也能調用shutdownhook

方法如下:packagecom.lyz.test.jython;importorg.python.util.PythonInterpreter;/***第壹個Jython程序*@authorliuyazhuang**/publicclassFirstJythonScript{publicstaticvoidmain(Stringargs[]){PythonInterpreterinterpreter=newPythonInterpreter();interpreter.exec("days=('mod','Tue','Wed','Thu','Fri','Sat','Sun');");interpreter.exec("printdays[1];");}}

  • 上一篇:夢幻西遊符石效果無心插柳的法術驅動
  • 下一篇:Java適合開發桌面應用程序嗎?
  • copyright 2024編程學習大全網