It is necessary for the program to open the html file:
import java.awt.*; import java.io.IOException; import java.net.URI; import java.net.URISyntaxException; public class Main { public static void main(String args[]) { Desktop desktop = Desktop.getDesktop(); try { URI url = new URI("D:\\3 泻褍褉褋\\袘袚校袠袪(谢斜)\\小懈袗孝邪褉懈小\\袥斜5\\2\\lb5\\src\\html\\lb5.html"); desktop.browse(url); } catch (URISyntaxException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } } How to make sure that the file was opened?