javafx如何修复“java未命名模块从y和z读取程序包x”
我是Java新手。我正在尝试用htmlunit登录一个网站。我犯了这些错误。我该怎么修呢。它是JDK 11。这是我的代码:
try {
WebClient webClient = new WebClient();
HtmlPage page = (HtmlPage)
webClient.getPage("http://ubs.yalova.edu.tr");
HtmlForm form = page.getFormByName("loginForm");
form.getInputByName("username").setValueAttribute("myUsername");
form.getInputByName("password").setValueAttribute("myPassword");
page = form.getInputByValue("GİRİŞ YAP").click();
System.out.println(page.asText());
} catch (IOException e)
{
e.printStackTrace();
}
//module-info.java
module HelloWorld {
requires javafx.controls;
requires javafx.fxml;
requires htmlunit;
opens sample;
}
共 (0) 个答案