OutsideIT / FireMotD

:fire: Fire Framework Linux MoTD Generator :fire:
https://outsideit.net/firemotd
GNU General Public License v3.0
174 stars 45 forks source link

Add java information #90

Open willemdh opened 6 years ago

willemdh commented 6 years ago

Issue Type

Enhancement Request

Issue Detail

I'd love to add information about he Java type and version used, such as openjdk vs oracle jdk.

ThomDietrich commented 6 years ago

Please also consider Zulu Java:

$ java -version
openjdk version "1.8.0_152"
OpenJDK Runtime Environment (Zulu Embedded 8.25.0.76-linux-aarch32hf) (build 1.8.0_152-b76)
OpenJDK Client VM (Zulu Embedded 8.25.0.76-linux-aarch32hf) (build 25.152-b76, mixed mode, Evaluation)
dimon222 commented 6 years ago

Not sure how feasible it is, considering there are bunch of configurations including userspace specific java versions... Unless its meant java thats configured for root user only? Same question, how about compiler javac? Its configuration can be different from java alias reference.

willemdh commented 6 years ago

My very basic plan was basically to do something like this:

which java
/usr/bin/java -version
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)

Then show Java(TM) SE Runtime Environment (build 1.8.0_131-b11)

In the Zulu java's case I guess it would show:

OpenJDK Runtime Environment (Zulu Embedded 8.25.0.76-linux-aarch32hf) (build 1.8.0_152-b76)

But I would make this an optional addition to the json exportfile. So users would have to add it to their json export file.