简体   繁体   English

在 1 个命令行中添加 2 个类路径

[英]add 2 classpath in 1 command line

I have problems to compile this, im trying to add 2 classpath but it fail我在编译时遇到问题,我试图添加 2 个类路径但它失败了

javac -cp C:\xampp\tomcat\lib\servlet-api.jar : C:\xampp\tomcat\webapps\examen\WEB-INF\classes ErabiltzaileKontuaEzabatuServlet.java

in the first i add the.jar, and the second is for the classes inside that folder.在第一个中,我添加了.jar,第二个是该文件夹中的类。

The first thing to notice is the space around : that should not exist.首先要注意的是:周围的空间,它不应该存在。 The other thing is the classpath separator.另一件事是类路径分隔符。 Judging by the C:\ you are using Windows, so the path separator is a semicolon ( ; ) instead of a colon ( : ).C:\判断,您使用的是 Windows,因此路径分隔符是分号 ( ; ) 而不是冒号 ( : )。

The following should do:以下应该做:

javac -cp C:\xampp\tomcat\lib\servlet-api.jar;C:\xampp\tomcat\webapps\examen\WEB-INF\classes ErabiltzaileKontuaEzabatuServlet.java

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM