• java编译


    查看jar包内容

    jar vtf  /jar/path/org/apache/commons/commons-lang3/3.3.2/commons-lang3-3.3.2.jar

         0 Sun Apr 06 14:19:20 CST 2014 META-INF/
      1854 Sun Apr 06 14:19:18 CST 2014 META-INF/MANIFEST.MF
         0 Sun Apr 06 14:07:50 CST 2014 org/
         0 Sun Apr 06 14:07:50 CST 2014 org/apache/
         0 Sun Apr 06 14:07:50 CST 2014 org/apache/commons/
         0 Sun Apr 06 14:18:58 CST 2014 org/apache/commons/lang3/
         0 Sun Apr 06 14:18:58 CST 2014 org/apache/commons/lang3/builder/
         0 Sun Apr 06 14:18:58 CST 2014 org/apache/commons/lang3/concurrent/
         0 Sun Apr 06 14:18:58 CST 2014 org/apache/commons/lang3/event/
         0 Sun Apr 06 14:18:58 CST 2014 org/apache/commons/lang3/exception/
         0 Sun Apr 06 14:18:58 CST 2014 org/apache/commons/lang3/math/
         0 Sun Apr 06 14:18:58 CST 2014 org/apache/commons/lang3/mutable/
         0 Sun Apr 06 14:18:58 CST 2014 org/apache/commons/lang3/reflect/
         0 Sun Apr 06 14:18:58 CST 2014 org/apache/commons/lang3/text/
         0 Sun Apr 06 14:18:58 CST 2014 org/apache/commons/lang3/text/translate/
         0 Sun Apr 06 14:18:58 CST 2014 org/apache/commons/lang3/time/
         0 Sun Apr 06 14:18:58 CST 2014 org/apache/commons/lang3/tuple/
     11358 Sun Apr 06 14:07:48 CST 2014 META-INF/LICENSE.txt
       301 Sun Apr 06 14:07:48 CST 2014 META-INF/NOTICE.txt
      2602 Sun Apr 06 14:18:58 CST 2014 org/apache/commons/lang3/AnnotationUtils$1.class
      7004 Sun Apr 06 14:18:58 CST 2014 org/apache/commons/lang3/AnnotationUtils.class
     49696 Sun Apr 06 14:18:56 CST 2014 org/apache/commons/lang3/ArrayUtils.class
      2367 Sun Apr 06 14:18:58 CST 2014 org/apache/commons/lang3/BitField.class
      8553 Sun Apr 06 14:18:56 CST 2014 org/apache/commons/lang3/BooleanUtils.class
       246 Sun Apr 06 14:18:56 CST 2014 org/apache/commons/lang3/builder/Builder.class
     11465 Sun Apr 06 14:18:58 CST 2014 org/apache/commons/lang3/builder/CompareToBuilder.class
      2068 Sun Apr 06 14:18:56 CST 2014 org/apache/commons/lang3/builder/Diff.class
       337 Sun Apr 06 14:18:58 CST 2014 org/apache/commons/lang3/builder/Diffable.class
      1378 Sun Apr 06 14:18:58 CST 2014 org/apache/commons/lang3/builder/DiffBuilder$1.class
      1402 Sun Apr 06 14:18:58 CST 2014 org/apache/commons/lang3/builder/DiffBuilder$10.class
      1380 Sun Apr 06 14:18:58 CST 2014 org/apache/commons/lang3/builder/DiffBuilder$11.class
      1408 Sun Apr 06 14:18:58 CST 2014 org/apache/commons/lang3/builder/DiffBuilder$12.class
      1364 Sun Apr 06 14:18:58 CST 2014 org/apache/commons/lang3/builder/DiffBuilder$13.class
      1399 Sun Apr 06 14:18:58 CST 2014 org/apache/commons/lang3/builder/DiffBuilder$14.class
    .....
    .....
    .....
     13646 Sun Apr 06 14:18:56 CST 2014 org/apache/commons/lang3/math/NumberUtils.class
    .....
    .....
    .....
      1075 Sun Apr 06 14:18:56 CST 2014 org/apache/commons/lang3/time/FastDatePrinter$StringLiteral.class
      1314 Sun Apr 06 14:18:56 CST 2014 org/apache/commons/lang3/time/FastDatePrinter$TextField.class
      1268 Sun Apr 06 14:18:56 CST 2014 org/apache/commons/lang3/time/FastDatePrinter$TimeZoneDisplayKey.class
      1736 Sun Apr 06 14:18:56 CST 2014 org/apache/commons/lang3/time/FastDatePrinter$TimeZoneNameRule.class
      1467 Sun Apr 06 14:18:56 CST 2014 org/apache/commons/lang3/time/FastDatePrinter$TimeZoneNumberRule.class
      1340 Sun Apr 06 14:18:56 CST 2014 org/apache/commons/lang3/time/FastDatePrinter$TwelveHourField.class
      1347 Sun Apr 06 14:18:56 CST 2014 org/apache/commons/lang3/time/FastDatePrinter$TwentyFourHourField.class
      1247 Sun Apr 06 14:18:56 CST 2014 org/apache/commons/lang3/time/FastDatePrinter$TwoDigitMonthField.class
      1395 Sun Apr 06 14:18:56 CST 2014 org/apache/commons/lang3/time/FastDatePrinter$TwoDigitNumberField.class
      1245 Sun Apr 06 14:18:56 CST 2014 org/apache/commons/lang3/time/FastDatePrinter$TwoDigitYearField.class
      1300 Sun Apr 06 14:18:56 CST 2014 org/apache/commons/lang3/time/FastDatePrinter$UnpaddedMonthField.class
      1423 Sun Apr 06 14:18:56 CST 2014 org/apache/commons/lang3/time/FastDatePrinter$UnpaddedNumberField.class
     12485 Sun Apr 06 14:18:56 CST 2014 org/apache/commons/lang3/time/FastDatePrinter.class
      1079 Sun Apr 06 14:18:56 CST 2014 org/apache/commons/lang3/time/FormatCache$MultipartKey.class
      4852 Sun Apr 06 14:18:56 CST 2014 org/apache/commons/lang3/time/FormatCache.class
       238 Sun Apr 06 14:18:58 CST 2014 org/apache/commons/lang3/time/StopWatch$1.class
      1214 Sun Apr 06 14:18:58 CST 2014 org/apache/commons/lang3/time/StopWatch$SplitState.class
       843 Sun Apr 06 14:18:58 CST 2014 org/apache/commons/lang3/time/StopWatch$State$1.class
       843 Sun Apr 06 14:18:58 CST 2014 org/apache/commons/lang3/time/StopWatch$State$2.class
       843 Sun Apr 06 14:18:58 CST 2014 org/apache/commons/lang3/time/StopWatch$State$3.class
       843 Sun Apr 06 14:18:58 CST 2014 org/apache/commons/lang3/time/StopWatch$State$4.class
      1909 Sun Apr 06 14:18:58 CST 2014 org/apache/commons/lang3/time/StopWatch$State.class
      3646 Sun Apr 06 14:18:58 CST 2014 org/apache/commons/lang3/time/StopWatch.class
      1629 Sun Apr 06 14:18:58 CST 2014 org/apache/commons/lang3/tuple/ImmutablePair.class
      1703 Sun Apr 06 14:18:56 CST 2014 org/apache/commons/lang3/tuple/ImmutableTriple.class
      1998 Sun Apr 06 14:18:58 CST 2014 org/apache/commons/lang3/tuple/MutablePair.class
      2194 Sun Apr 06 14:18:58 CST 2014 org/apache/commons/lang3/tuple/MutableTriple.class
      3289 Sun Apr 06 14:18:56 CST 2014 org/apache/commons/lang3/tuple/Pair.class
      3209 Sun Apr 06 14:18:56 CST 2014 org/apache/commons/lang3/tuple/Triple.class
     14323 Sun Apr 06 14:18:58 CST 2014 org/apache/commons/lang3/Validate.class
         0 Sun Apr 06 14:19:20 CST 2014 META-INF/maven/
         0 Sun Apr 06 14:19:20 CST 2014 META-INF/maven/org.apache.commons/
         0 Sun Apr 06 14:19:20 CST 2014 META-INF/maven/org.apache.commons/commons-lang3/
     20377 Sun Apr 06 14:06:04 CST 2014 META-INF/maven/org.apache.commons/commons-lang3/pom.xml
       117 Sun Apr 06 14:08:14 CST 2014 META-INF/maven/org.apache.commons/commons-lang3/pom.properties
    jar包内容样例

    设置环境变量

    export CLASSPATH=.:/Users/zhangjiansheng10/.m2/repository/org/apache/commons/commons-lang3/3.3.2/commons-lang3-3.3.2.jar

    代码

    import org.apache.commons.lang3.math.NumberUtils;
    
    
    public class HelloWorld {
        public static void main(String[] args){
            System.out.println("Hello World!");
            String str = "123*422@100";
            //String str = "100";
            long a = NumberUtils.toLong(str);
            System.out.println("a:" + a);
        }
    }
    

      

    编译

    javac  -classpath /jar/path/org/apache/commons/commons-lang3/3.3.2/commons-lang3-3.3.2.jar  HelloWorld.java

    java HelloWorld

  • 相关阅读:
    分享一个安装PE到硬盘的软件
    [转]盘点谷歌旗下的那些逆天机器人(视频)
    ubuntu安装google 输入法
    Beyond Compare 3.3.8 build 16340 + Key
    don't panic !
    Python3 list sort排序
    《操作系统、预防进程死锁的银行家算法》
    《操作系统_时间片轮转RR进程调度算法》
    《操作系统_FCFS和SJF》
    Hive初步使用、安装MySQL 、Hive配置MetaStore、配置Hive日志《二》
  • 原文地址:https://www.cnblogs.com/cfox/p/16209132.html
Copyright © 2020-2023  润新知