锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲精品中文字幕无乱码,久久久久久久亚洲Av无码,亚洲熟妇av一区二区三区漫画http://m.tkk7.com/Man/category/45905.htmlzh-cnThu, 13 Dec 2012 16:40:06 GMTThu, 13 Dec 2012 16:40:06 GMT60JOptionPane瀵硅瘽妗嗗簲鐢?/title><link>http://m.tkk7.com/Man/archive/2012/12/12/JOptionPane.html</link><dc:creator>姝ゅ彿宸茶鍒?/dc:creator><author>姝ゅ彿宸茶鍒?/author><pubDate>Wed, 12 Dec 2012 07:03:00 GMT</pubDate><guid>http://m.tkk7.com/Man/archive/2012/12/12/JOptionPane.html</guid><wfw:comment>http://m.tkk7.com/Man/comments/392864.html</wfw:comment><comments>http://m.tkk7.com/Man/archive/2012/12/12/JOptionPane.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/Man/comments/commentRss/392864.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/Man/services/trackbacks/392864.html</trackback:ping><description><![CDATA[     鎽樿: <br>1銆丣OptionPane搴旂敤涓句緥 <br>2銆佽幏鍙朖OptionPane涓殑鍥炬爣璧勬簮 <br>3銆?API閮ㄥ垎鏂囨。鎻忚堪.  <a href='http://m.tkk7.com/Man/archive/2012/12/12/JOptionPane.html'>闃呰鍏ㄦ枃</a><img src ="http://m.tkk7.com/Man/aggbug/392864.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/Man/" target="_blank">姝ゅ彿宸茶鍒?/a> 2012-12-12 15:03 <a href="http://m.tkk7.com/Man/archive/2012/12/12/JOptionPane.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>灝咼Table涓殑鏁版嵁瀵煎嚭涓篶sv/xls鏍煎紡http://m.tkk7.com/Man/archive/2012/12/12/392859.html姝ゅ彿宸茶鍒?/dc:creator>姝ゅ彿宸茶鍒?/author>Wed, 12 Dec 2012 05:34:00 GMThttp://m.tkk7.com/Man/archive/2012/12/12/392859.htmlhttp://m.tkk7.com/Man/comments/392859.htmlhttp://m.tkk7.com/Man/archive/2012/12/12/392859.html#Feedback0http://m.tkk7.com/Man/comments/commentRss/392859.htmlhttp://m.tkk7.com/Man/services/trackbacks/392859.html1銆丣FileChooser淇濆瓨鍒版湰鍦?

2銆丣Table鏁版嵁瀵煎嚭涓篶sv/xls鏍煎紡  闃呰鍏ㄦ枃

]]>
JTable鐩戝惉鍒楀鍙樺姩http://m.tkk7.com/Man/archive/2012/10/15/389558.html姝ゅ彿宸茶鍒?/dc:creator>姝ゅ彿宸茶鍒?/author>Mon, 15 Oct 2012 03:15:00 GMThttp://m.tkk7.com/Man/archive/2012/10/15/389558.htmlhttp://m.tkk7.com/Man/comments/389558.htmlhttp://m.tkk7.com/Man/archive/2012/10/15/389558.html#Feedback0http://m.tkk7.com/Man/comments/commentRss/389558.htmlhttp://m.tkk7.com/Man/services/trackbacks/389558.html闃呰鍏ㄦ枃

]]>
castor搴旂敤demohttp://m.tkk7.com/Man/archive/2012/08/22/386050.html姝ゅ彿宸茶鍒?/dc:creator>姝ゅ彿宸茶鍒?/author>Wed, 22 Aug 2012 09:06:00 GMThttp://m.tkk7.com/Man/archive/2012/08/22/386050.htmlhttp://m.tkk7.com/Man/comments/386050.htmlhttp://m.tkk7.com/Man/archive/2012/08/22/386050.html#Feedback0http://m.tkk7.com/Man/comments/commentRss/386050.htmlhttp://m.tkk7.com/Man/services/trackbacks/386050.htmlbean涓◢寰娉ㄦ剰鐐圭殑鍦版柟錛?br />1銆乥ean瑕佹湁榛樿鐨勬瀯閫犳柟娉曪紱
2銆佹寔涔呭寲鐨勫睘鎬ц鏈夌浉搴旂殑get/set鏂規硶銆?br />
榪樻湁涓涓氨鏄牴鎹甿apping鏉ュ畾涔墄ml鏂囨。鐨勭粨鏋勶紝鍜岀浉搴旂殑璋冩暣xml鏍煎紡鐨勬柟娉曘?br />
    public static void testMarshal() throws Exception{
        Student bean 
= new Student( "Jack" );

        List
<Teacher> tcrList = new ArrayList<Teacher>();
        tcrList.add( 
new Teacher( "Miss Z""History" ) );
        tcrList.add( 
new Teacher( "Miss X""English" ) );
        bean.setTcrList( tcrList );

        File file 
= new File( FILENAME );
        Writer writer 
= new FileWriter( file );
        Marshaller m 
= new Marshaller( writer );
        Mapping mapping 
= new Mapping();
        mapping.loadMapping( 
"mapping.xml" );
        m.setMapping( mapping );
        m.setEncoding( 
"utf-8" );
        m.marshal( bean );

        
// 1.璇誨彇student.xml鏂囦歡
        String unFormattedXml = CastorUtil.readFile( FILENAME );
        
// 2.鏍煎紡鍖朮ML鏂囦歡
        String formattedXml = CastorUtil.formatXML( unFormattedXml );
        
// 3.鍐欏叆鍒皊tudent.xml鏂囦歡
        CastorUtil.writeFile( FILENAME, formattedXml, falsefalse );
    }

    
public static void testUnmarshal() throws Exception{
        File file 
= new File( FILENAME );
        Reader reader 
= new FileReader( file );
        Mapping mapping 
= new Mapping();
        mapping.loadMapping( 
"mapping.xml" );
        Unmarshaller unmar 
= new Unmarshaller( mapping );
        Student bean 
= (Student)unmar.unmarshal( reader );

        System.out.println( bean.getName() );
        List
<Teacher> list = bean.getTcrList();
        
for( Teacher t : list ){
            System.out.println( t.getName() 
+ "-" + t.getCourse() );
        }
    }

package com._castor;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.StringReader;
import java.io.StringWriter;
import java.io.Writer;

import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;

import org.apache.xml.serialize.OutputFormat;
import org.apache.xml.serialize.XMLSerializer;
import org.w3c.dom.Document;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;

public class CastorUtil{

    
private static Document parseXMLFile( String in )
                                                        
throws ParserConfigurationException,
                                                        SAXException,
                                                        IOException{
        DocumentBuilderFactory dbf 
= DocumentBuilderFactory.newInstance();
        DocumentBuilder db 
= dbf.newDocumentBuilder();
        InputSource is 
= new InputSource( new StringReader( in ) );
        
return db.parse( is );
    }

    
public static String formatXML( String unFormattedXml )
                                                            
throws ParserConfigurationException,
                                                            SAXException,
                                                            IOException{
        
final Document document = parseXMLFile( unFormattedXml );
        OutputFormat format 
= new OutputFormat( document );
        format.setIndenting( 
true );
        format.setLineWidth( 
65 );
        format.setIndent( 
2 );
        format.setEncoding( 
"utf-8" );

        Writer out 
= new StringWriter();
        XMLSerializer serializer 
= new XMLSerializer( out, format );
        serializer.serialize( document );
        
return out.toString();
    }
    
    
public static String readFile( String filePath ) throws IOException{
        StringBuffer fileContent 
= new StringBuffer();
        File file 
= new File( filePath );
        
if( file.isFile() && file.exists() ){
            InputStreamReader read 
= new InputStreamReader( new FileInputStream( file ), "utf-8" );
            BufferedReader reader 
= new BufferedReader( read );
            String line;
            
while( ( line = reader.readLine() ) != null ){
                fileContent.append( line );
            }
            reader.close();
            read.close();
        }
        
return fileContent.toString();
    }

    
/**
     * 鍚戞枃浠朵腑鍐欏叆鍐呭
     * 
     * 
@param filepath
     *            鍐欏叆鏂囦歡鐨勬枃浠惰礬寰?br />     * 
@param write
     *            鍐欏叆鐨勫唴瀹?br />     * 
@param flag1
     *            鏄惁瑕嗙洊錛宼rue-涓嶈鐩栧師鏉ョ殑鍐呭(榪藉姞)錛宖alse-瑕嗙洊鍘熸潵鐨勫唴瀹?br />     * 
@param flag2
     *            鏄惁鎹㈣錛宼rue-鎹㈣鍚庡啓鍏ワ紝false-鐩存帴鍦ㄦ枃浠舵湯灝懼啓鍏?br />     * 
@throws IOException
     
*/
    
public static void writeFile(    String filepath,
                                    String str,
                                    
boolean flag1,
                                    
boolean flag2 ) throws IOException{

        
// 1.浣跨敤File綾繪壘鍒頒竴涓枃浠?/span>
        File file = new File( filepath );

        
// 2.閫氳繃瀛愮被瀹炰緥鍖栫埗綾誨璞?/span>
        OutputStream out = null;// 鍑嗗濂戒竴涓緭鍑虹殑瀵硅薄
        
// flag1=true,榪藉姞;flag1=false,瑕嗙洊
        out = new FileOutputStream( file, flag1 );// 瀹炰緥鍖?br />
        
// 3.浠ュ驚鐜殑鏂瑰紡杈撳嚭
        String result = "";
        
if( flag1 ){
            
if( flag2 ){
                result 
= "\n" + str;
            }
else{
                result 
= str;
            }
        }
else{
            result 
= str;
        }

        
byte b[] = result.getBytes();
        
forint i = 0; i < b.length; i++ ){
            out.write( b[i] );
        }
        out.close();
    }
}

