Skip to Main Content

Question about javac -source -target

795530Jan 23 2014 — edited Jan 24 2014

Hello:

I am using JDK 1.8.0-ea and I want to compile my sources for 1.7 (compatibility with previous VM: 1.7 is the latest official release)

C:\Users\admin>javac -target 1.7 prg.java

javac: target release 1.7 conflicts with default source release 1.8

C:\Users\admin>javac -source 1.8 -target 1.7 prg.java

javac: source release 1.8 requires target release 1.8

Is there some way I could compile for previous VM or will 1.8 classes NOT be compatible  with previous VMs?

Comments
Post Details
Added on Jan 23 2014
6 comments
5,971 views