java - How to set the javac compiler flags to generate 1.7 bytecode? -


i trying follow instructions on this page install google app engine on ubuntu 16.04.

i stuck on third point in 'installing on linux' is:

the app engine java sdk requires java 7 bytecode level. can use either java 7 or java 8; sure set javac compiler flags generate 1.7 bytecode:

-source 1.7 -target 1.7

what have tried is:

javac -source 1.7 -target 1.7 

but gives me error

javac: no source files
use -help list of possible options

the command given below give same error

javac -source 1.7 

however javac -target 1.7 gives following error

javac: target release 1.7 conflicts default source release 1.8

any advice on how tackle problem highly appreciated.

further information:

javac -version gives javac 1.8.0_92 output.

java -version gives output:

java version "1.8.0_92"
java(tm) se runtime environment (build 1.8.0_92-b14)
java hotspot(tm) 64-bit server vm (build 25.92-b14, mixed mode)

you use -source 1.7 -target 1.7 options when compiling code. example:

javac -source 1.7 -target 1.7 myprogram.java 

will compile source file myprogram.java , produce java 7-compatible class file myprogram.class.

it's not execute javac -source 1.7 -target 1.7 once , setting remembered somewhere on works in java 7 mode (which how seem think works).


Comments

Popular posts from this blog

java - Static nested class instance -

c# - Bluetooth LE CanUpdate Characteristic property -

JavaScript - Replace variable from string in all occurrences -