java获取jdk、系统、服务器等信息
来源:互联网 发布:典型的数据库管理系统 编辑:程序博客网 时间:2024/06/05 00:36
转载于:http://techpool.iteye.com/blog/556271 http://www.gbsou.com/2011/05/26/7944.html
1、获取jdk信息
System.out.println(System.getProperty("java.version")); System.out.println(System.getProperty("java.vendor")); System.out.println(System.getProperty("java.vendor.url")); System.out.println(System.getProperty("java.home")); System.out.println(System.getProperty("java.vm.specification.version")); System.out.println(System.getProperty("java.vm.specification.vendor")); System.out.println(System.getProperty("java.vm.specification.name")); System.out.println(System.getProperty("java.vm.version")); System.out.println(System.getProperty("java.vm.vendor")); System.out.println(System.getProperty("java.vm.name")); System.out.println(System.getProperty("java.specification.version")); System.out.println(System.getProperty("java.specification.vendor")); System.out.println(System.getProperty("java.specification.name")); System.out.println(System.getProperty("java.class.version")); System.out.println(System.getProperty("java.class.path")); System.out.println(System.getProperty("java.library.path")); System.out.println(System.getProperty("java.io.tmpdir")); System.out.println(System.getProperty("java.compiler")); System.out.println(System.getProperty("java.ext.dirs"));
2、获取系统信息
System.out.println(System.getProperty("os.name")); System.out.println(System.getProperty("os.arch")); System.out.println(System.getProperty("os.version")); System.out.println(System.getProperty("file.separator")); System.out.println(System.getProperty("path.separator")); System.out.println(System.getProperty("line.separator")); System.out.println(System.getProperty("user.name")); System.out.println(System.getProperty("user.home")); System.out.println(System.getProperty("user.dir"));
3.获取Tomcat的版本
<%= application.getServerInfo() %>
=========
几个常用Request.ServerVariables的中文
本文件ip路径:<%="http://" & request.servervariables("server_name")&request.servervariables("script_name") %>
本机ip:<%=request.servervariables("remote_addr")%>
服务器名:<%=Request.ServerVariables("SERVER_NAME")%>
服务器IP:<%=Request.ServerVariables("LOCAL_ADDR")%>
服务器端口:<%=Request.ServerVariables("SERVER_PORT")%>
服务器时间:<%=now%>
IIS版本:<%=Request.ServerVariables("SERVER_SOFTWARE")%>
脚本超时时间:<%=Server.ScriptTimeout%>
本文件路径:<%=server.mappath(Request.ServerVariables("SCRIPT_NAME"))%>
服务器CPU数量:<%=Request.ServerVariables("NUMBER_OF_PROCESSORS")%>
服务器解译引擎:<%=ScriptEngine & "/"& ScriptEngineMajorVersion&"."&ScriptEngineMinorVersion&"."& ScriptEngineBuildVersion %>
服务器操作系统:<%=Request.ServerVariables("OS")%>
支持的文件类型:<%=Request.ServerVariables("HTTP_Accept")%>
访问的文件路径:<%=Request.ServerVariables("HTTP_url")%>
用户代理的信息:<%=Request.ServerVariables("HTTP_USER_AGENT")%>
获取url中的文件名和传过来的值:request.ServerVariables("script_name")+"?"+request.ServerVariableS("QUERY_STRING")
- java获取jdk、系统、服务器等信息
- java获取jdk、系统、服务器等信息
- Java,jsp 获取jdk、系统、服务器等信息
- jsp获取JDK、系统、服务器信息
- java程序获取jdk版本等信息
- Java 获取系统信息和服务器信息
- Java语言获取jdk、jre和操作系统版本等信息
- java获取jdk信息
- 获取服务器操作系统等信息
- java获取客服端信息(系统,浏览器等)
- java获取客服端信息(系统,浏览器等)
- java获取客服端信息(系统,浏览器等)
- java获取windows系统的CPU等信息
- java 获取服务器信息
- java获取服务器信息
- java 获取系统信息
- JAVA获取系统信息
- JAVA获取系统信息
- C语言需要了解的(二)
- mongodb 常用命令解释(一)
- Android中ExpandableListView控件基本使用
- 栈的应用——程序求主范式
- 读《一步一步写嵌入式操作系统》
- java获取jdk、系统、服务器等信息
- 模仿apache jar包中的,copyProperty方法
- javascript this 和执行上下文 之大不同
- ie6-png透明之投影透明,终于找到解决办法!
- nutch-1.2和nutch-1.3的配置使用
- 人生经典定律
- android PUSH的实现方法
- zoj 1092 Arbitrage(最短路,floyd)
- 读《硝烟中的scrum和xp》的心得,疑问,感想 (一)