cancel
Showing results for 
Search instead for 
Did you mean: 
Get Started Discussions
Start your journey with Databricks by joining discussions on getting started guides, tutorials, and introductory topics. Connect with beginners and experts alike to kickstart your Databricks experience.
cancel
Showing results for 
Search instead for 
Did you mean: 

Databricks Java - Create Jar in Java 11

Databricks_Java
New Contributor

I am trying to a run simple print java program which is not working and getting compilation version issues though i changed the environment variable points to java 11. Can you please help me ? Can we create java with spark session and execute as a jar in databricks? Because most of the examples are in scala.

 

 

Error:

UnsupportedClassVersionError: JarTesting has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0.

Attached env variable fYR

 

 

1 REPLY 1

arpit
Valued Contributor
Valued Contributor

@Databricks_Java You can run command like this: spark-submit --class com.test.Main example.jar
and make sure to check the java version and match with the DBR compatibility

Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!