package com._castor;

import java.util.List;

public class Student{
    String name;
    List
<Teacher> tcrList;

    
public Student(){}

    
public Student( String name ){
        
this.name = name;
    }

    
public String getName(){
        
return name;
    }

    
public void setName( String name ){
        
this.name = name;
    }

    
public List<Teacher> getTcrList(){
        
return tcrList;
    }

    
public void setTcrList( List<Teacher> tcrList ){
        
this.tcrList = tcrList;
    }
}

package com._castor;

public class Teacher{
    String name;
    String course;

    
public Teacher(){}

    
public Teacher( String name, String course ){
        
this.name = name;
        
this.course = course;
    }

    
public String getName(){
        
return name;
    }

    
public void setName( String name ){
        
this.name = name;
    }

    
public String getCourse(){
        
return course;
    }

    
public void setCourse( String course ){
        
this.course = course;
    }
}

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapping PUBLIC "-//EXOLAB/Castor Mapping DTD Version 1.0//EN" "http://castor.org/mapping.dtd">
<mapping>
    
<!--
    class鏍囩鎸囨槑闇瑕佹槧灝勭殑綾?br />    name鏄繖涓被鐨勭被鍚嶏紝闇瑕佹寚鏄庣被鐨勫叏璺緞
    Map-to鍙湁鏍瑰厓绱犲搴旂殑綾繪墠閰嶇疆榪欎釜灞炴?鎸囧畾鐨勫間負XML鐨勬牴鍏冪礌鐨勫悕縐?br />    Field 綾誨瓧孌靛拰xml瀛楁涔嬮棿鐨勬槧灝?nbsp;filed涓殑name鏄搴旂被涓瓧孌電殑灞炴у悕瀛?nbsp;TYPE瀵瑰簲鐨勬槸灞炴х被鍨?br />    Bind-xml 鏄痻ml鏂囨。涓搴旂殑瀛楁淇℃伅錛宯ame銆乴ocation鏄敓鎴愮殑XML鍏冪礌鐨勫悕縐?鍙互浠繪剰鎸囧畾,寤鴻灝介噺鍙栧緱鏈夋剰涔?br />    node鎸囨槑鏄痚lement榪樻槸attribute錛岄粯璁ゆ槸element
    
-->
    
    
<class name="com._castor.Student">
        
<map-to xml="student-info"/>
        
<field name="name" type="java.lang.String">
            
<bind-xml name="studentName" node="attribute"/>
        
</field>
        
<field name="tcrList" collection="arraylist" type="com._castor.Teacher">
            
<bind-xml name="teacher"/>
        
</field>
    
</class>
    
    
<class name="com._castor.Teacher">
        
<field name="name" type="java.lang.String">
            
<bind-xml name="name" node="attribute"/>
        
</field>
        
        
<field name="course" type="java.lang.String">
            
<bind-xml name="courseName" node="element"/>
        
</field>
    
</class>
    
