get Home Dir - Java Native OS

Java examples for Native OS:Environment

Description

get Home Dir

Demo Code


//package com.java2s;

import javax.swing.filechooser.FileSystemView;

public class Main {
    public static String getHomeDir() {
        return FileSystemView.getFileSystemView().getHomeDirectory()
                .getAbsolutePath();/* ww w.j a  v  a  2s . c  om*/
    }
}

Related Tutorials