0
我只需要使用war文件名作爲輸入來獲取war文件的完整文件路徑。我的意思是,返回值應該像C:/PFiles/project/tomcat/sender/sender.war如何獲取Web應用程序的war文件的路徑?
我試圖使用下面的路徑,但它沒有給我正確的路徑。
File file = new File("sender.war");
String path = file.getAbsolutePath();
如何找到正確的路徑?
可能的重複:http://stackoverflow.com/questions/9727507/how-do-i-get-the-name-of-the-war-file –