</mapping>


]]>
[shell]鍦╳indows涓嬭嚜鍔ㄦ妸浣犱慨鏀硅繃鐨勬枃浠跺鍒版寚瀹氱殑jar鏂囦歡涓?/title><link>http://m.tkk7.com/Man/archive/2011/06/02/351583.html</link><dc:creator>姝ゅ彿宸茶鍒?/dc:creator><author>姝ゅ彿宸茶鍒?/author><pubDate>Thu, 02 Jun 2011 03:52:00 GMT</pubDate><guid>http://m.tkk7.com/Man/archive/2011/06/02/351583.html</guid><wfw:comment>http://m.tkk7.com/Man/comments/351583.html</wfw:comment><comments>http://m.tkk7.com/Man/archive/2011/06/02/351583.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://m.tkk7.com/Man/comments/commentRss/351583.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/Man/services/trackbacks/351583.html</trackback:ping><description><![CDATA[<p><strong><span style="font-weight: bold; font-size: 12pt; font-family: 瀹嬩綋;">鍔熻兘綆浠嬶細</span></strong></p> <p><span style="font-size: 12pt; font-family: Arial;">aj.sh</span>        <span style="font-size: 12pt; font-family: 瀹嬩綋;">鑷姩鎶婁綘</span><strong><span style="font-weight: bold; font-size: 12pt; background: none repeat scroll 0% 0% #ffcc00; font-family: Arial;">鐗堟湰搴?/span></strong><strong><span style="font-weight: bold; font-size: 12pt; background: none repeat scroll 0% 0% #ffcc00; font-family: 瀹嬩綋;">涓嬪浜?/span></strong><strong><span style="font-weight: bold; font-size: 12pt; background: none repeat scroll 0% 0% #ffcc00; font-family: Arial;">checkOut</span></strong><strong><span style="font-weight: bold; font-size: 12pt; background: none repeat scroll 0% 0% #ffcc00; font-family: 瀹嬩綋;">鐘舵?/span></strong><span style="font-size: 12pt; font-family: 瀹嬩綋;">鐨勯潪</span><span style="font-size: 12pt; font-family: Arial;">java</span><span style="font-size: 12pt; font-family: 瀹嬩綋;">鏂囦歡銆?/span><span style="font-size: 12pt; font-family: Arial;">java</span><span style="font-size: 12pt; font-family: 瀹嬩綋;">婧愮爜緙栬瘧鍚庣殑</span><span style="font-size: 12pt; font-family: Arial;">class</span><span style="font-size: 12pt; font-family: 瀹嬩綋;">鏂囦歡錛屽鍒版寚瀹氱殑</span><span style="font-size: 12pt; font-family: Arial;">jar</span><span style="font-size: 12pt; font-family: 瀹嬩綋;">鏂囦歡涓?/span></p> <p><span style="font-size: 12pt; font-family: Arial;">aj24.sh</span>    <span style="font-size: 12pt; font-family: 瀹嬩綋;">鑷姩鎶婁綘<strong><span style="font-weight: bold; background: none repeat scroll 0% 0% #ffcc00;">鏈榪?/span></strong></span><strong><span style="font-weight: bold; font-size: 12pt; background: none repeat scroll 0% 0% #ffcc00; font-family: Arial;">24</span></strong><strong><span style="font-weight: bold; font-size: 12pt; background: none repeat scroll 0% 0% #ffcc00; font-family: 瀹嬩綋;">灝忔椂鍐呬慨鏀硅繃鐨?/span></strong><span style="font-size: 12pt; font-family: 瀹嬩綋;">鐨勯潪</span><span style="font-size: 12pt; font-family: Arial;">java</span><span style="font-size: 12pt; font-family: 瀹嬩綋;">鏂囦歡銆?/span><span style="font-size: 12pt; font-family: Arial;">java</span><span style="font-size: 12pt; font-family: 瀹嬩綋;">婧愮爜緙栬瘧鍚庣殑</span><span style="font-size: 12pt; font-family: Arial;">class</span><span style="font-size: 12pt; font-family: 瀹嬩綋;">鏂囦歡錛屽鍒版寚瀹氱殑</span><span style="font-size: 12pt; font-family: Arial;">jar</span><span style="font-size: 12pt; font-family: 瀹嬩綋;">鏂囦歡涓?/span></p><p><br /><span style="font-size: 12pt; font-family: 瀹嬩綋;"></span></p><p><strong><span style="font-weight: bold; font-size: 12pt; font-family: 瀹嬩綋;">榪愯鏂瑰紡錛?/span></strong></p> <p><span style="font-size: 12pt;">1</span><span style="font-size: 12pt; font-family: 瀹嬩綋;">銆佺敤鏂囨湰緙栬緫鍣ㄦ墦寮</span><span style="font-size: 12pt;">aj.sh</span><span style="font-size: 12pt; font-family: 瀹嬩綋;">銆?/span><span style="font-size: 12pt;">aj24.sh,</span><span style="font-size: 12pt; font-family: 瀹嬩綋;">鏇存敼浠ヤ笅鍑犱釜鍙橀噺錛?/span></p> <p><strong><span style="font-weight: bold; font-size: 12pt; color: red;">jar_file  </span></strong><span style="font-size: 12pt; font-family: 瀹嬩綋;">鎸囧畾</span><span style="font-size: 12pt;">jar</span><span style="font-size: 12pt; font-family: 瀹嬩綋;">鏂囦歡鐨勫畬鏁磋礬寰勶紙娉ㄦ剰璺緞鍒嗛殧絎︿竴寰嬬敤</span><span style="font-size: 12pt;">’<span style="color: red;">/</span>’</span><span style="font-size: 12pt; font-family: 瀹嬩綋;">錛?/span></p> <p><strong><span style="font-weight: bold; font-size: 12pt; color: red;">bin_dir   </span></strong><span style="font-size: 12pt; font-family: 瀹嬩綋;">鎸囧畾</span><span style="font-size: 12pt;">class</span><span style="font-size: 12pt; font-family: 瀹嬩綋;">鎵鍦ㄧ殑</span><span style="font-size: 12pt;">bin</span><span style="font-size: 12pt; font-family: 瀹嬩綋;">瀹屾暣璺緞</span></p> <p><strong><span style="font-weight: bold; font-size: 12pt; color: red;">src_dir   </span></strong><span style="font-size: 12pt; font-family: 瀹嬩綋;">鎸囧畾婧愮爜鎵鍦ㄧ殑</span><span style="font-size: 12pt;">src</span><span style="font-size: 12pt; font-family: 瀹嬩綋;">瀹屾暣璺緞</span></p> <p><span style="font-size: 12pt;">2</span><span style="font-size: 12pt; font-family: 瀹嬩綋;">銆佹墦寮</span><span style="font-size: 12pt;">cygwin</span><span style="font-size: 12pt; font-family: 瀹嬩綋;">錛岃繘鍏ヨ剼鏈枃浠舵墍鍦ㄧ殑鐩綍錛岃繍琛屽涓嬪懡浠わ細</span></p> <p><strong><span style="font-weight: bold; font-size: 12pt; background: none repeat scroll 0% 0% #ffcc00; font-family: Arial;">sh aj.sh</span></strong></p> <p><span style="font-size: 12pt; font-family: 瀹嬩綋;">鎴?/span></p> <p><strong><span style="font-weight: bold; font-size: 12pt; background: none repeat scroll 0% 0% #ffcc00; font-family: Arial;">sh aj24.sh</span></strong></p> <p> </p> <p><strong><span style="font-weight: bold; font-size: 12pt;">ps</span></strong><strong><span style="font-weight: bold; font-size: 12pt; font-family: 瀹嬩綋;">錛?/span></strong></p> <p><strong><span style="font-weight: bold; font-size: 12pt; font-family: 瀹嬩綋;">鎸囧畾</span></strong><strong><span style="font-weight: bold; font-size: 12pt;">cygwin</span></strong><strong><span style="font-weight: bold; font-size: 12pt; font-family: 瀹嬩綋;">鎵撳紑鏃剁殑榛樿璺緞錛?/span></strong></p> <p><span style="font-size: 12pt; font-family: 瀹嬩綋;">鏂板緩涓涓幆澧冨彉閲?/span><strong><span style="font-weight: bold; font-size: 12pt;">HOME</span></strong><span style="font-size: 12pt; font-family: 瀹嬩綋;">錛岃緗負鑴氭湰鏂囦歡鎵鍦ㄧ殑鐩綍銆?/span></p> <p><span style="font-size: 12pt; font-family: 瀹嬩綋;">榪欐牱鍙互鏇村姞鏂逛究銆佸揩閫熷湴榪愯鑴氭湰銆?/span></p> <p><span style="font-size: 12pt; font-family: 瀹嬩綋;">璺緞<strong><span style="font-weight: bold; color: red;">鍒嗗壊絎︾敤‘</span></strong></span><strong><span style="font-weight: bold; font-size: 12pt; color: red;">/</span></strong><strong><span style="font-weight: bold; font-size: 12pt; color: red; font-family: 瀹嬩綋;">’</span></strong><span style="font-size: 12pt;">,</span><span style="font-size: 12pt; font-family: 瀹嬩綋;">紓佺洏絎︾敤</span><span style="font-size: 12pt;">cygdrive</span><span style="font-size: 12pt; font-family: 瀹嬩綋;">琛ㄧず銆?/span><span style="font-size: 12pt;">eg</span><span style="font-size: 12pt; font-family: 瀹嬩綋;">錛?/span><span style="font-size: 12pt;"> <span>d:\shell      </span></span><span style="font-size: 12pt; font-family: 瀹嬩綋;">——銆?/span><span style="font-size: 12pt;">    /cygdrive/d/shell</span></p> <p><br /><span style="font-size: 10pt;"></span></p><p><strong><span style="font-weight: bold; font-size: 12pt; font-family: 瀹嬩綋;">鐜渚濊禆錛?/span></strong></p> <p><span style="font-size: 12pt;">JDK/JRE</span></p> <p><span style="font-size: 12pt;">Cygwin</span></p> <p><strong><span style="font-weight: bold; font-size: 12pt;">cywin</span></strong><strong><span style="font-weight: bold; font-size: 12pt; font-family: 瀹嬩綋;">瀹夎</span></strong><span style="font-size: 12pt; font-family: 瀹嬩綋;">錛氳繘鍏ヤ笅杞介〉</span><span style="font-size: 12pt;"><a title="blocked::http://cygwin.com/install.html" >http://cygwin.com/install.html</a></span><span style="font-size: 12pt; font-family: 瀹嬩綋;">錛屽皢“</span><strong><span style="font-weight: bold; font-size: 12pt;">setup.exe</span></strong><span style="font-size: 12pt; font-family: 瀹嬩綋;">”涓嬭澆鍒版湰鍦拌繍琛岋紝</span><span style="font-size: 12pt; font-family: 瀹嬩綋;">涓璺粯璁ゅ嵆鍙?/span></p> <p><span style="font-size: 12pt; font-family: 瀹嬩綋;">瀹夎鍙傝冩枃妗o細</span><span style="font-size: 12pt;"><a title="blocked::http://goo.gl/eXfzx" >http://goo.gl/eXfzx</a></span></p> <p><a target="_blank" >cygwin甯哥敤鍛戒護鍙奻ind鍛戒護璇存槑 </a></p><div></div><p> </p><p><br /></p> <p><strong><span style="font-weight: bold; font-size: 12pt; font-family: 瀹嬩綋;">緙洪櫡錛?/span></strong></p> <p style="background: none repeat scroll 0% 0% #ffcc00; margin-left: 36pt; text-indent: -36pt;"><span style="font-size: 12pt;"><span>1銆?span style="font: 7pt 'Times New Roman';">            </span></span></span><span style="font-size: 12pt; font-family: 瀹嬩綋;">濡傛灉浣犱慨鏀圭殑鏄?strong><span style="font-weight: bold;">闇瑕佽漿涔夌殑涓枃璧勬簮鏂囦歡</span></strong>錛岄渶瑕佽嚜宸卞幓杞箟鍚庡啀瑕嗙洊榪囧幓銆?/span></p> <p style="background: none repeat scroll 0% 0% #ffcc00; margin-left: 36pt; text-indent: -36pt;"><span style="font-size: 12pt;"><span>2銆?span style="font: 7pt 'Times New Roman';">            </span></span></span><span style="font-size: 12pt; font-family: 瀹嬩綋;">濡傛灉浣犱慨鏀圭殑鏄?/span><strong><span style="font-weight: bold; font-size: 12pt;">java</span></strong><strong><span style="font-weight: bold; font-size: 12pt; font-family: 瀹嬩綋;">鏂囦歡涓殑闈炲唴閮ㄧ被</span></strong><span style="font-size: 12pt; font-family: 瀹嬩綋;">錛屼篃闇瑕佹墜鍔ㄥ幓鎵懼埌璇?/span><span style="font-size: 12pt;">class</span><span style="font-size: 12pt; font-family: 瀹嬩綋;">綾伙紝鍐嶅鍒?/span><span style="font-size: 12pt;">jar</span><span style="font-size: 12pt; font-family: 瀹嬩綋;">鏂囦歡鍘匯?/span></p> <p> </p><p> </p><div><strong><span style="font-weight: bold; font-size: 12pt; font-family: 瀹嬩綋;">鑴氭湰鏂囦歡錛?/span></strong></div><p> </p><p>aj.sh 錛堝皢絎?6琛屾敞閲婃帀錛岀17琛屽幓鎺夋敞閲婏紝鍗充負“aj24.sh”錛?br /></p><div style="background-color: #eeeeee; font-size: 13px; border: 1px solid #cccccc; padding: 4px 5px 4px 4px; width: 98%;"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><span style="color: #008080;"> 1</span> <span style="color: #008000;">#</span><span style="color: #008000;">!/bin/sh<br /></span><span style="color: #008080;"> 2</span> <span style="color: #008000;"># Auto zip the files which are checked out or modified to the target jar file.<br /></span><span style="color: #008080;"> 3</span> <span style="color: #008000;"><br /></span><span style="color: #008080;"> 4</span> <span style="color: #008000;"># Note: use '/' as separator in directory<br /></span><span style="color: #008080;"> 5</span> <span style="color: #008000;"># target jar file</span><span style="color: #008000;"><br /></span><span style="color: #008080;"> 6</span> <span style="color: #008000;"></span><span style="color: #000000;">jar_file</span><span style="color: #000000;">=</span><span style="color: #000000; font-weight: bold;">'</span><span style="color: #000000; font-weight: bold;">G:/demo.jar</span><span style="color: #000000; font-weight: bold;">'</span><span style="color: #000000;"><br /></span><span style="color: #008080;"> 7</span> <span style="color: #000000;"><br /></span><span style="color: #008080;"> 8</span> <span style="color: #000000;"><br /></span><span style="color: #008080;"> 9</span> <span style="color: #000000;"></span><span style="color: #008000;">#</span><span style="color: #008000;"> bin directory of compiled class files</span><span style="color: #008000;"><br /></span><span style="color: #008080;">10</span> <span style="color: #008000;"></span><span style="color: #000000;">bin_dir</span><span style="color: #000000;">=</span><span style="color: #000000; font-weight: bold;">'</span><span style="color: #000000; font-weight: bold;">D:/workspace/demo/bin</span><span style="color: #000000; font-weight: bold;">'</span><span style="color: #000000;"><br /></span><span style="color: #008080;">11</span> <span style="color: #000000;"><br /></span><span style="color: #008080;">12</span> <span style="color: #000000;"></span><span style="color: #008000;">#</span><span style="color: #008000;"> src directory of source files</span><span style="color: #008000;"><br /></span><span style="color: #008080;">13</span> <span style="color: #008000;"></span><span style="color: #000000;">src_dir</span><span style="color: #000000;">=</span><span style="color: #000000; font-weight: bold;">'</span><span style="color: #000000; font-weight: bold;">D:/workspace/demo/src</span><span style="color: #000000; font-weight: bold;">'</span><span style="color: #000000;"><br /></span><span style="color: #008080;">14</span> <span style="color: #000000;"><br /></span><span style="color: #008080;">15</span> <span style="color: #000000;"><br /></span><span style="color: #008080;">16</span> <span style="color: #000000;">condition</span><span style="color: #000000;">=</span><span style="color: #000000; font-weight: bold;">'</span><span style="color: #000000; font-weight: bold;">-perm 644</span><span style="color: #000000; font-weight: bold;">'</span><span style="color: #000000;"><br /></span><span style="color: #008080;">17</span> <span style="color: #000000;"></span><span style="color: #008000;">#</span><span style="color: #008000;">condition=' -mtime 0'</span><span style="color: #008000;"><br /></span><span style="color: #008080;">18</span> <span style="color: #008000;"></span><span style="color: #000000;">c_j</span><span style="color: #000000;">=</span><span style="color: #800000;">0</span><span style="color: #000000;"><br /></span><span style="color: #008080;">19</span> <span style="color: #000000;">c_nj</span><span style="color: #000000;">=</span><span style="color: #800000;">0</span><span style="color: #000000;"><br /></span><span style="color: #008080;">20</span> <span style="color: #000000;">c_c</span><span style="color: #000000;">=</span><span style="color: #800000;">0</span><span style="color: #000000;"><br /></span><span style="color: #008080;">21</span> <span style="color: #000000;">function count_javaFiles<br /></span><span style="color: #008080;">22</span> <span style="color: #000000;">{<br /></span><span style="color: #008080;">23</span> <span style="color: #000000;">    let </span><span style="color: #000000; font-weight: bold;">"</span><span style="color: #000000; font-weight: bold;">c_j=$c_j + 1</span><span style="color: #000000; font-weight: bold;">"</span><span style="color: #000000;"><br /></span><span style="color: #008080;">24</span> <span style="color: #000000;">}<br /></span><span style="color: #008080;">25</span> <span style="color: #000000;">function count_nonJavaFiles<br /></span><span style="color: #008080;">26</span> <span style="color: #000000;">{<br /></span><span style="color: #008080;">27</span> <span style="color: #000000;">    let </span><span style="color: #000000; font-weight: bold;">"</span><span style="color: #000000; font-weight: bold;">c_nj=$c_nj + 1</span><span style="color: #000000; font-weight: bold;">"</span><span style="color: #000000;"><br /></span><span style="color: #008080;">28</span> <span style="color: #000000;">}<br /></span><span style="color: #008080;">29</span> <span style="color: #000000;">function count_classFiles<br /></span><span style="color: #008080;">30</span> <span style="color: #000000;">{<br /></span><span style="color: #008080;">31</span> <span style="color: #000000;">    let </span><span style="color: #000000; font-weight: bold;">"</span><span style="color: #000000; font-weight: bold;">c_c=$c_c + 1</span><span style="color: #000000; font-weight: bold;">"</span><span style="color: #000000;"><br /></span><span style="color: #008080;">32</span> <span style="color: #000000;">}<br /></span><span style="color: #008080;">33</span> <span style="color: #000000;"><br /></span><span style="color: #008080;">34</span> <span style="color: #000000;">function inspectZip<br /></span><span style="color: #008080;">35</span> <span style="color: #000000;">{<br /></span><span style="color: #008080;">36</span> <span style="color: #000000;">    </span><span style="color: #0000ff;">local</span><span style="color: #000000;"> fileName</span><span style="color: #000000;">=</span><span style="color: #000000;">$</span><span style="color: #800000;">1</span><span style="color: #000000;"><br /></span><span style="color: #008080;">37</span> <span style="color: #000000;">    </span><span style="color: #0000ff;">local</span><span style="color: #000000;"> dir_pre</span><span style="color: #000000;">=</span><span style="color: #000000;">$</span><span style="color: #800000;">2</span><span style="color: #000000;"><br /></span><span style="color: #008080;">38</span> <span style="color: #000000;">    </span><span style="color: #0000ff;">local</span><span style="color: #000000;"> line<br /></span><span style="color: #008080;">39</span> <span style="color: #000000;">    </span><span style="color: #0000ff;">local</span><span style="color: #000000;"> list<br /></span><span style="color: #008080;">40</span> <span style="color: #000000;">    </span><span style="color: #0000ff;">local</span><span style="color: #000000;"> myDir_pre<br /></span><span style="color: #008080;">41</span> <span style="color: #000000;">    cd </span><span style="color: #800080;">$bin_dir</span><span style="color: #000000;"><br /></span><span style="color: #008080;">42</span> <span style="color: #000000;">    list</span><span style="color: #000000;">=</span><span style="color: #000000;">` find </span><span style="color: #000000;">.</span><span style="color: #000000;"> </span><span style="color: #000000;">-</span><span style="color: #000000;">name </span><span style="color: #000000; font-weight: bold;">"</span><span style="color: #000000; font-weight: bold;">${fileName}[$.]*class</span><span style="color: #000000; font-weight: bold;">"</span><span style="color: #000000;"> `<br /></span><span style="color: #008080;">43</span> <span style="color: #000000;">        <br /></span><span style="color: #008080;">44</span> <span style="color: #000000;"></span><span style="color: #0000ff;">for</span><span style="color: #000000;"> line in </span><span style="color: #800080;">$list</span><span style="color: #000000;"><br /></span><span style="color: #008080;">45</span> <span style="color: #000000;"></span><span style="color: #0000ff;">do</span><span style="color: #000000;"><br /></span><span style="color: #008080;">46</span> <span style="color: #000000;">    myDir_pre</span><span style="color: #000000;">=</span><span style="color: #000000;">${line</span><span style="color: #000000;">%/*</span><span style="color: #000000;">}<br /></span><span style="color: #008080;">47</span> <span style="color: #000000;">    </span><span style="color: #0000ff;">if</span><span style="color: #000000;"> [ </span><span style="color: #800080;">$myDir_pre</span><span style="color: #000000;"> </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #800080;">$dir_pre</span><span style="color: #000000;"> ]<br /></span><span style="color: #008080;">48</span> <span style="color: #000000;">    then<br /></span><span style="color: #008080;">49</span> <span style="color: #000000;">        jar </span><span style="color: #000000;">-</span><span style="color: #000000;">uvf </span><span style="color: #800080;">$jar_file</span><span style="color: #000000;"> </span><span style="color: #800080;">$line</span><span style="color: #000000;"><br /></span><span style="color: #008080;">50</span> <span style="color: #000000;">        count_classFiles<br /></span><span style="color: #008080;">51</span> <span style="color: #000000;">    fi<br /></span><span style="color: #008080;">52</span> <span style="color: #000000;">done<br /></span><span style="color: #008080;">53</span> <span style="color: #000000;">}<br /></span><span style="color: #008080;">54</span> <span style="color: #000000;"><br /></span><span style="color: #008080;">55</span> <span style="color: #000000;">function easyZip<br /></span><span style="color: #008080;">56</span> <span style="color: #000000;">{<br /></span><span style="color: #008080;">57</span> <span style="color: #000000;">    </span><span style="color: #0000ff;">local</span><span style="color: #000000;"> file</span><span style="color: #000000;">=</span><span style="color: #000000;">$</span><span style="color: #800000;">1</span><span style="color: #000000;"><br /></span><span style="color: #008080;">58</span> <span style="color: #000000;">    jar </span><span style="color: #000000;">-</span><span style="color: #000000;">uvf </span><span style="color: #800080;">$jar_file</span><span style="color: #000000;"> </span><span style="color: #800080;">$file</span><span style="color: #000000;"><br /></span><span style="color: #008080;">59</span> <span style="color: #000000;">    count_nonJavaFiles<br /></span><span style="color: #008080;">60</span> <span style="color: #000000;">}<br /></span><span style="color: #008080;">61</span> <span style="color: #000000;"><br /></span><span style="color: #008080;">62</span> <span style="color: #000000;">cd </span><span style="color: #800080;">$src_dir</span><span style="color: #000000;"><br /></span><span style="color: #008080;">63</span> <span style="color: #000000;">list</span><span style="color: #000000;">=</span><span style="color: #000000;">`find </span><span style="color: #000000;">.</span><span style="color: #000000;"> </span><span style="color: #000000;">-</span><span style="color: #000000;">type f </span><span style="color: #800080;">$condition</span><span style="color: #000000;"> </span><span style="color: #000000;">!</span><span style="color: #000000;"> </span><span style="color: #000000;">\</span><span style="color: #000000;">( </span><span style="color: #000000;">-</span><span style="color: #000000;">name </span><span style="color: #000000; font-weight: bold;">'</span><span style="color: #000000; font-weight: bold;">*.java</span><span style="color: #000000; font-weight: bold;">'</span><span style="color: #000000;"> </span><span style="color: #000000;">-</span><span style="color: #000000;">o </span><span style="color: #000000;">-</span><span style="color: #000000;">name </span><span style="color: #000000; font-weight: bold;">'</span><span style="color: #000000; font-weight: bold;">*.keep</span><span style="color: #000000; font-weight: bold;">'</span><span style="color: #000000;"> </span><span style="color: #000000;">-</span><span style="color: #000000;">o </span><span style="color: #000000;">-</span><span style="color: #000000;">name </span><span style="color: #000000; font-weight: bold;">'</span><span style="color: #000000; font-weight: bold;">*.keep.[0-9]*</span><span style="color: #000000; font-weight: bold;">'</span><span style="color: #000000;"> </span><span style="color: #000000;">-</span><span style="color: #000000;">o </span><span style="color: #000000;">-</span><span style="color: #000000;">name </span><span style="color: #000000; font-weight: bold;">'</span><span style="color: #000000; font-weight: bold;">*.contrib</span><span style="color: #000000; font-weight: bold;">'</span><span style="color: #000000;"> </span><span style="color: #000000;">-</span><span style="color: #000000;">o </span><span style="color: #000000;">-</span><span style="color: #000000;">name </span><span style="color: #000000; font-weight: bold;">'</span><span style="color: #000000; font-weight: bold;">*.contrib.[0-9]*</span><span style="color: #000000; font-weight: bold;">'</span><span style="color: #000000;"> </span><span style="color: #000000;">\</span><span style="color: #000000;">)`<br /></span><span style="color: #008080;">64</span> <span style="color: #000000;"></span><span style="color: #0000ff;">for</span><span style="color: #000000;"> line in </span><span style="color: #800080;">$list</span><span style="color: #000000;"><br /></span><span style="color: #008080;">65</span> <span style="color: #000000;"></span><span style="color: #0000ff;">do</span><span style="color: #000000;"><br /></span><span style="color: #008080;">66</span> <span style="color: #000000;">    easyZip </span><span style="color: #800080;">$line</span><span style="color: #000000;"><br /></span><span style="color: #008080;">67</span> <span style="color: #000000;">done<br /></span><span style="color: #008080;">68</span> <span style="color: #000000;"><br /></span><span style="color: #008080;">69</span> <span style="color: #000000;">list</span><span style="color: #000000;">=</span><span style="color: #000000;">`find </span><span style="color: #000000;">.</span><span style="color: #000000;"> </span><span style="color: #000000;">-</span><span style="color: #000000;">type f </span><span style="color: #800080;">$condition</span><span style="color: #000000;"> </span><span style="color: #000000;">-</span><span style="color: #000000;">name </span><span style="color: #000000; font-weight: bold;">'</span><span style="color: #000000; font-weight: bold;">*.java</span><span style="color: #000000; font-weight: bold;">'</span><span style="color: #000000;"> `<br /></span><span style="color: #008080;">70</span> <span style="color: #000000;"></span><span style="color: #0000ff;">for</span><span style="color: #000000;"> line in </span><span style="color: #800080;">$list</span><span style="color: #000000;"><br /></span><span style="color: #008080;">71</span> <span style="color: #000000;"></span><span style="color: #0000ff;">do</span><span style="color: #000000;"><br /></span><span style="color: #008080;">72</span> <span style="color: #000000;">    dir_pre</span><span style="color: #000000;">=</span><span style="color: #000000;">${line</span><span style="color: #000000;">%/*</span><span style="color: #000000;">}<br /></span><span style="color: #008080;">73</span> <span style="color: #000000;">    fileName</span><span style="color: #000000;">=</span><span style="color: #000000;">`echo ${line</span><span style="color: #008000;">#</span><span style="color: #008000;">#*/} | cut -d '.' -f1`</span><span style="color: #008000;"><br /></span><span style="color: #008080;">74</span> <span style="color: #008000;"></span><span style="color: #000000;">    <br /></span><span style="color: #008080;">75</span> <span style="color: #000000;">    inspectZip </span><span style="color: #800080;">$fileName</span><span style="color: #000000;"> </span><span style="color: #800080;">$dir_pre</span><span style="color: #000000;"><br /></span><span style="color: #008080;">76</span> <span style="color: #000000;">    count_javaFiles<br /></span><span style="color: #008080;">77</span> <span style="color: #000000;">done<br /></span><span style="color: #008080;">78</span> <span style="color: #000000;"><br /></span><span style="color: #008080;">79</span> <span style="color: #000000;"><br /></span><span style="color: #008080;">80</span> <span style="color: #000000;">echo </span><span style="color: #000000; font-weight: bold;">"</span><span style="color: #000000; font-weight: bold;">non-java files: $c_nj</span><span style="color: #000000; font-weight: bold;">"</span><span style="color: #000000;"><br /></span><span style="color: #008080;">81</span> <span style="color: #000000;">echo </span><span style="color: #000000; font-weight: bold;">"</span><span style="color: #000000; font-weight: bold;">java files: $c_j</span><span style="color: #000000; font-weight: bold;">"</span><span style="color: #000000;"><br /></span><span style="color: #008080;">82</span> <span style="color: #000000;">echo </span><span style="color: #000000; font-weight: bold;">"</span><span style="color: #000000; font-weight: bold;">class files: $c_c</span><span style="color: #000000; font-weight: bold;">"</span><span style="color: #000000;"><br /></span><span style="color: #008080;">83</span> <span style="color: #000000;">echo </span><span style="color: #000000; font-weight: bold;">"</span><span style="color: #000000; font-weight: bold;">total files:  $[$c_nj + $c_c]</span><span style="color: #000000; font-weight: bold;">"</span><span style="color: #000000;"><br /></span><span style="color: #008080;">84</span> <span style="color: #000000;"></span></div><img src ="http://m.tkk7.com/Man/aggbug/351583.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/Man/" target="_blank">姝ゅ彿宸茶鍒?/a> 2011-06-02 11:52 <a href="http://m.tkk7.com/Man/archive/2011/06/02/351583.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>HttpClient4鐨刢ookie rejected闂錛屼互鍙婂浣曟秷闄よwarning杈撳嚭http://m.tkk7.com/Man/archive/2011/02/10/344019.html姝ゅ彿宸茶鍒?/dc:creator>姝ゅ彿宸茶鍒?/author>Thu, 10 Feb 2011 07:33:00 GMThttp://m.tkk7.com/Man/archive/2011/02/10/344019.htmlhttp://m.tkk7.com/Man/comments/344019.htmlhttp://m.tkk7.com/Man/archive/2011/02/10/344019.html#Feedback0http://m.tkk7.com/Man/comments/commentRss/344019.htmlhttp://m.tkk7.com/Man/services/trackbacks/344019.html Normal 0 7.8 紓? 0 2 false false false MicrosoftInternetExplorer4

