怎样得到当前文件所在目录 String realPath = config.getServletContext().getRealPath("12345.txt"); 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 File file=new File(".");自己解析结果就可以了。 但是我这么写返回的还是C:\Documents and Settings\Administrator\「开始」菜单\程序\Jakarta Tomcat 4.0 class test{ public static void main(String[] args){ String path = test.class.getProtectionDomain().getCodeSource().getLocation().getFile(); System.out.println(path); }} 又或者test.class.getResource("").getFile();---------------[email protected] 新手求教怎样用JAVA实现将一个整形的10进制数转化为8进制 急!!!!多行显示文本 谁愿意指点一下我啊!! 关于LOG4J问题 [问题]Cannot find symbol 请高人帮小弟看看,俺到底错在哪里啊! 求助:寻求使用java来解析word文件的办法或资料或技术?? Runtime.getRuntime().exec("myapp.exe");是不是不能在Applet中调用呀? jcombobox问题?? 不惜一切代价!!!可以加到143分! 一个有关synchronized的问题 请教一道SCJP的模拟题?
自己解析结果就可以了。
C:\Documents and Settings\Administrator\「开始」菜单\程序\Jakarta Tomcat 4.0
public static void main(String[] args){
String path = test.class.getProtectionDomain().getCodeSource().getLocation().getFile();
System.out.println(path);
}
}
test.class.getResource("").getFile();---------------
[email protected]