我在尝试将图片转换为JPEG时遇到了问题。我一直收到错误,说在FilePermission下拒绝访问。这是因为我的文件在我的计算机上设置的方式还是别的?这是代码 -
BufferedImage image = new BufferedImage(100, 100, BufferedImage.TYPE_INT_RGB);
Graphics g = image.getGraphics();
g.drawString("Hello World!!!", 10, 20);
try {
ImageIO.write(image, "jpg", new File("c:/CustomImage.jpg"));
} catch (IOException e) {
e.printStackTrace();
提前致谢!
javascript squl squl-server