鐜錛?span>HttpClient4.0.1

鍙戠幇鍦ㄦ墽琛宧ttpClient鍐欑殑demo鏃朵細杈撳嚭涓涓鍛婏紙浠ュ墠娌¤繖涓鍛婂嚭鐜幫級錛?/span>

璀﹀憡: Cookie rejected: "$Version=0; ID=XXXXXX:FG=1; $Path=/; $Domain=XXXXX". Illegal domain attribute ".XXXXXX". Domain of origin: "XX.XXX.XXX.XXX"


緗戜笂浜嗚В浜嗕竴涓嬶紝澶ц嚧鏄httpclient鐨勮姹傞粯璁ゆ槸闇瑕乧ookie鐨勶紝浣嗘槸榛樿CookiePolicy.BROWSER_COMPATIBILITY錛屾槸RFC2109錛宑ookie ver1錛岀幇鍦≧FC2965 瀹氫箟浜哻ookie鐨勭浜屼釜鐗堟湰錛屾墍浠ヨ鑷繁璁劇疆涓?/span>

CookiePolicy.postMethod.getParams().setParameter("http.protocol.cookie-policy",CookiePolicy.BROWSER_COMPATIBILITY);


浣嗕嬌鐢ㄨ鏂規硶浠嶇劧浼氭湁璇arning杈撳嚭銆傞毦閬撴槸鏈漢閲囩敤鐨刪ttpclient鐗堟湰闂鍚楋紵


