Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个不断运行的服务器,当我关闭它时,我需要它来检测它正在关闭,因此它会自动关闭套接字。无论如何,看看控制台是否正在关闭?我没有使用 Java2D 或类似的东西!
Runtime.getRuntime().addShutdownHook(new Thread(new Runnable(){ public void run(){ //Shutdown here } }));
This is closest you'll get to what your looking for...
我正在尝试使用复制当前节点下方存在的所有节点,<xsl:copy-of select="." />并且它也在复制根节点中存在的命名空间。如何避免这种情况?
<xsl:copy-of select="." />