⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 systeminfo.java

📁 webwork source
💻 JAVA
字号:
/* * WebWork, Web Application Framework * * Distributable under Apache license. * See terms of license at opensource.org */package webwork.examples;import webwork.action.ActionSupport;import java.util.Properties;/** *	This action samples some virtual machine runtime information. *       *	@author Philipp Meier (<meier@o-matic.de>) *	@version $Revision: 1.4 $ */public class SystemInfo extends ActionSupport{   private long currentTimeMillis;   private Properties properties;   private long freeMemory;   private long totalMemory;   public long currentTimeMillis()   {      return currentTimeMillis;   }   public Properties getProperties()   {      return properties;   }   public long getFreeMemory()   {      return freeMemory;   }   public long getTotalMemory()   {      return totalMemory;   }   public long getUsedMemory()   {      return totalMemory - freeMemory;   }   protected String doExecute()   {      properties = System.getProperties();      currentTimeMillis = System.currentTimeMillis();      freeMemory = Runtime.getRuntime().freeMemory();      totalMemory = Runtime.getRuntime().totalMemory();      return SUCCESS;   }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -