JAVA笔记
love126com88
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Java web开发实现页面跳转到前一页
在web开发中,经常遇到处理某一请求后,跳转到原来页面,今天自己运用到了,故记之。(我是用Webwork+jsp开发的) 1、在Action中添加 private String url; //代码中当然要有getter和setter函数啦 2、通过request取得前一页的URL原创 2009-07-27 16:43:00 · 5944 阅读 · 1 评论 -
JAVA程序调用Perl脚本
在Java中想要调用外部命令,则需使用Runtime。 Runtime rt = Runtime.getRuntime(); Process prc = Runtime.getRuntime().exec(cmd); 下面是执行Perl脚本的函数,返回Perl输出的字符串 public static String execPer原创 2009-08-06 16:34:00 · 1889 阅读 · 0 评论 -
Java 一个复制文件的函数
public static void copy(String from_name, String to_name) throws IOException { File from_file = new File(from_name); // Get File objects from Strings File to_file = new File(to_name原创 2009-08-20 13:50:00 · 1491 阅读 · 0 评论 -
《Java examples in a nutshell》书中一个关于列出某一目录下的所有目录与文件的程序源代码
关于《Java examples in a nutshell》这本书,感觉很不错,里面有很多实例的,可以让我们更深入的学习。 我这里有电子书,不过是英文版的。如果大家需要,可留下邮箱,我发你啊。 代码如下: public class FileLister extends Frame implements ActionListener, ItemListener {转载 2009-08-20 17:16:00 · 669 阅读 · 0 评论 -
JAVA实现压缩文件的方法(使用java.util.zip.*)
以下是两个摘自《java examples in a nutshell》的两个方法,挺简单的。 /** Gzip the contents of the from file and save in the to file. */ public static void gzipFile(String from, String to) throws IOExc翻译 2009-08-21 09:32:00 · 620 阅读 · 0 评论
分享