緇撳悎HttpClient4.0.1鐨勬枃妗?/a>鐨勭涓夌珷錛屽彲浠ラ氳繃3.6鎵鎻愮殑鑷畾涔塩ookie絳栫暐錛屾潵娑堥櫎璇arning鐨勮緭鍑恒?span>
浣嗚鏂規鍙槸灝唙alidate鏂規硶閲嶅啓涓虹┖鏂規硶鈥斺斿浜巆ookie楠岃瘉浠涔堜篃涓嶅仛銆?/span>


        // 
瀹氬埗cookie絳栫暐
        CookieSpecFactory csf = new CookieSpecFactory(){
            
public CookieSpec newInstance(HttpParams params){
                
return new BrowserCompatSpec(){
                    @Override
                    
public void validate(Cookie cookie, CookieOrigin origin)
                    
throws MalformedCookieException{
                        
//Oh, I am easy
                    }
                };
            }
        };
        httpClient.getCookieSpecs().register("easy", csf);
        httpClient.getParams().setParameter(ClientPNames.COOKIE_POLICY, "easy");


鎬葷粨錛氭渶鍚庡彧鏄氳繃鑰佸瓙“鏃犱負”鐨勬柟寮忓幓鎺夎warning錛屼絾瀵逛簬璇ュ紓甯鎬駭鐢熺殑鐪熸鍘熷洜浠嶇劧涓嶆槑紜傘傘?/span>



]]>
keyTool鐨勭敤娉?/title><link>http://m.tkk7.com/Man/archive/2011/01/11/342777.html</link><dc:creator>姝ゅ彿宸茶鍒?/dc:creator><author>姝ゅ彿宸茶鍒?/author><pubDate>Tue, 11 Jan 2011 07:56:00 GMT</pubDate><guid>http://m.tkk7.com/Man/archive/2011/01/11/342777.html</guid><wfw:comment>http://m.tkk7.com/Man/comments/342777.html</wfw:comment><comments>http://m.tkk7.com/Man/archive/2011/01/11/342777.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/Man/comments/commentRss/342777.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/Man/services/trackbacks/342777.html</trackback:ping><description><![CDATA[杞嚜http://blog.chinaunix.net/u/3641/showart_506402.html <br /> Xfire瀹炵幇WSS涔嬪垱寤哄瘑閽ュ鍜屾暟瀛楄瘉涔? <br /> 絳懼悕鍜屽姞瀵嗛渶瑕佷嬌鐢ㄥ埌鏁板瓧璇佷功鍜屽瘑閽ュ錛屽彲浠ヤ嬌鐢↗DK鎻愪緵鐨凨eyTool宸ュ叿鍒涘緩瀵嗛挜瀵瑰拰鏁板瓧璇佷功銆傛垜浠垎鍒負鏈嶅姟绔拰瀹㈡埛绔垱寤篟SA瀵嗛挜 瀵癸紝騫剁敓鎴愬悇鑷殑鏁板瓧璇佷功錛堝寘鍚叕閽ュ拰鏁板瓧絳懼悕錛夈傛湇鍔$鍜屽鎴風鎷ユ湁鍚勮嚜鐨勫瘑閽ュ簱JKS鏂囦歡錛屾湇鍔$鐨勫瘑閽ュ簱淇濆瓨鏈嶅姟绔殑瀵嗛挜瀵瑰拰瀹㈡埛绔殑鏁板瓧璇佷功錛岃? 瀹㈡埛绔殑瀵嗛挜搴撲繚瀛樺鎴風鐨勫瘑閽ュ鍜屾湇鍔$鐨勬暟瀛楄瘉涔︺? <br /> <br /> 涓嬮潰錛屾垜浠潵鐪嬬湅xfire鎻愪緵鐨勪緥瀛愶細 <br /> <br /> <XFIRE_HOME>/examples/ws-security/keys/generateKeyPair.bat鎵瑰鐞嗘枃浠訛細 <br /> rem @echo off <br /> <br /> #鎺ュ彈鍙傛暟 <br /> <br /> echo alias %1 <br /> <br /> echo keypass %2 <br /> <br /> echo keystoreName %3 <br /> <br /> echo KeyStorePass %4 <br /> <br /> echo keyName %5 <br /> <br /> 鍒涘緩RSA瀵嗛挜瀵? <br /> keytool -genkey -alias %1 -keypass %2 -keystore %3 -storepass %4 -dname "cn=%1" -keyalg RSA <br /> 浣跨敤縐侀挜榪涜鑷鍚? <br /> keytool -selfcert -alias %1 -keystore %3 -storepass %4 -keypass %2 <br /> 瀵煎嚭鏁板瓧璇佷功 <br /> keytool -export -alias %1 -file %5 -keystore %3 -storepass %4 <br /> <XFIRE_HOME>/examples/ws-security/keys/generateServerKey.bat鏂囦歡錛? <br /> 涓嬮潰涓よ鍛藉悕鍒嗗埆璋冪敤generateKeyPair.bat鎵瑰鐞嗘枃浠朵負鏈嶅姟绔拰瀹㈡埛绔敓鎴愬瘑閽ュ <br /> call generateKeyPair.bat server serverpass serverStore.jks storepass serverKey.rsa <br /> call generateKeyPair.bat client clientpass clientStore.jks storepass clientKey.rsa <br /> 灝嗘湇鍔$鐨勬暟瀛楄瘉涔﹀鍏ュ鎴風鐨勫瘑閽ュ簱 <br /> keytool -import -alias server -file serverKey.rsa -keystore clientStore.jks -storepass storepass -noprompt <br /> 灝嗗鎴風鐨勬暟瀛楄瘉涔﹀鍏ユ湇鍔$鐨勫瘑閽ュ簱 <br /> keytool -import -alias client -file clientKey.rsa -keystore serverStore.jks -storepass storepass -noprompt <br /> 榪愯璇ユ壒澶勭悊鏂囦歡鍚庯紝灝嗗垎鍒負鏈嶅姟绔拰瀹㈡埛绔敓鎴愪竴涓狫ava瀵嗛挜搴撴枃浠訛紝瀹冧滑鍒嗗埆鎷ユ湁涓涓嚜宸辯殑瀵嗛挜瀵瑰拰瀵規柟鐨勬暟瀛楄瘉涔︺傛垜浠氳繃琛?瀵逛袱鑰呭瘑閽ュ簱鏂囦歡鐨勫唴瀹硅繘琛岃鏄庯細 <br /> <br /> 琛?瀵嗛挜搴撹鏄? <br /> <br /> <br /> 鏈嶅姟绔疛ava瀵嗛挜搴? <br /> 瀹㈡埛绔疛ava瀵嗛挜搴? <br /> <br /> 瀵瑰簲瀵嗛挜搴撴枃浠? <br /> serverStore.jks <br /> clientStore.jks <br /> <br /> 瀵嗛挜搴撳瘑鐮? <br /> storepass <br /> storepass <br /> <br /> 搴撲腑鍖呭惈鐨勫唴瀹? <br /> server瀵嗛挜瀵廣乧lient鏁板瓧璇佷功 <br /> client瀵嗛挜瀵廣乻erver鏁板瓧璇佷功 <br /> <br /> 瀵嗛挜瀵瑰埆鍚? <br /> server <br /> client <br /> <br /> 瀵嗛挜瀵圭閽ョ殑淇濇姢瀵嗙爜 <br /> serverpass <br /> clientpass <img src ="http://m.tkk7.com/Man/aggbug/342777.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/Man/" target="_blank">姝ゅ彿宸茶鍒?/a> 2011-01-11 15:56 <a href="http://m.tkk7.com/Man/archive/2011/01/11/342777.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>[demo]鍒涘緩涓涓猺mi紼嬪簭http://m.tkk7.com/Man/archive/2011/01/10/342704.html姝ゅ彿宸茶鍒?/dc:creator>姝ゅ彿宸茶鍒?/author>Mon, 10 Jan 2011 10:27:00 GMThttp://m.tkk7.com/Man/archive/2011/01/10/342704.htmlhttp://m.tkk7.com/Man/comments/342704.htmlhttp://m.tkk7.com/Man/archive/2011/01/10/342704.html#Feedback0http://m.tkk7.com/Man/comments/commentRss/342704.htmlhttp://m.tkk7.com/Man/services/trackbacks/342704.html
1銆佸綋鍓嶇紪璇戝悗鐨刢lass鍦╞in鐩綍涓?br /> 2銆佹敞鍐岋細寮涓涓猚md錛屽埌bin鐩綍涓嬭繍琛?#8220;rmiregistry”
3銆佺敓鎴恠tub鍜宻kel鐨刢lass鏂囦歡錛氬紑涓涓猚md錛屽埌bin鐩綍涓嬭繍琛?#8220;rmic -vcompat com.rmi.CalculatorImpl”
4銆佺紪鍐欐巿鏉冩枃浠秔olicy.txt
5銆佸惎鍔ㄦ湇鍔″櫒錛氬紑涓涓猚md錛屽埌bin鐩綍涓嬭繍琛?#8220;java -Djava.security.policy=com.rmi.policy.txt com.rmi.Ca
culatorServer”
6銆佽繍琛屽鎴風錛氬紑涓涓猚md錛屽埌bin鐩綍涓嬭繍琛?#8220;D:\workspace\demo\bin>java -Djava.security.policy=com.rmi.policy.txt com.rmi.Cal
culatorClient”


