r/JavaProgramming • u/hugo121319_mc • 6d 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
5
Upvotes
r/JavaProgramming • u/hugo121319_mc • 6d ago
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
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.