Untitled
static void saveImageFromUrl(String imageUrl, String fileName) throws IOException { URL url = new URL(imageUrl); Path savePath = Path.of("./saveScreen", fileName); if (!Files.exists(savePath)) { Files.createDirectories(savePath.getParent()); Files.copy(url.openStream(), savePath); } }