Blog
Projects
About
Backtrack:
Blog
›
Setting Java compiler complian…
Email this to a friend
Setting Java compiler compliance level (how to compile for older JREs)
posted on May 28th 2015, at 12:10
by
lunarg
You can compile for older versions of the JRE by setting the compiler target compliance level. This allows you to generate class files that are usable on older versions of the JRE as well as the current one.
From your IDE, you will be able to select the compliance level, but if you're compiling manually using javac, this can be done by setting the appropiate command line parameters: -source and -target.
For example, to compile for JRE 1.6, do this:
javac -source 1.6 -target 1.6 MyClass.java
A quick explanation:
-source sets the source compatibility to the specified version, and ensures that your code is usable on the specified JRE.
-target specifies the compliance level o
...
read more
Send a link to this post to yourself or a friend.
Send to e-mail
:
Your name:
Your e-mail:
Captcha:
Type the letters and numbers as shown.
Not readable?
Get another
.
Information entered is solely used for sending a one-time e-mail, and is not retained and/or passed on to a third party.
Tags
computer
windows
software
vmware
microsoft
linux
exchange
hardware
network
news
mac
home
powershell
office365
msoffice
ad
server
sqlserver
dell
soaring
internet
esx
sbs
mssql
rds
events
terminalserver
powercli
hp
virtualization
Archive
«
‹
December 2024
›
»
Sun
Mon
Tue
Wed
Thu
Fri
Sat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Links
-
@harkx
-
Cats & Dogs
-
Jargon-free Security Guide
Quote
«
Stripes on a tiger are hard to change.
»
The Noisettes
Contact
© 2009-2024 Black Manticore – all rights reserved
code by
lunarg
, design by
SuriAmanah
, hosted at Cats&Dogs