No, using 1.8 features in your source code requires you to target a 1.8 VM. I just tried the new Java 8 release and tried compiling with -target 1.7 -source 1.8
, and the compiler refuses:
$ javac Test -source 1.8 -target 1.7
javac: source release 1.8 requires target release 1.8
More Related Contents:
- javafx 8 compatibility issues – FXML static fields
- PermGen elimination in JDK 8
- Error when using LogManager (l4j2) with Java 8 (java.lang.reflect.AnnotatedElement cannot be resolved)
- Java 32-bit vs 64-bit compatibility
- Generic type inference not working with method chaining?
- Maximum size of a method in Java 7 and 8
- Why are Java 8 lambdas invoked using invokedynamic?
- What is the difference between PermGen and Metaspace?
- Support for Compressed Strings being Dropped in HotSpot JVM?
- How to set IntelliJ IDEA Project SDK
- Understanding metaspace line in JVM heap printout
- javafx 8 compatibility issues – FXML static fields or methods
- What are the -Xms and -Xmx parameters when starting JVM?
- What’s the difference between Instant and LocalDateTime?
- How to parse/format dates with LocalDateTime? (Java 8)
- How to convert an Iterator to a Stream?
- I want to get Year, Month, Day, etc from Java Date to compare with Gregorian Calendar date in Java. Is this possible?
- What is the breakdown for Java’s lambda syntax?
- What are the differences between abstract classes and interfaces in Java 8?
- What are Reified Generics? How do they solve Type Erasure problems and why can’t they be added without major changes?
- Files.walk(), calculate total size
- How does the JVM ensure that System.identityHashCode() will never change?
- When I need to use Optional.orElseGet() over Optional.orElse()
- Take every nth element from a Java 8 stream
- Static context cannot access non-static in Collectors
- How can I parse/format dates with LocalDateTime? (Java 8)
- Java 8, how can I implement a switch statement using streams?
- NoClassDefFoundError sun/io/ByteToCharConverter with InterBase JDBC driver
- Creating String representation of lambda expression [duplicate]
- Spring 3.2.x with Java 8