I have tried three different projects and tested them but none of them is working..
- While trying to write to a file I get "java.nio.file.NoSuchFileException";
List<String> contents = Arrays.asList("Hey, there!", "What's up?");
Files.write(Paths.get("C://Users//*****//Documents//NetBeansProjects//SelTest//output.txt"), contents);
Java output:
Exception in thread "main" java.nio.file.NoSuchFileException: C:\Users\*****\Documents\NetBeansProjects\SelTest\output.txt
I have that output.txt file created and ready.
One more error, While trying to save an image from a BufferedImage, My code was executed successfully but nothing was created?
ImageIO.write(outputImage, "jpg", new File("C:\\Users\\****\\Documents\\NetBeansProjects\\SelTest\\love.jpg"));
I can display the BufferedImage as a label and it is rendered fine but ImageIO.write, show no error code successfully executed but no file created!
The last thing I tried today, was reading Selenium driver. I have set the driver path well and it is in right place but still doesn't get the driver.
System.setProperty("webdriver.edge.driver", "C:\\Users\\*****\\Documents\\NetBeansProjects\\SelTest\\msedgedriver.exe");
WebDriver driver = new EdgeDriver();
JavaOutput
Exception in thread "main" java.lang.IllegalStateException: The driver executable does not exist: C:\Users\*****\Documents\NetBeansProjects\SelTest\msedgedriver.exe
at com.google.common.base.Preconditions.checkState(Preconditions.java:585)
I'm using Apache NetBeans IDE 12 and my Java:
openjdk version "11.0.11" 2021-04-20 LTS
OpenJDK Runtime Environment (build 11.0.11+9-LTS)
OpenJDK 64-Bit Server VM (build 11.0.11+9-LTS, mixed mode)