orionweller commited on
Commit
181ee96
1 Parent(s): be785b0

attempt to find java

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -1,6 +1,9 @@
1
  import os
2
  # set JAVA_HOME by finding it, e.g. JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:bin/javac::")
3
- os.environ["JAVA_HOME"] = os.popen("readlink -f /usr/bin/javac | sed 's:bin/javac::'").read().strip()
 
 
 
4
  print(os.environ["JAVA_HOME"])
5
 
6
  import gradio as gr
 
1
  import os
2
  # set JAVA_HOME by finding it, e.g. JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:bin/javac::")
3
+ # print the contents of /user/lib
4
+ print(os.listdir("/usr/lib"))
5
+ print(os.listdir("/usr/lib/jvm"))
6
+ os.environ["JAVA_HOME"] = "/usr/lib/jvm"
7
  print(os.environ["JAVA_HOME"])
8
 
9
  import gradio as gr