I am required to compile my source code with Java 6 for university. I currently have Java 8 JDK installed on my PC (Linux). How do I compile in Java 6?
p.s. I understand I wont be able to use any Java 7 or 8 features.
p.p.s. I realize java 6 source code will compile fine using the Java 8 JDK however I find that I am accidentally using post Java 6 features in my programs when compiling at home. When I try to compile the source code on the lab computers at uni I run into a bunch of errors. e.g. not being able to cast an object to a primitive.
You can use the below for compilation