Here you can find the source of getSpssInstallationDirectory(Frame parent)
private static void getSpssInstallationDirectory(Frame parent)
//package com.java2s; /*//from www. ja v a 2 s .co m * Argus Open Source * Software to apply Statistical Disclosure Control techniques * * Copyright 2014 Statistics Netherlands * * This program is free software; you can redistribute it and/or * modify it under the terms of the European Union Public Licence * (EUPL) version 1.1, as published by the European Commission. * * You can find the text of the EUPL v1.1 on * https://joinup.ec.europa.eu/software/page/eupl/licence-eupl * * This software is distributed on an "AS IS" basis without * warranties or conditions of any kind, either express or implied. */ import java.awt.Frame; import javax.swing.JFileChooser; public class Main { private static void getSpssInstallationDirectory(Frame parent) { // We do not use the DataDir in the specific procedure JFileChooser fileChooser = new JFileChooser(); fileChooser.setDialogTitle("Set IBM SPSS directory"); fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); fileChooser.setMultiSelectionEnabled(false); fileChooser.showOpenDialog(null); System.out.println(fileChooser.getSelectedFile().getPath()); } }