Returns current working folder. - Java Native OS

Java examples for Native OS:Environment

Description

Returns current working folder.

Demo Code

// Copyright (c) 2003-present, Jodd Team (jodd.org). All Rights Reserved.
//package com.java2s;

public class Main {
    public static final String USER_DIR = "user.dir";

    /**/*from   w  w  w  .j a  v a 2  s .co  m*/
     * Returns current working folder.
     */
    public static String getUserDir() {
        return System.getProperty(USER_DIR);
    }
}

Related Tutorials