I am trying to compile LoginTest_Chrome.java
using javac
at Windows command prompt. Prior to this, I have set my Environment's classpath to be associated with all the .jar
library files, such as Apache POI and Selenium .
Using echo %classpath%
, this is the result of my classpath Environment :
Then, I execute javac LoginTest.java and I got the following result :
Hope to have advice from experts here on how to resolve this issue which has bugged me for two days.
Error message after javac *.java
:
Start.java:63: error: cannot find symbol tc = row.getCell(0).toString(); ^ symbol: variable tc location: class Start Start.java:64: error: cannot find symbol username = row.getCell(1).toString(); ^ symbol: variable username location: class Start Start.java:65: error: cannot find symbol password = row.getCell(2).toString(); ^ symbol: variable password location: class Start
The problem is not with the compiler itself but with your source code. If you take a look at the first Error it says
LoginTest_Chrome.java:76: error cannot find symbol
LoginCredentials.getFile();
which means that the LoginCredentials
variable you are trying to use at line 76 wasn't declared somewhere, or it's somewhere the compiler can't see it (in another .java
file maybe?)
All the other errors mean the same.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.