[請益] 需要引用Google Client Library

看板java作者 (珍惜當下)時間7年前 (2017/09/04 10:53), 7年前編輯推噓0(005)
留言5則, 2人參與, 最新討論串1/1
想請教一下各位前輩 小弟有一個Confluence的程式 在compile time時會用到Google Client Library來驗證功能,並且可以正常執行 已經有Library加到Java Build Path的Libraries設定裡 pom.xml也有加上如下的dependencies: <dependency> <groupId>com.google.apis</groupId> <artifactId>google-api-services-calendar</artifactId> <version>v3-rev254-1.22.0</version> </dependency> <dependency> <groupId>com.google.api-client</groupId> <artifactId>google-api-client</artifactId> <version>1.22.0</version> </dependency> 在包裝成jar檔後會聯同其他library加進去,使得jar檔案大小變得很大(約7MB) 想請問有什麼辦法可以把Google Client Library放到server 讓jar去引用server上的library嗎? jar檔越大,其執行速度會越慢嗎? 謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 59.124.165.65 ※ 文章網址: https://www.ptt.cc/bbs/java/M.1504493630.A.9F9.html

09/04 11:04, , 1F
執行的classpath設一下library jar檔的位置就好了
09/04 11:04, 1F

09/04 11:05, , 2F
jar檔大執行速度沒差,差的是包裝和佈署時間,另外server程
09/04 11:05, 2F

09/04 11:06, , 3F
式一包幾十MB很常見,7MB沒有很大..
09/04 11:06, 3F

09/04 11:10, , 4F
jar檔基本上就只是個zip檔,把相關檔案包一起方便移動而已
09/04 11:10, 4F

09/04 11:29, , 5F
感謝ssccg大大解惑!
09/04 11:29, 5F
※ 編輯: qazsd (59.124.165.65), 09/04/2017 16:20:17
文章代碼(AID): #1PhC0-dv (java)
文章代碼(AID): #1PhC0-dv (java)