package com._rmi;

import java.rmi.Remote;

public interface Calculator extends Remote {

    
public long add(long a, long b) throws java.rmi.RemoteException;

    
public long sub(long a, long b) throws java.rmi.RemoteException;

    
public long mul(long a, long b) throws java.rmi.RemoteException;

    
public long div(long a, long b) throws java.rmi.RemoteException;
}
 
package com._rmi;

import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;

public class CalculatorImpl extends UnicastRemoteObject implements Calculator {

    
public CalculatorImpl() throws RemoteException
    {
        
super();
    }
    @Override
    
public long add(long a, long b) throws RemoteException {
        
// TODO Auto-generated method stub
        return a+b;
    }

    @Override
    
public long div(long a, long b) throws RemoteException {
        
// TODO Auto-generated method stub
        return a/b;
    }

    @Override
    
public long mul(long a, long b) throws RemoteException {
        
// TODO Auto-generated method stub
        return a*b;
    }

    @Override
    
public long sub(long a, long b) throws RemoteException {
        
// TODO Auto-generated method stub
        return a-b;
    }

}
   
package com._rmi;

import java.rmi.Naming;
public class CalculatorServer {

    
public CalculatorServer()
    {
        
try
        {
            Calculator c 
= new CalculatorImpl();
            Naming.rebind(
"rmi://localhost:1099/CalculatorService", c);
        }
        
catch(Exception e)
        {
            System.out.println(e);
        }
    }
    
    
/**
     * 
@param args
     
*/
    
public static void main(String[] args) {
        
new CalculatorServer();
    }

}

