{"id":290,"date":"2017-01-17T16:00:00","date_gmt":"2017-01-17T07:00:00","guid":{"rendered":"https:\/\/java-code.jp\/?p=290"},"modified":"2020-03-10T15:49:31","modified_gmt":"2020-03-10T06:49:31","slug":"getproperties%e3%83%a1%e3%82%bd%e3%83%83%e3%83%89","status":"publish","type":"post","link":"https:\/\/java-code.jp\/290","title":{"rendered":"getProperties\u30e1\u30bd\u30c3\u30c9"},"content":{"rendered":"<p><em class=\"ccenterContents01\">\u30b7\u30b9\u30c6\u30e0\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u53d6\u5f97\u3059\u308b &#8211; getProperties\u30e1\u30bd\u30c3\u30c9<\/em><\/p>\n<dl class=\"comand_frame\">\n<dt class=\"comand_txt\">public static Properties getProperties()<\/dt>\n<\/dl>\n<p>System.getProperties\u30e1\u30bd\u30c3\u30c9\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u73fe\u5728\u306e\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u306b\u304a\u3051\u308b\u30b7\u30b9\u30c6\u30e0\u30d7\u30ed\u30d1\u30c6\u30a3\u306e\u60c5\u5831\u3092\u53d6\u5f97\u3067\u304d\u307e\u3059\u3002<\/p>\n<p class=\"list\">UtilProp.java<\/p>\n<div class=\"pre\">\n<pre class=\"brush:java;highlight:[7,8,9];\">\r\npackage com.example.mynavi.util;\r\n\r\nimport java.util.Properties;\r\n\r\npublic class UtilProp {\r\n  public static void main(String[] args) {\r\n    Properties prop = System.getProperties();\r\n    for (Object key : prop.keySet()) {\r\n      System.out.println(key + \"=\" + prop.get(key));\r\n    }\r\n  }\r\n}\r\n<\/pre>\n<p><!-- \/ .pre --><\/div>\n<p class=\"arrow01\">\n<img loading=\"lazy\" decoding=\"async\" src=\"wp-content\/themes\/Javacord\/images\/common\/icon08.gif\" alt=\"\u2193\" width=\"29\" height=\"30\">\n<\/p>\n<div class=\"pre\">\n<pre class=\"brush:java;\">\r\njava.specification.version=13\r\nsun.cpu.isalist=amd64\r\nsun.jnu.encoding=MS932\r\njava.class.path=\r\njava.vm.vendor=AdoptOpenJDK\r\nsun.arch.data.model=64\r\n...\u5f8c\u7565...\r\n<\/pre>\n<p><!-- \/ .pre --><\/div>\n<p>Properties#keySet\u30e1\u30bd\u30c3\u30c9\u306f\u30d7\u30ed\u30d1\u30c6\u30a3\u540d\u306e\u30bb\u30c3\u30c8\u3092\u3001get\u30e1\u30bd\u30c3\u30c9\u306f\u6307\u5b9a\u306e\u30ad\u30fc\u306b\u5bfe\u5fdc\u3059\u308b\u30d7\u30ed\u30d1\u30c6\u30a3\u5024\u3092\u8fd4\u3057\u307e\u3059\u3002<br \/>\n  \u5358\u306b\u30b7\u30b9\u30c6\u30e0\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u5217\u6319\u3057\u305f\u3044\u3060\u3051\u3067\u3042\u308c\u3070\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306blist\u30e1\u30bd\u30c3\u30c9\u3092\u5229\u7528\u3057\u3066\u3082\u69cb\u3044\u307e\u305b\u3093\u3002<\/p>\n<p class=\"list\">UtilProp2.java\uff08\u629c\u7c8b\uff09<\/p>\n<div class=\"pre\">\n<pre class=\"brush:java;\">\r\nprop.list(System.out);\r\n<\/pre>\n<p><!-- \/ .pre --><\/div>\n<p>\u4e3b\u306a\u30b7\u30b9\u30c6\u30e0\u30d7\u30ed\u30d1\u30c6\u30a3\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u3082\u306e\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<table>\n<tr>\n<th colspan=\"2\" class=\"tableTitle\">\u4e3b\u306a\u30b7\u30b9\u30c6\u30e0\u30d7\u30ed\u30d1\u30c6\u30a3<\/th>\n<\/tr>\n<tr>\n<th>\u30d7\u30ed\u30d1\u30c6\u30a3<\/th>\n<th>\u6982\u8981<\/th>\n<\/tr>\n<tr>\n<td>java.version<\/td>\n<td>Java\u306e\u30d0\u30fc\u30b8\u30e7\u30f3<\/td>\n<\/tr>\n<tr>\n<td>java.vendor<\/td>\n<td>Java\u306e\u30d9\u30f3\u30c0\u30fc<\/td>\n<\/tr>\n<tr>\n<td>java.vendor.url<\/td>\n<td>\u30d9\u30f3\u30c0\u30fc\u306eURL<\/td>\n<\/tr>\n<tr>\n<td>java.home<\/td>\n<td>Java\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5148\u30d5\u30a9\u30eb\u30c0\u30fc<\/td>\n<\/tr>\n<tr>\n<td>java.class.path<\/td>\n<td>Java\u306e\u30af\u30e9\u30b9\u30d1\u30b9<\/td>\n<\/tr>\n<tr>\n<td>java.library.path<\/td>\n<td>\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u30ed\u30fc\u30c9\u3059\u308b\u969b\u306b\u691c\u7d22\u3059\u308b\u30d1\u30b9\uff08\u30ea\u30b9\u30c8\uff09<\/td>\n<\/tr>\n<tr>\n<td>java.io.tmpdir<\/td>\n<td>\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u4e00\u6642\u30d5\u30a9\u30eb\u30c0\u30fc<\/td>\n<\/tr>\n<tr>\n<td>java.ext.dirs<\/td>\n<td>\u62e1\u5f35\u30d5\u30a9\u30eb\u30c0\u30fc\u306e\u30d1\u30b9<\/td>\n<\/tr>\n<tr>\n<td>os.name<\/td>\n<td>\u30aa\u30da\u30ec\u30fc\u30c6\u30a3\u30f3\u30b0\u30b7\u30b9\u30c6\u30e0\u306e\u540d\u524d<\/td>\n<\/tr>\n<tr>\n<td>os.version<\/td>\n<td>\u30aa\u30da\u30ec\u30fc\u30c6\u30a3\u30f3\u30b0\u30b7\u30b9\u30c6\u30e0\u306e\u30d0\u30fc\u30b8\u30e7\u30f3<\/td>\n<\/tr>\n<tr>\n<td>file.separator<\/td>\n<td>\u30d5\u30a1\u30a4\u30eb\u533a\u5207\u308a\u6587\u5b57\uff08Unix\u74b0\u5883\u3067\u306f\u300c\/\u300d)<\/td>\n<\/tr>\n<tr>\n<td>path.separator<\/td>\n<td>\u30d1\u30b9\u533a\u5207\u308a\u6587\u5b57\uff08Unix\u74b0\u5883\u3067\u306f\u300c:\u300d\uff09<\/td>\n<\/tr>\n<tr>\n<td>line.separator<\/td>\n<td>\u884c\u533a\u5207\u308a\u6587\u5b57 (UNIX \u3067\u306f &#8220;\\n&#8221;)<\/td>\n<\/tr>\n<tr>\n<td>user.name<\/td>\n<td>\u30e6\u30fc\u30b6\u30fc\u30a2\u30ab\u30a6\u30f3\u30c8<\/td>\n<\/tr>\n<tr>\n<td>user.home<\/td>\n<td>\u30e6\u30fc\u30b6\u30fc\u306e\u30db\u30fc\u30e0\u30d5\u30a9\u30eb\u30c0\u30fc<\/td>\n<\/tr>\n<tr>\n<td>user.dir<\/td>\n<td>\u30e6\u30fc\u30b6\u30fc\u306e\u4f5c\u696d\u30d5\u30a9\u30eb\u30c0\u30fc<\/td>\n<\/tr>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>\u30b7\u30b9\u30c6\u30e0\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u53d6\u5f97\u3059\u308b &#8211; getProperties\u30e1\u30bd\u30c3\u30c9 public static Properties getProperties() System.getProperties\u30e1\u30bd\u30c3\u30c9\u3092\u5229\u7528\u3059 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21],"tags":[],"class_list":["post-290","post","type-post","status-publish","format-standard","hentry","category-utility"],"_links":{"self":[{"href":"https:\/\/java-code.jp\/wp-json\/wp\/v2\/posts\/290"}],"collection":[{"href":"https:\/\/java-code.jp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/java-code.jp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/java-code.jp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/java-code.jp\/wp-json\/wp\/v2\/comments?post=290"}],"version-history":[{"count":11,"href":"https:\/\/java-code.jp\/wp-json\/wp\/v2\/posts\/290\/revisions"}],"predecessor-version":[{"id":1579,"href":"https:\/\/java-code.jp\/wp-json\/wp\/v2\/posts\/290\/revisions\/1579"}],"wp:attachment":[{"href":"https:\/\/java-code.jp\/wp-json\/wp\/v2\/media?parent=290"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/java-code.jp\/wp-json\/wp\/v2\/categories?post=290"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/java-code.jp\/wp-json\/wp\/v2\/tags?post=290"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}