Is there a Java 7 to Java 6 converter?

半城伤御伤魂 提交于 2019-12-19 05:58:00

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/8869869/is-there-a-java-7-to-java-6-converter

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!