package com._rmi;

import java.rmi.Naming;

public class CalculatorClient {

    
/**
     * 
@param args
     
*/
    
public static void main(String[] args) {
        
try {
            Calculator c 
= (Calculator) Naming
                    .lookup(
"rmi://localhost/CalculatorService");
            
            System.out.println( c.add(
1,2) );
            System.out.println( c.sub(
1,2) );
            System.out.println( c.mul(
1,2) );
            System.out.println( c.div(
1,2) );
        } 
catch (Exception e) {
            e.printStackTrace();
        }

    }

}




]]>
eclipse鐨勬彁紺哄揩鎹烽敭鈥渁lt+/鈥濆け鏁堢殑闂http://m.tkk7.com/Man/archive/2010/11/25/339049.html姝ゅ彿宸茶鍒?/dc:creator>姝ゅ彿宸茶鍒?/author>Thu, 25 Nov 2010 09:53:00 GMThttp://m.tkk7.com/Man/archive/2010/11/25/339049.htmlhttp://m.tkk7.com/Man/comments/339049.htmlhttp://m.tkk7.com/Man/archive/2010/11/25/339049.html#Feedback0http://m.tkk7.com/Man/comments/commentRss/339049.htmlhttp://m.tkk7.com/Man/services/trackbacks/339049.html Content Assist   Alt+/

