![](/img/trans.png)
[英]Unable to load AWS credentials from the /AwsCredentials.properties file on the classpath
[英]Unable to load file from classpath with IntellijIdea runner
我從intellij的想法開始應用程序,並提供來自應用程序主類的模塊的類路徑。 我在控制台中看到模塊xxx \\ classes文件夾已添加到classpath。 然后,當我嘗試讀取位於classpath根目錄中的xml文件時,找不到它。 我試圖這樣讀
Bootstrap.class.getResource("context.xml")
我發現我必須在文件名中添加/。
Bootstrap.class.getResource("/context.xml")
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.