java.awt.Desktop 简介
2015-11-10 16:23
393 查看
摘自api
The
allows a Java application to launch associated applications registered on the native desktop to handle a
a file.
//使用系统中的关联应用程序来打开特定的文件(或者URI)
Supported operations include://支持的操作包括
launching the user-default browser to show a specified URI; //使用默认浏览器打开URI
launching the user-default mail client with an optional
launching a registered application to open, edit or print a specified file.//使用关联的应用程序来打开、编辑或打印文件
This class provides methods corresponding to these operations. The methods look for the associated application registered on the current platform, and launch it to handle a URI or file. If there is no associated application or the associated application fails
to be launched, an exception is thrown.
//假如没有关联的应用程序或者不能打开关联应用程序,会抛出exception
An application is registered to a URI or file type; for example, the
of registering, accessing, and launching the associated application is platform-dependent.//关联应用程序会根据平台不同而不同
Each operation is an action type represented by the
Note: when some action is invoked and the associated application is executed, it will be executed on the same system as the one on which the Java application was launched. //调用的应用程序会运行在在java应该程序所运行的系统之上
ps:URL是一种具体的URI
The
Desktopclass
allows a Java application to launch associated applications registered on the native desktop to handle a
URIor
a file.
//使用系统中的关联应用程序来打开特定的文件(或者URI)
Supported operations include://支持的操作包括
launching the user-default browser to show a specified URI; //使用默认浏览器打开URI
launching the user-default mail client with an optional
mailtoURI;//使用默认邮件客户端打开任意的mailto地址(optional:任意的)
launching a registered application to open, edit or print a specified file.//使用关联的应用程序来打开、编辑或打印文件
This class provides methods corresponding to these operations. The methods look for the associated application registered on the current platform, and launch it to handle a URI or file. If there is no associated application or the associated application fails
to be launched, an exception is thrown.
//假如没有关联的应用程序或者不能打开关联应用程序,会抛出exception
An application is registered to a URI or file type; for example, the
"sxi"file extension is typically registered to StarOffice. The mechanism
of registering, accessing, and launching the associated application is platform-dependent.//关联应用程序会根据平台不同而不同
Each operation is an action type represented by the
Desktop.Actionclass.
Note: when some action is invoked and the associated application is executed, it will be executed on the same system as the one on which the Java application was launched. //调用的应用程序会运行在在java应该程序所运行的系统之上
ps:URL是一种具体的URI
相关文章推荐
- Spring 动态注入javaBean
- CXF集成spring做webservice接口
- 源码浅析ThreadLocal类
- struts2下载文件时出现:java.lang.ClassCastException: java.io.ByteArrayInputStream cannot be cast to 错误
- Java内存回收
- 在Java中如何遍历Map对象
- Java——最大值的位置
- eclipse快捷键
- 使用Maven搭建Struts2+Spring3+Hibernate4的整合开发环境
- Java中子类与基类变量间的赋值
- spring中context:property-placeholder/元素
- 06 最近做的一个播客站点, 请大家没事的时候'玩儿'一下
- Java核心---集合类
- Play2 自定义模板类型 (Java&Scala)
- Java流的深入理解
- Java String的常用方法
- Java static 静态方法 并发(是否线程安全)
- Struts2+Spring3+Hibernate——整合byMaven
- MyEclipse生成的Hibernate一对一配置问题
- 在Android Eclipse 开发如何 使用 (*.aar)文件