Hi @Mercy_Stephen, welcome to the Streamlit community!
Assuming you are deploying on Streamlit Cloud, you need to add java to a requires.txt file:

  
      

      docs.streamlit.io
  

  
    

App dependencies - Streamlit Docs 2



  

  
    
    
  

  


Best,
Randy