Spaces:
Sleeping
Sleeping
samyak152002
commited on
Commit
•
8cc1285
1
Parent(s):
0ef9766
Update app.py
Browse files
app.py
CHANGED
@@ -15,6 +15,14 @@ import os
|
|
15 |
|
16 |
# Set JAVA_HOME environment variable
|
17 |
os.environ['JAVA_HOME'] = '/usr/lib/jvm/java-11-openjdk-amd64'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
# ------------------------------
|
19 |
# Analysis Functions
|
20 |
# ------------------------------
|
|
|
15 |
|
16 |
# Set JAVA_HOME environment variable
|
17 |
os.environ['JAVA_HOME'] = '/usr/lib/jvm/java-11-openjdk-amd64'
|
18 |
+
|
19 |
+
# Optional: Verify Java installation
|
20 |
+
try:
|
21 |
+
java_version = subprocess.check_output(['java', '-version'], stderr=subprocess.STDOUT).decode()
|
22 |
+
st.write(f"Java Version: {java_version}")
|
23 |
+
except Exception as e:
|
24 |
+
st.error("Java is not installed correctly.")
|
25 |
+
|
26 |
# ------------------------------
|
27 |
# Analysis Functions
|
28 |
# ------------------------------
|