2銆佸湪蹇嵎閿緗紜殑鎯呭喌浠嶆病鏈夋晥鏋滅殑錛屽垯榪涘叆濡備笅浣嶇疆
Window-Preferences-Java-Editor-Content Assist-Advanced
灝嗗彸杈歸偅浜涢夐」鍏ㄦ墦涓婂嬀鍗沖彲銆?br />


]]>
錛堣漿錛塇ttpClient鍩虹http://m.tkk7.com/Man/archive/2010/09/06/331263.html姝ゅ彿宸茶鍒?/dc:creator>姝ゅ彿宸茶鍒?/author>Mon, 06 Sep 2010 15:57:00 GMThttp://m.tkk7.com/Man/archive/2010/09/06/331263.htmlhttp://m.tkk7.com/Man/comments/331263.htmlhttp://m.tkk7.com/Man/archive/2010/09/06/331263.html#Feedback0http://m.tkk7.com/Man/comments/commentRss/331263.htmlhttp://m.tkk7.com/Man/services/trackbacks/331263.html闃呰鍏ㄦ枃

]]>
jar鍛戒護http://m.tkk7.com/Man/archive/2010/08/09/jar.html姝ゅ彿宸茶鍒?/dc:creator>姝ゅ彿宸茶鍒?/author>Mon, 09 Aug 2010 07:27:00 GMThttp://m.tkk7.com/Man/archive/2010/08/09/jar.htmlhttp://m.tkk7.com/Man/comments/328317.htmlhttp://m.tkk7.com/Man/archive/2010/08/09/jar.html#Feedback0http://m.tkk7.com/Man/comments/commentRss/328317.htmlhttp://m.tkk7.com/Man/services/trackbacks/328317.html闃呰鍏ㄦ枃

]]>
jar鍖呬腑鐨勭被濡備綍璇誨彇鍖呭唴鍜屽寘澶栫殑閰嶇疆鏂囦歡http://m.tkk7.com/Man/archive/2010/05/05/320159.html姝ゅ彿宸茶鍒?/dc:creator>姝ゅ彿宸茶鍒?/author>Wed, 05 May 2010 15:52:00 GMThttp://m.tkk7.com/Man/archive/2010/05/05/320159.htmlhttp://m.tkk7.com/Man/comments/320159.htmlhttp://m.tkk7.com/Man/archive/2010/05/05/320159.html#Feedback0http://m.tkk7.com/Man/comments/commentRss/320159.htmlhttp://m.tkk7.com/Man/services/trackbacks/320159.html
out.properties
a.jar
-com
-a.class
-in.properties

濡備笂鎵紺猴紝out.properties鏄簬a.jar鍖呭湪鍚屼竴鏂囦歡鐩綍涓嬶紱
in.properties鏄湪a.jar鍖呭唴閮ㄧ殑銆?br />
鍏充簬a.class濡備綍璇誨彇jar鍐呮垨jar澶栫殑閰嶇疆鏂囦歡錛?br /> 濡備笅鎵紺猴細
FileInputStream inputStream1 = new FileInputStream("out.properties");
InputStream inputStream2 
= a.class.getResourceAsStream("/in.properties");

閰嶇疆鏂囦歡鐨勮鍙栦綅緗秹鍙婂埌綾誨姞杞藉櫒鐨勫姞杞界瓥鐣ワ紝鍏蜂綋緇嗚妭闂璇鋒煡闃呯被鍔犺澆鍣ㄥ強getResourceAsStream鏂規硶鐨勬簮鐮佸拰鐩稿叧鏂囨。錛屾澶勪笉緇嗚〃銆?br />




]]>
鍒椾婦Java鏃ュ巻綾籆alendar鐨勪竴浜涘父鐢ㄦ柟娉?/title><link>http://m.tkk7.com/Man/archive/2009/07/09/Calendar.html</link><dc:creator>姝ゅ彿宸茶鍒?/dc:creator><author>姝ゅ彿宸茶鍒?/author><pubDate>Thu, 09 Jul 2009 07:37:00 GMT</pubDate><guid>http://m.tkk7.com/Man/archive/2009/07/09/Calendar.html</guid><wfw:comment>http://m.tkk7.com/Man/comments/286093.html</wfw:comment><comments>http://m.tkk7.com/Man/archive/2009/07/09/Calendar.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/Man/comments/commentRss/286093.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/Man/services/trackbacks/286093.html</trackback:ping><description><![CDATA[     鎽樿: 1銆佸皢String綾誨瀷"yyyy-mm-dd"鏍煎紡鐨勫瓧絎︿覆鏃ユ湡杞崲涓篊alendar瀵硅薄 <br>2銆佽繑鍥炶緭鍏ョ殑Calendar鏃ユ湡鎵鍦ㄦ槦鏈熺殑鏄熸湡涓鐨勬棩鏈?<br>3銆佽繑鍥炶緭鍏ョ殑Calendar鏃ユ湡鎵鍦ㄦ湀鐨勭涓澶╃殑鏃ユ湡 <br>4銆佽繑鍥炶鏃ユ湡鐨勫勾浠?<br>5銆佽繑鍥炶鏃ユ湡鐨勬湀浠?<br>6銆佽繑鍥炶鏃ユ湡鎵鍦ㄦ槦鏈熸槸璇ユ湀鐨勭鍑犱釜鏄熸湡  <a href='http://m.tkk7.com/Man/archive/2009/07/09/Calendar.html'>闃呰鍏ㄦ枃</a><img src ="http://m.tkk7.com/Man/aggbug/286093.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/Man/" target="_blank">姝ゅ彿宸茶鍒?/a> 2009-07-09 15:37 <a href="http://m.tkk7.com/Man/archive/2009/07/09/Calendar.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <p>感谢您访问我们的网站,您可能还对以下资源感兴趣:</p> <a href="http://m.tkk7.com/" title="亚洲av成人片在线观看">亚洲av成人片在线观看</a> <div class="friend-links"> </div> </div> </footer> 主站蜘蛛池模板: <a href="http://shzzhsy.com" target="_blank">亚洲色无码专区在线观看</a>| <a href="http://pengkaimjg.com" target="_blank">亚洲一区二区三区亚瑟</a>| <a href="http://saohu533.com" target="_blank">亚洲国产成人久久一区二区三区</a>| <a href="http://by22877.com" target="_blank">少妇无码一区二区三区免费</a>| <a href="http://www-887234.com" target="_blank">无码乱人伦一区二区亚洲</a>| <a href="http://chuoche.com" target="_blank">成人精品综合免费视频</a>| <a href="http://18888kj.com" target="_blank">成熟女人牲交片免费观看视频</a>| <a href="http://zjtuhui.com" target="_blank">亚洲五月激情综合图片区</a>| <a href="http://9844555.com" target="_blank">亚洲AV无码XXX麻豆艾秋</a>| <a href="http://junfurui.com" target="_blank">亚洲精品国产高清在线观看</a>| <a href="http://yy9977.com" target="_blank">国产亚洲福利一区二区免费看</a>| <a href="http://aqd1987.com" target="_blank">91在线免费视频</a>| <a href="http://woaianli.com" target="_blank">国产乱子影视频上线免费观看</a>| <a href="http://456jjj.com" target="_blank">亚洲成a∧人片在线观看无码</a>| <a href="http://350725.com" target="_blank">国产亚洲精品xxx</a>| <a href="http://8xk7u9.com" target="_blank">国产又黄又爽又猛的免费视频播放</a>| <a href="http://ittenyear.com" target="_blank">亚洲精品视频在线观看免费</a>| <a href="http://91ttvv.com" target="_blank">久久亚洲欧美国产精品</a>| <a href="http://datian-cn.com" target="_blank">久久乐国产综合亚洲精品</a>| <a href="http://shaiyahx.com" target="_blank">97亚洲熟妇自偷自拍另类图片</a>| <a href="http://yu388.com" target="_blank">国产亚洲精品a在线无码</a>| <a href="http://wwwly6080.com" target="_blank">久久精品国产亚洲精品</a>| <a href="http://www48646.com" target="_blank">免费一级毛片不卡不收费</a>| <a href="http://6363388.com" target="_blank">免费观看的a级毛片的网站</a>| <a href="http://26uuyy.com" target="_blank">a毛片基地免费全部视频</a>| <a href="http://wwyw99977.com" target="_blank">91大神在线免费观看</a>| <a href="http://222941.com" target="_blank">99久久久国产精品免费牛牛</a>| <a href="http://chinahongfeng.com" target="_blank">99久久国产精品免费一区二区</a>| <a href="http://591se591se.com" target="_blank">性做久久久久久免费观看</a>| <a href="http://guhey.com" target="_blank">亚洲成色在线综合网站</a>| <a href="http://6123fa.com" target="_blank">羞羞视频免费网站在线看</a>| <a href="http://mangaou.com" target="_blank">亚洲精品国产精品国自产观看</a>| <a href="http://5tww.com" target="_blank">亚洲av无码一区二区三区在线播放 </a>| <a href="http://97chaopeng2.com" target="_blank">亚洲AV一区二区三区四区</a>| <a href="http://6217c.com" target="_blank">无码中文字幕av免费放dvd</a>| <a href="http://5gi555.com" target="_blank">亚洲色婷婷六月亚洲婷婷6月</a>| <a href="http://qingdaostf.com" target="_blank">美女被爆羞羞网站在免费观看</a>| <a href="http://zfzz008.com" target="_blank">免费无码AV电影在线观看</a>| <a href="http://mcjc1.com" target="_blank">国产亚洲国产bv网站在线</a>| <a href="http://igo98.com" target="_blank">午夜亚洲国产理论秋霞</a>| <a href="http://fanhaogo.com" target="_blank">羞羞视频免费网站在线看</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>