Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a Java 7 to Java 6 converter?

Android SDK requirements state that either JDK 5 or JDK 6 is required.

However, I have a Java class library written in Java 7 and I would like to use it for my Android project.

Instead of manually converting Java 7 to Java 6 by hand, I was wondering if anyone know of a converter that could do this job for me?

Or do we have to code one up from scratch?

like image 508
Pacerier Avatar asked Jan 15 '12 13:01

Pacerier


People also ask

Is Java 7 backwards compatible?

The backwards compatibility means that you can run Java 7 program on Java 8 runtime, not the other way around. There are several reasons for that: Bytecode is versioned and JVM checks if it supports the version it finds in . class files.


1 Answers

Do you have the source for the JAR? If so, you can use the javac -target parameter set to either 5 or 6 to generate either Java 5 or 6 class files. See this page.

like image 50
Kaleb Brasee Avatar answered Oct 01 '22 01:10

Kaleb Brasee