how to check wihch JRE insatlled
To check **which JRE (Java Runtime Environment)** is installed on your system,
follow the steps depending on your OS:
---
### 🪟 **For Windows:**
#### **Method 1: Using Command Prompt**
1. Open **Command Prompt** (`cmd`).
2. Type the following command:
```cmd
java -version
```
3. You’ll see output similar to:
```
java version "1.8.0_381"
Java(TM) SE Runtime Environment (build 1.8.0_381-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.381-b09, mixed mode)
```
✅ This shows the **JRE version** installed and in use.
---
#### **Method 2: Check Installed Path**
1. Run:
```cmd
where java
```
Example output:
```
C:\Program Files\Java\jre1.8.0_381\bin\[Link]
```
This tells you **where the JRE is installed**.
---
#### **Method 3: Using PowerShell**
Run:
```powershell
Get-Command java | Select-Object Source
```
Then check:
```powershell
& "C:\Program Files\Java\jre1.8.0_381\bin\[Link]" -version
```
---
### 🐧 **For Linux / macOS:**
Run:
```bash
java -version
```
Or:
```bash
which java
readlink -f $(which java)
```
---
### 🧭 **Optional: Check All Installed Java Versions (Windows)**
If multiple versions are installed, check:
```powershell
Get-ChildItem "C:\Program Files\Java" | Select-Object Name
```
You might see:
```
jdk-17
jre1.8.0_381
```
---
Would you like me to give you a **PowerShell script** that lists all installed JRE
and JDK versions with their paths?