Are you working inside a package? The File method will create a file relative to the root of your package, so if you have:
C:\MyDir\mypackage\myclass.class
getAbsolutePath of this will return...
Type: Posts; User: copeg
Are you working inside a package? The File method will create a file relative to the root of your package, so if you have:
C:\MyDir\mypackage\myclass.class
getAbsolutePath of this will return...
Does not creating a File object and getting its absolute path work?
File file = new File("temp");
System.out.println(file.getAbsolutePath());...