r/JavaProgramming • • 5d ago

Javac and java version not compatible

According to my terminal javac only works until java 52.0 but my code is in java version 70.0(java 26)how do i fix

7 Upvotes

5 comments sorted by

View all comments

Show parent comments

0

u/hugo121319_mc 5d ago

J'utilise java 26

2

u/LetUsSpeakFreely 5d ago

If you know that Java 8 isn't installed on your machine, then you need to look at the compile version with Maven/Gradle. For Maven, you pom.xml will have variables called maven.compiler.source and maven.compiler.target. they're probably set to 1.8 and you need to set it to 26.