How to get Java Installation location?

package com.pretech;
public class JavaHome {
	public static void main(String[] args) {
		System.out.println(System.getProperty("java.home"));
	}
}

Output



C:\Program Files\Java\jdk1.7.0_06\jre


No comments:

Post a Comment

Model Context Protocol (MCP) — Complete Guide for Backend Engineers

  Model Context Protocol (MCP) — Complete Guide for Backend Engineers Build Tools, Resources, and AI-Driven Services Using LangChain Moder...

Featured Posts