I have a server where I work with a database and files using a java application. When I launch my application, I give a report on access to the file on the server using:
public static boolean folderExists(String folderPath) {
File folderToCheck = new File(folderPath);
return folderToCheck.exists();
}
Every time I start my application (after a new restart of my computer) I get a false response, even if the server is turned on. The reason is that I have to give authentication as another user. What I'm doing is accessing the server through Windows where they ask me for a username / password, and after that I get a true answer about accessing the file on the server.
Is there a way to provide a username / password for authentication through Java and not through Windows?
thank