本月博客排行
-
第1名
kaizi1992 -
第2名
arpenker -
第3名
wy_19921005 - hanbaohong
- jh108020
- silverend
年度博客排行
-
第1名
龙儿筝 -
第2名
宏天软件 -
第3名
青否云后端云 - vipbooks
- wy_19921005
- benladeng5225
- fantaxy025025
- e_e
- kaizi1992
- tanling8334
- arpenker
- sam123456gz
- javashop
- zysnba
- xiangjie88
- lemonhandsome
- wallimn
- ganxueyun
- Xeden
- zhanjia
- xyuma
- wangchen.ily
- jh108020
- johnsmith9th
- zxq_2017
- jbosscn
- forestqqqq
- daizj
- ajinn
- xpenxpen
- 喧嚣求静
- silverend
- kingwell.leng
- kristy_yy
- lchb139128
- jveqi
- lich0079
- lzyfn123
- java-007
- sunj
- yeluowuhen
- lerf
- xiaoxinye
- flashsing123
- bosschen
- zhangjijun
- lxguy
- lyndon.lin
- sunnylocus
- chenqisdfx
最新文章列表
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() ...