How to add java_home in HF space(spark + llama)

While running HF i got the error(For reference here is the space: Llama 2 Summarizer - a Hugging Face Space by Andyrasika):
Runtime error
JAVA_HOME is not set
Traceback (most recent call last):
File “/home/user/app/”, line 24, in
df_chapters = create_spark_dataframe(text)
File “/home/user/app/”, line 15, in create_spark_dataframe
spark = SparkSession.builder.appName(“Counting word occurrences from a book, under a microscope.”).config(“spark.driver.memory”, “4g”).getOrCreate()
File “/home/user/.local/lib/python3.10/site-packages/pyspark/sql/”, line 477, in getOrCreate
sc = SparkContext.getOrCreate(sparkConf)
File “/home/user/.local/lib/python3.10/site-packages/pyspark/”, line 512, in getOrCreate
SparkContext(conf=conf or SparkConf())
File “/home/user/.local/lib/python3.10/site-packages/pyspark/”, line 198, in init
SparkContext._ensure_initialized(self, gateway=gateway, conf=conf)
File “/home/user/.local/lib/python3.10/site-packages/pyspark/”, line 432, in _ensure_initialized
SparkContext._gateway = gateway or launch_gateway(conf)
File “/home/user/.local/lib/python3.10/site-packages/pyspark/”, line 106, in launch_gateway
raise RuntimeError(“Java gateway process exited before sending its port number”)
RuntimeError: Java gateway process exited before sending its port number, my space: