Skip to content

Commit

Permalink
Add jvm version to identifier service
Browse files Browse the repository at this point in the history
Can help for diagnosis/debugging

[Added] JVM version to identifier service

Signed-off-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
  • Loading branch information
MatthewKhouzam committed Dec 3, 2024
1 parent 85c5dd2 commit 08937a0
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public class IdentifierService {
private static final String OS_NAME = "os.name"; //$NON-NLS-1$
private static final String OS_ARCH = "os.arch"; //$NON-NLS-1$
private static final String OS_VERSION = "os.version"; //$NON-NLS-1$
private static final String JVM_VERSION = "java.version"; //$NON-NLS-1$
private static final String PRODUCT_ID = "eclipse.product"; //$NON-NLS-1$
private static final String LAUNCHER_NAME = "eclipse.launcher.name"; //$NON-NLS-1$
private static final String QUALIFIER = "qualifier"; //$NON-NLS-1$
Expand Down Expand Up @@ -69,6 +70,7 @@ public Response getSystemInfo() {
response.setMaxMemory(Runtime.getRuntime().maxMemory());
response.setProductId(System.getProperty(PRODUCT_ID));
response.setLauncherName(System.getProperty(LAUNCHER_NAME));
response.setJvmVersion(System.getProperty(JVM_VERSION));

if (product != null) {
Version version = product.getDefiningBundle().getVersion();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public class ServerInfoResponseImpl {
private String launcherName;
private String productId;
private String tspVersion;
private String jvmVersion;

/**
* @return Version in the format Major.Minor.Micro
Expand Down Expand Up @@ -201,4 +202,21 @@ public void setProductId(String productId) {
public void setTspVersion(String version) {
tspVersion = version;
}

/**
* Set JVM Version
*
* @param jvmVersion jvm version
*/
public void setJvmVersion(String jvmVersion) {
this.jvmVersion = jvmVersion;
}

/**
* @return the jvm Version
*/
public String getJvmVersion() {
return jvmVersion;
}

}

0 comments on commit 08937a0

Please sign in to comment.