本月博客排行
-
第1名
wy_19921005 -
第2名
benladeng5225 -
第3名
duanfei - wddpwzzhao123
- steven789654
年度博客排行
-
第1名
龙儿筝 -
第2名
宏天软件 -
第3名
wy_19921005 - benladeng5225
- kaizi1992
- tanling8334
- vipbooks
- sam123456gz
- arpenker
- zysnba
- fantaxy025025
- xiangjie88
- wallimn
- e_e
- jh108020
- ganxueyun
- Xeden
- xyuma
- wangchen.ily
- zhanjia
- johnsmith9th
- zxq_2017
- forestqqqq
- jbosscn
- daizj
- xpenxpen
- 喧嚣求静
- kingwell.leng
- lchb139128
- kristy_yy
- javashop
- lzyfn123
- sunj
- yeluowuhen
- ajinn
- lerf
- lemonhandsome
- chenqisdfx
- xiaoxinye
- lyndon.lin
- flashsing123
- bosschen
- zhangjijun
- sunnylocus
- 青否云后端云
- lyj86
- paulwong
- sgqt
- hudiemeng870329
- mft8899
最新文章列表
this.class.getProtectionDomain().getCodeSource().getLocation()
this.class.getProtectionDomain().getCodeSource().getLocation()
如果直接执行.class文件那么会得到当前class的绝对路径。
如果封装在jar包里面执行jar包那么会得到当前jar包的绝对路径。
如何得到服务器路径(weblogic-domain)
对于如何在weblogic中得到web项目路径问题,是很常见的;
前些日子用到了,就记录下大家分享下。
public String getWebInfPath() throws IllegalAccessException {
String path = getClass().getProtectionDomain().getCodeSource()
.getLocation() ...