简体   繁体   中英

Is it possible to override the minimum requirement of Java 1.6 for NetBeans 8.2?

I believe I'm lacking in the knowledge that should be pretty basic, but, here's my scenario:

I manage a 3rd party application that still runs on Java 1.5. The application server (WebLogic 11) can run on Java 7, but the code still needs to be compiled for 1.5 (basic info that I should understand I guess).

I also enjoy using the latest and greatest tools, so staying on NetBeans 8.1 while knowing there is a new version out there really doesn't sit well with me. But, adding a 1.5 platform to NetBeans 8.2 is not possible, with this error message:

The platform source/binary format is older than minimal supported one (1.6)

I've tried adding compiler options like:

-source 1.5 -target 1.5

but then I get errors stating

javac: source release 1.6 requires target release 1.6

My assumption is that it's looking at the "Source/Binary format" option which is set to "JDK 6" in the project properties.

Any help/guidance would be appreciated.

Not in NetBeans 8.2.

Use NetBeans 8.0.2 which supports minimum Source/Binary format of 1.2

First, to answer your Question, this is not possible with NB 8.2
You have to downgrade NB to make this work again.

But I've a few questions:

I manage a 3rd party application that still runs on Java 1.5.

What does this mean? You can't update Java? What is the exact reason?

The application server (WebLogic 11) can run on Java 7, but the code still needs to be compiled for 1.5

Sorry, I don't get it, what code do you mean?
Why does it have to be compiled for 1.5?
Is the 3rd party (1.5) application accessing your java classes directly?

(In theory*, Java is backwards compatible. Means, you could use the latest Java to run old binaries)

*In theory, because sometimes you have to do little modifications to make your application work again with newest Java version.

Cheers.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM