<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    軟件是對質量的不懈追求

    2010年7月28日 #

    linux du 查看文件夾占用空間


    du -sh *

    posted @ 2011-04-15 08:39 BlakeSu 閱讀(280) | 評論 (0)編輯 收藏

    Building Standalone Application with Maven2

    If you are building standalone application in Java, Maven is your friend when packing your application,
    There are two way to let Maven package your application, either as a single jar with all your dependencies jar.


     <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-assembly-plugin</artifactId>
      <configuration>
       <descriptorRefs>
        <descriptorRef>jar-with-dependencies</descriptorRef>
       </descriptorRefs>
      </configuration>
     </plugin>



    One advantage if you choose to do this way is if you need to sign your application jar.
    This is needed if you are building a Java Web Start client and you need more access than connecting back to the server.
    To read more about have Maven signing your jar read http://maven.apache.org/plugins/maven-jar-plugin/usage.html.
    But if you choose to go this way, make sure that all license agreement are shipped with your one single jar.

    Another way is to let Maven package your source code only and then referring the dependent jar file from the MANIFEST file.


     <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-jar-plugin</artifactId>
      <configuration>
       <archive>
        <manifest>
         <addClasspath>true</addClasspath>
         <mainClass>se.msc.adapter.Main</mainClass>
         <classpathPrefix>lib/</classpathPrefix>
        </manifest>
       </archive>
      </configuration>
     </plugin>

    posted @ 2011-02-24 13:03 BlakeSu 閱讀(329) | 評論 (0)編輯 收藏

    eclipse 終于有了列編輯功能

    eclipse 3.5之后終于有了列編輯,快捷鍵是alt+shift+a,再次按此快捷鍵返回常規編輯狀態。


    posted @ 2010-10-15 11:33 BlakeSu 閱讀(1484) | 評論 (0)編輯 收藏

    LineNumberReader 指定文件編碼


    import java.io.FileInputStream;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.io.LineNumberReader;


    public class Main {
        
        
    public static void main(String[] args) throws IOException {

            InputStreamReader isr 
    = new InputStreamReader(new FileInputStream("15370720.pdf4"), "utf-16");
            LineNumberReader lnr
    =new LineNumberReader(isr);
            String line 
    = null;
            
    while((line=lnr.readLine())!=null){  
               System.out.println(lnr.getLineNumber()
    +"\t"+line);
            }
       }
    }

    posted @ 2010-08-05 09:13 BlakeSu 閱讀(1049) | 評論 (0)編輯 收藏

    Class.getResourceAsStream 和 ClassLoader.getResourceAsStream

    兩個方法的區別是資源的定義不同, 一個主要用于相對與一個object取資源,而另一個用于取相對于classpath的
    資源,用的是絕對路徑。

    在使用Class.getResourceAsStream 時, 資源路徑有兩種方式, 一種以 / 開頭,則這樣的路徑是指定絕對
    路徑, 如果不以 / 開頭, 則路徑是相對與這個class所在的包的。

    在使用ClassLoader.getResourceAsStream時, 路徑直接使用相對于classpath的絕對路徑。

    舉例,下面的三個語句,實際結果是一樣的:
       com.explorers.Test.class.getResourceAsStream("abc.jpg")
    = com.explorers.Test.class.getResourceAsStream("/com/explorers/abc.jpg")
    = ClassLoader.getResourceAsStream("com/explorers/abc.jpg")

    posted @ 2010-07-28 16:31 BlakeSu 閱讀(294) | 評論 (0)編輯 收藏

    主站蜘蛛池模板: 性做久久久久久免费观看| 免费黄网站在线看| 四虎影视免费在线| 亚洲人成自拍网站在线观看| 拨牐拨牐x8免费| 亚洲a∨国产av综合av下载| 好吊妞视频免费视频| 亚洲欧美aⅴ在线资源| 免费国产怡红院在线观看| 美女被免费网站在线视频免费| 国产精品无码素人福利免费| 国产精品亚洲а∨无码播放麻豆| 在线看片无码永久免费aⅴ| 美女被免费视频网站a| 亚洲一级片免费看| 久久美女网站免费| 亚洲国产成人久久三区| 在线免费观看污网站| 在线亚洲v日韩v| 亚洲热线99精品视频| 6080午夜一级毛片免费看6080夜福利| 亚洲国产日韩在线人成下载| 日韩在线免费播放| 九九热久久免费视频| 亚洲白色白色永久观看| 免费看的成人yellow视频| 一级毛片免费不卡| 亚洲综合视频在线观看| 久久不见久久见免费影院| 无套内射无矿码免费看黄| 久久亚洲精品无码| 最近2019中文免费字幕| 久久久久久国产a免费观看不卡| 亚洲综合激情另类小说区| 免费看香港一级毛片| 最近中文字幕大全免费版在线| 亚洲精品日韩专区silk| 又爽又黄无遮挡高清免费视频| 无码av免费一区二区三区试看| 伊人久久五月丁香综合中文亚洲| 亚洲五月午夜免费在线视频|