|
What this is
Other links
The source code/* * Sun Public License Notice * * The contents of this file are subject to the Sun Public License * Version 1.0 (the "License"). You may not use this file except in * compliance with the License. A copy of the License is available at * http://www.sun.com/ * * The Original Code is NetBeans. The Initial Developer of the Original * Code is Sun Microsystems, Inc. Portions Copyright 1997-2003 Sun * Microsystems, Inc. All Rights Reserved. */ package org.netbeans.core; import java.beans.PropertyVetoException; import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.StringTokenizer; import org.openide.filesystems.*; import org.netbeans.core.projects.SessionManager; /** Default repository. */ public final class NbRepository extends Repository { /** name of system folder to be located in the USER_DIR and HOME_DIR */ static final String SYSTEM_FOLDER = "config"; // NOI18N /** * Create a repository based on the normal system file system. */ public NbRepository () { super (createDefaultFileSystem()); } /** Creates defalt file system. */ private static FileSystem createDefaultFileSystem () { String systemDir = System.getProperty("system.dir"); // NOI18N if (systemDir != null) { // initiliaze the filesystem for this property try { return SessionManager.getDefault().create(new File (systemDir), null, new File[0]); } catch (IOException ex) { ex.printStackTrace(); throw new InternalError (); } catch (PropertyVetoException ex) { ex.printStackTrace(); throw new InternalError (); } } String homeDir = NonGui.getHomeDir (); if (homeDir != null) { // ----------------------------------------------------------------------------------------------------- // 1. Initialization and checking of netbeans.home and netbeans.user directories File homeDirFile = new File (NonGui.getHomeDir ()); File userDirFile = new File (NonGui.getUserDir ()); if (!homeDirFile.exists ()) { System.err.println (NonGui.getString("CTL_Netbeanshome_notexists")); doExit (2); } if (!homeDirFile.isDirectory ()) { System.err.println (NonGui.getString("CTL_Netbeanshome1")); doExit (3); } if (!userDirFile.exists ()) { System.err.println (NonGui.getString("CTL_Netbeanshome2")); doExit (4); } if (!userDirFile.isDirectory ()) { System.err.println (NonGui.getString("CTL_Netbeanshome3")); doExit (5); } // #27151: may also be additional install dirs List extradirs = new ArrayList(); // List |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.