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
Databricks Employee
Databricks Employee

@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

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group