Sometime back, we were discussing thing around JRE and one of my friends Lawrence asked me "How to find the cipher of JRE installed on association near the sustain of Java Code ? "
After liberal noticeably reflection to it, I don't believe Java has any such API which will describe how many another JRE are installed on the System and what are they ? One of my other assistant Vikram told me that JRE beginning paperwork data in Registry. With this acquaintance at the hindsight, I proven to indite this piece of written language.
It will simply run on Windows :) because I have previously owned Runtime kind. I would friendliness to cognise how the identical could be achieved in Unix Systems. This opinion is not doing anything great, lately queries the registry and reflects the response on the table.
import island.io.*;
class NoofJRE {xUnit Test Patterns: Refactoring Test Code
Mechanical PE Sample Examination
Mergers and Acquisitions: A Step-by-Step Legal and
Othello
The Methods Of Ethics
The battle for investment survival,
Fortune's Hand (Jenny Cain Mysteries)
Two Little Lies
Patti Smith 1969-1976
Northwest Passage
Gods and Fighting Men
Demanding the Impossible: A History of Anarchism
Traquer les ombres (French Edition)
Managing in a Global Economy: Demystifying International
Fifty Years in the Church of Rome
The Art of Uncharted 2: Among Thieves (The Art of the
Case Study Research: Design and Methods (Applied Social
Honest Work: A Business Ethics Reader
twilight land
Search and Placement! A Handbook for Success
West's Business Law: Alternate Edition: Text Summarized
Electrical wiring, industrial
New Great Themes of Scripture
Shirleystatic String REG_PATH = "reg inquiring "
""HKLMSoftwareJavaSoftJava Runtime Environment";
public undynamic invalid getJREInfo() {
Soil Mechanics Laboratory Manual
Reason & Rigor: How Conceptual Frameworks Guide Research
Seeking Spatial Justice (Globalization and Community)
Once There Was a War
A Concise Dictionary Of Middle English
Over in the Meadow (Classic Books with Holes)
The Law of Attraction CD Collection
Bayesian Computation with R (Use R!)
The Dark Shadows Companion: 25th Anniversary Collection
Democratic Religion: Freedom, Authority, and Church
Freedom's Ransom
Making Enterprise Information Management (EIM) Work for
THINK Human Sexuality
Larry Bond's Red Dragon Rising: Edge of War (Red Dragon
Lab Manual to Accompany Industrial Motor Control
New Perspectives on HTML and CSS: Introductory
Software for Data Analysis: Programming with R (Statistics
Intermolecular and Surface Forces, Second Edition: With
Native Science: Natural Laws of Interdependence
NumPy 1.5 Beginner's Guide
Basic & Applied Concepts of Immunohematology, 2e
Overcoming Organizational Defenses: Facilitating
25 Great Guitar Solos (Transcriptions · Lessons
3 Livestry {
Process activity = Runtime.getRuntime().exec(REG_PATH);
InputStream inputstream = route.getInputStream();
InputStreamReader inputstreamreader = new InputStreamReader(inputstream);
BufferedReader bufferedreader = new BufferedReader(inputstreamreader);
String line;
while ((line = bufferedreader.readLine()) != void) {
System.out.println(line);
}
}
catch (Exception e) {
System.out.println("I am in Exception");
}
}
public rigid null and void chief(String s[]) {
getJREInfo();
}
}
And present is my output:
E:Program FilesJavajdk1.6.0bin>java NoofJRE
! REG.EXE VERSION 3.0
HKEY_LOCAL_MACHINESoftwareJavaSoftJava Runtime Environment
CurrentVersion REG_SZ 1.6
BrowserJavaVersion REG_SZ 1.6.0_01
HKEY_LOCAL_MACHINESoftwareJavaSoftJava Runtime Environment1.4.2_17
HKEY_LOCAL_MACHINESoftwareJavaSoftJava Runtime Environment1.6
HKEY_LOCAL_MACHINESoftwareJavaSoftJava Runtime Environment1.6.0
HKEY_LOCAL_MACHINESoftwareJavaSoftJava Runtime Environment1.6.0_01
Which sounds literal in my suit. It is cogently telltale me that I have JRE 1.4.2_17, 1.6.0 and 1.6.0_01. I have old bad dependence of not uninstalling JRE's :).
Please do let me cognise if here is any remaining way to cognize how copious and which JRE is/are installed in my association.
To cognise where on earth the JRE is installed, one has to do a elemental interrogation of JAVA_HOME in the register.
留言列表