経路を取得するためのJavaの一般的なシステムと方法

//区切り
文字列fileSeperator = File.seperator;

//ホームディレクトリ
文字列USERHOME = System.getProperties()のgetProperty( "のuser.home");.

たJavaの// JREのインストールパス
文字列javaPath = System.getProperties() .getProperty( "のjava.home");

//オペレーティングシステム名
文字列OSNAME = System.getProperties()のgetProperty( "os.name");.

//現在のユーザプログラムディレクトリ
文字列ユーザーディレクトリ= System.getProperties()getPropertyメソッド。 ( "はuser.dir");

// JDKをインストールしたディレクトリ
文字列jdkDir = System.getProperties()のgetProperty( "のjava.ext.dirs");

おすすめ

転載: www.cnblogs.com/jiehanshi/p/11535477.html
おすすめ