System.getProperty(“java.class.path”) does not show “WEB-INF/lib” and the including jars

后端 未结 4 1228
迷失自我
迷失自我 2021-01-07 06:45
String CompilePath = \"abc.java\";
JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
String classpath = System.getProperty(\"java.class.path\");
System.s         


        
4条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-07 07:28

    Assuming you are using ANT to build your WAR file. You need to do something like below to include jars under WEB-INF/lib in your WAR. Modify the directory structure as it fits your app directory structure.

    
                
                      
                    
                
                
                
    
    
    

提交回复
热议问题