🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #7865

Re: How to use heys of System.properties() ?

#7865
From: J. David Boyd
Date: Wed, 09 May 2001 20:28
103 lines
4481 bytes
[This followup was posted to borland.public.jbuilder.java.language and a 
copy was sent to the cited author.]

In article <3af99b7f_2@dnews>, ArShAm_MeTaL@hotmail.com says...
> Hi there
> 
> How to get keys of the System.properties() , like java.version
> 
> Thanks
>         ArShAm
> 

Like this ....


public class Environment {

   public Environment(){
   }

   public static void main(String [] args){

   System.out.println("Java Runtime Environment version               " + 
    System.getProperty("java.version"));

   System.out.println("Java Runtime Environment vendor                " + 
    System.getProperty("java.vendor"));

   System.out.println("Java vendor URL                                " + 
    System.getProperty("java.vendor.url"));

   System.out.println("Java installation directory                    " + 
    System.getProperty("java.home"));

   System.out.println("Java Virtual Machine specification version     " + 
    System.getProperty("java.vm.specification.version"));

   System.out.println("Java Virtual Machine specification vendor      " + 
    System.getProperty("java.vm.specification.vendor"));

   System.out.println("Java Virtual Machine specification name        " + 
    System.getProperty("java.vm.specification.name"));

   System.out.println("Java Virtual Machine implementation version    " + 
    System.getProperty("java.vm.version"));

   System.out.println("Java Virtual Machine implementation vendor     " + 
    System.getProperty("java.vm.vendor"));

   System.out.println("Java Virtual Machine implementation name       " + 
    System.getProperty("java.vm.name"));

   System.out.println("Java Runtime Environment specification version " + 
    System.getProperty("java.specification.version"));

   System.out.println("Java Runtime Environment specification vendor  " + 
    System.getProperty("java.specification.vendor"));

   System.out.println("Java Runtime Environment specification name    " + 
    System.getProperty("java.specification.name"));

   System.out.println("Java class format version number               " + 
    System.getProperty("java.class.version"));

   System.out.println("Java class path                                " + 
    System.getProperty("java.class.path"));

   System.out.println("Path of extension directory or directories     " + 
    System.getProperty("java.ext.dirs"));

   System.out.println("Operating system name                          " + 
    System.getProperty("os.name"));

   System.out.println("Operating system architecture                  " + 
    System.getProperty("os.arch"));

   System.out.println("Operating system version                       " + 
    System.getProperty("os.version"));

   System.out.println("File separator (\"/\" on UNIX)                 " + 
    System.getProperty("file.separator"));

   System.out.println("Path separator (\":\" on UNIX)                 " + 
    System.getProperty("path.separator"));

   System.out.println("Line separator (\"\\n\" on UNIX)               " + 
    System.getProperty("line.separator"));

   System.out.println("User's account name                            " + 
    System.getProperty("user.name"));

   System.out.println("User's home directory                          " + 
    System.getProperty("user.home"));

   System.out.println("User's current working directory               " + 
    System.getProperty("user.dir"));

   }
}

... Hope this helps,

Dave
Technical Details
Message-ID: <MPG.15637261984f444f989680@forums.borland.com>
Path: arc1-ca.pugleaf.net!newsfeed.google.com!sn-xit-03!sn-xit-04!supernews.com!wn2feed!wn4feed!worldnet.att.net!4.24.21.153!chcgil2-snh1.gtei.net!washdc3-snh1.gtei.net!nycmny1-snf1.gtei.net!news.gtei.net!news1.ebone.net!news.ebone.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews
References: <3af99b7f_2@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,6900895686788188
X-Google-Attributes: gidf74b3,public
X-Google-ArrivalTime: 2001-05-09 14:06:09 PST
From: J. David Boyd <dave@tsc-corp.com>
Newsgroups: borland.public.jbuilder.java.language
Subject: Re: How to use heys of System.properties() ?
Date: Wed, 9 May 2001 16:28:21 -0400
Message-ID: <MPG.15637261984f444f989680@forums.borland.com>
References: <3af99b7f_2@dnews>
Organization: TSC
X-Newsreader: MicroPlanet Gravity v2.50
NNTP-Posting-Host: 4.34.225.132
X-Trace: dnews 989440169 4.34.225.132 (9 May 2001 13:29:29 -0700)
Lines: 103
Path: arc1-ca.pugleaf.net!newsfeed.google.com!sn-xit-03!sn-xit-04!supernews.com!wn2feed!wn4feed!worldnet.att.net!4.24.21.153!chcgil2-snh1.gtei.net!washdc3-snh1.gtei.net!nycmny1-snf1.gtei.net!news.gtei.net!news1.ebone.net!news.ebone.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews