学习记录——【转】java中打开explorer
很我找了好久 终于找到了.....
以下是转文:
//--------------------------------------------------------------------------------------------------
方法很简单,调用explorer.exe就可以,
Runtime.getRuntime().exec(
"rundll32 SHELL32.DLL,ShellExec_RunDLL " +
"Explorer.exe /select," + targetDirectFileName);
//以下内容不需要....
[Windows Explorer Switches]
Windows Explorer switches are useful in creating rooted folders:
Explorer [/e][,/root,<object>][[,/select],<sub object>]
/e
Use Explorer view (scope and results pane view). The default is
Open view (results in pane view only).
/root<object>
Specify the object in the "normal" name space that is
used as the root (top level) of this Explorer/Folder (i.e., local
path or UNC name). The default is the Desktop).
/Select
The parent folder opens and the specified object is selected.
<sub object> Specify the folder unless /select is used. The
default is the root.
本文来自CSDN博客:http://blog.csdn.net/denlee/archive/2007/04/23/1575961.aspx
//--------------------------------------------------------------------------------------------------
以上是原文 下面是个人尝试
举个例子:Runtime.getRuntime().exec(
"rundll32 SHELL32.DLL,ShellExec_RunDLL " +
"Explorer.exe /select," + “c:/”);
这样就打开C盘了 ,经试验 那几个dll文件也可以不添加 直接写:
Runtime.getRuntime().exec( "Explorer.exe /select," + "c:/");也行
相关文档:
最近公司碰到需要用图表的形式显示一些数据,我就开始到网上查询,查到了jfreechart和amcharts,这两者我都实现过了,jfreechart最后生成图片,但是图片效果不是我想要的,然后又研究amcharts 它的效果确实很好,而且官方网站上还有好些例子可供下载,网址是:www.amcharts.com
(想要完成一个amcharts图形需要swfobjects. ......
前几天,湖南SEO在用jsp写一个企业站程序的时候,因为要参加项目答辩竞选,所以就想为自己写的程序搞几个亮点,因为搞SEO久了,不自觉就会想到伪静态,但是在百度查了一个下午,只查到了urlrewrite架包的下载地方,和架设方面的文章,并没有jsp(JAVA)伪静态的具体操作示范,有的也只是,单页面的伪静态的写法,这里我就重头 ......
为了实现自定义的log类,能够输出具体的代码行行号,通过使用StackTraceElement对象实现了。
这里指出需要注意的几个问题:
1. 程序中返回的代码行行号,是新建StackTrackElement对象的那一行。
2. 可以通过传参的方法实现输出特定行行号。具体实现见代码。
1/**
2 *
3 */
4package leo.demo ......
概述:本示例实现对象按年龄升序 人气升序排序功能 姓名升序 降序排序功能
package ch02;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
/**
* @author YaoShiyou 实现对象排序
*
*/
public class Person {
......
1、字符串长度
String s1 = "我是中国人";
String s2 = "imchinese";
String s3 = "im中国人";
System.out.println(s1+":"+new String(s1).length());
System.out.println(s2+":"+new String(s2).length());
System.out.println(s3+ ......