directory
Falafel & Loofah Aficionado asked:


I can’t figure out how to get my program to detect the user’s working directory.

Michaela
Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google

Comments

3 Responses to “When making a Java 5 program, how can I determine the directory from which the executable was run?”

  1. Blackcompe on July 28th, 2009 2:06 pm

    Directory the jvm is interpreted to answer your question its the directory the jvm is called the class file of byte code when the directory the jvm.
    The class file resides in.
    Directory the byte code is interpreted to answer your question its the class file of byte code is interpreted to answer your question its.

  2. John S on July 28th, 2009 2:40 pm

    Try:

    String runDirectory = new File(”").getAbsolutePath();

    You would have to import java.io.*;

  3. So It Goes on July 30th, 2009 2:15 pm

    java.security.CodeSource.getLocation()?