ÓÃJava³ÌÐòʵÏÖ½âѹËõÎļþ
package com.huawei.globe;
import java.util.zip.*;
import java.io.*;
public class Compress {
public Compress() {
}
// ѹËõĿ¼ÏµÄÎļþ
public void compress(String zipFileName, String inputFile) throws Exception {
compress(zipFileName, new File(inputFile));
}
// ѹËõÎļþ
public void compress(String zipFileName, File inputFile) throws Exception {
ZipOutputStream out = new ZipOutputStream(new FileOutputStream(
zipFileName));
compress(out, inputFile, "");
System.out.println("ѹËõ³É¹¦!");
out.close();
}
public void compress(ZipOutputStream out, File f, String base)
throws Exception {
System.out.println("ÕýÔÚѹËõ " + f.getName());
if (f.isDirectory()) {
File[] fl = f.listFiles();
out.putNextEntry(new ZipEntry(base + "/"));
base = base.length() == 0 ? "" : base + "/";
for (int i = 0; i < fl.length; i++) {
compress(out, fl[i], base + fl[i].getName());
}
} else {
out.putNextEntry(new ZipEntry(base));
FileInputStream in = new FileInputStream(f);
int b;
while ((b = in.read()) != -1)
out.write(b);
in.close();
}
}
// ½âѹËõÎļþ
public void upCompress(String zipFileName, String outputDirectory)
throws Exception {
ZipInputStream in = new ZipInputStream(new FileInputStream(zipFileName));
ZipEntry z;
while ((z = in.getNextEntry()) != null) {
System.out.println("ÕýÔÚ½âѹ " + z.getName());
if (z.isDirectory()) {
String name = z.getName();
name = name.subs
Ïà¹ØÎĵµ£º
javaµ÷webServiceÌ«Õý³£ÁË¡£¡£¡£
ÔÚµ÷ÓÃhttpsµÄwebServiceµÄʱºò¼¸ÖÖ³£Óõķ½·¨»á³öÏÖ°²È«´íÎ󣬺ܶàÈË˵µÄÊÇÔÚjreÀïÃæ×°Ö¤Êé¡£¡£¡£ÄÇҲ̫ÓôÃÆÁ˰É
ÕâÀïÌṩһÖÖ²»ÓÃÖ¤ÊéµÄ·½Ê½
¶Ô·½webServiceÌṩµÄ½Ó¿Ú£¬Õâ¸öÄãÓ¦¸ÃÒªÖªµÀµÄ°É£¬²»ÖªµÀµÄ»°¾Íwsdl×Ô¼º»¹Ô
Java´úÂë
/**
* XXXµÄwebService½Ó¿ ......
ÔÚʹÓöÓÁÐÖУ¬ÎÒÃÇÒ»°ã¶¼»áʹÓÃÑ»·¶ÓÁÐÒÔ±£Ö¤ÐÔÄÜ
package com.yz.myqueue;
public class Queue {
private Integer size;
private Integer front;
private Integer rear;
private Object[] datas;
public Queue(int size){
this.size=size;
this.front=-1;
this.rear=-1;
datas=new Object[size] ......
java -cp .;c:\dir1\lib.jar Test
-cp ºÍ -classpath Ò»Ñù£¬ÊÇÖ¸¶¨ÀàÔËÐÐËùÒÀÀµÆäËûÀàµÄ·¾¶£¬Í¨³£ÊÇÀà¿â£¬jar°üÖ®À࣬ÐèҪȫ·¾¶µ½jar°ü£¬windowÉϷֺœ;”
·Ö¸ô£¬linuxÉÏÊǷֺœ:”·Ö¸ô¡£²»Ö§³ÖͨÅä·û£¬ÐèÒªÁгöËùÓÐjar°ü£¬ÓÃÒ»µã“.”´ú±íµ±Ç°Â·¾¶¡£
ËäÈ»ÏÖÔÚ¶¼ÓÐeclipseÖ®ÀàµÄIDE ......
ÎÄÕÂת×Ô:http://www.javaeye.com/topic/31742
---------------------------------------------------
ÂÒÂë¶ÔÓÚʹÓ÷ÇÓ¢ÓïÎÄ×Ö³ÌÐòÔ±»ù±¾ÉÏÊÇÒ»Ö±²øÈÆÔÚÉí±ßµÄÂ鷳ʣ¬Õâ¸öËÒ²±ÜÃâ²»ÁË¡£ÏÂÃæÊÇÎÒ½â¾öÂÒÂëʱºòµÄÒ»µãС¾Ñé¡£»¶ÓÖ¸Õý
Ò»¡¢±ÜÃâÂÒÂëµÄһЩעÒâµã£º
1.¾¡Á¿Ê¹ÓÃͳһµÄ±àÂ룬Èç¹ûÄãÊÇÖØÍ·¿ª·¢Ò»¸öÏ ......