Search:

Type: Posts; User: copeg

Search: Search took 0.10 seconds.

  1. Replies
    12
    Views
    1,827

    [SOLVED] Re: Get path of current executing class

    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...
  2. Replies
    12
    Views
    1,827

    [SOLVED] Re: Get path of current executing class

    Does not creating a File object and getting its absolute path work?



    File file = new File("temp");
    System.out.println(file.getAbsolutePath());...
Results 1 to 2 of 2