java: get runtime environment

 https://github.com/Deci-AI/super-gradients

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/**
 * encoding: utf-8
 * 版权所有 2023 涂聚文有限公司
 * 许可信息查看:
 * Java开源框架和库
 * http://projects.apache.org
 * https://eclipse.org/projects
 * http://spring.io/projects
 * https://redhatofficial.github.io
 * https://sourceforge.net
 * https://github.com
 * https://bitbucket.org
 * https://gitlab.org
 * https//search.maven.org
 * http://darwinsys.com/jwf
 * JSF附加库
 * https://bootsfaces.net
 * http://butterfaces.org
 * http://icefaces.org
 * http://openfaces.org
 * http://primefaces.org
 * http://richfaces.org
 * http://deltaspike.apache.org
 * http://www.jboss.org/jsfunit/
 * http://omnifaces.org
 *
 * 描述:
 * # Author    : geovindu,Geovin Du 涂聚文.
 * # IDE       : IntelliJ IDEA 2023.1 Java 17
 * # Datetime  : 2023 - 2023/11/15 - 6:02
 * # User      : geovindu
 * # Product   : IntelliJ IDEA
 * # Project   : javademo
 * # File      : Env.java  类
 * # explain   : 学习
 **/
 
package Common;
 
 
//import com.darwinsys.*;
 
public class Env {
 
    /**
     *
     * @return
     */
    public  static String getEnv()
    {
        return ("system.getenv(\"path\")="+System.getenv("PATH"));
    }
 
    /**
     *
     * @return
     */
    public  static String getColor()
    {
        String str=System.getProperty("pencil_color");
        return str;
    }
 
    /**
     *遍历系统属性信息
     */
    public  static void getEnvList()
    {
        System.getProperties().forEach((k,v)->System.out.println(k+"->"+v));
 
    }
}

  Java Cookbook 

IDE: 

JAVA IDE:IntelliJ IDEA,NetBeans,Eclipse
 
调用:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/**
 * encoding: utf-8
 * 版权所有 2023 涂聚文有限公司
 * 许可信息查看:
 * 描述:
 * # Author    : geovindu,Geovin Du 涂聚文.
 * # IDE       : IntelliJ IDEA 2023.1 Java 17
 * # Datetime  : 2023 - 2023/11/15 - 6:02
 * # User      : geovindu
 * # Product   : IntelliJ IDEA
 * # Project   : javademo
 * # File      : main.java  类
 * # explain   : 学习
 *GraalVM
 * https://www.graalvm.org/
 * https://www.oracle.com/cn/java/graalvm/
 * https://www.graalvm.org/downloads/#
 * com.darwinsys
 *CVS,Subversion,Git
 * http://git-scm.com
 */
 
import com.darwinsys.util.*;
import Common.Env;
 
 
public class Main {
 
    /**
     *
     * @param args
     */
    public static void main(String[] args)
    {
        System.out.println("Hello java world!");
        System.out.println(Env.getEnv());
        System.out.println(Env.getColor());
        Env.getEnvList();
 
    }
}

  

posted @   ®Geovin Du Dream Park™  阅读(5)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· 葡萄城 AI 搜索升级:DeepSeek 加持,客户体验更智能
· 什么是nginx的强缓存和协商缓存
· 一文读懂知识蒸馏
历史上的今天:
2022-11-15 CSharp: Decorator Pattern in donet 6
2022-11-15 html5 css timeline horizontal
2015-11-15 visual studio 2013 配置开发环境
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示