new File("").getAbsolutePath() in Windows gets current path like C:\Repos\facogen, which will have no forward slashes lastIndexOf('/') searches for.
In fact, there is no need to know the name of the current directory here, we can just address it using "./"
new File("").getAbsolutePath()
in Windows gets current path like C:\Repos\facogen, which will have no forward slasheslastIndexOf('/')
searches for. In fact, there is no need to know the name of the current directory here, we can just address it using"./"