[nbusers] Re: Is it possible to have a different JRE from the build Java platform?

  • From: Edson Richter < >
  • To:
  • Subject: [nbusers] Re: Is it possible to have a different JRE from the build Java platform?
  • Date: Thu, 15 Nov 2012 21:08:29 -0200
  • Organization: Simkorp Informática Ltda

Em 15/11/2012 17:32, Thomas Wolf escreveu:
Hi Edson,

On Nov 15, 2012, at 11:57 AM, Edson Richter 
< >
 wrote:

Em 15/11/2012 13:20, Thomas Wolf escreveu:
Hi Edson,
Neither of these options works for me.  I already had (a) set and added the 
"-target 1.6" compiler option you suggested in (b), but I still get all the 
warnings/errors that come from not having Java 7 compliant source code (e.g. we have a 
class that derives from ResultSet but doesn't implement one of the new Java 7 methods 
required in the new ResultSet interface; similarly, our code uses a bunch of com.sun.* 
security related classes that are no longer available).
Ok, this is a different problem, and I understand your pain now. I will have 
to choose to use JDK 6 libraries (has nothing to do with source code version 
or class file binary version - it have to do with introduction of new 
features in libraries that existed in the past.

In this case, I suggest you to
a) Use JDK 6 for build/compile/run (and, of course, for JDK 6 version of 
code).
b) Migrate everything to JDK 7.

You should never rely in "com.sun.*" or "com.ibm.*" or "com.oracle.*" 
libraries in the Java platform. They have no guarantee that they will be available in future releases, and 
since you have, you are stuck in the past.
Believe me, I understand that.  But when this app (and we're talking 
literally in excess of a million lines of java code) was first written in the 
late '90s, a lot of essential stuff (e.g. SSL/certificate related) wasn't 
available anywhere except in these packages.  So the choice was to either not 
have a feature - or to use a package that might not be supported in some 
distant future.

Well, I know it would be too late for this tip: whenever you have dependencies from external libraries, create wrappers that encapsulate the functionality. When a new version comes, you can update without touching all your code.
I do use that with persistence, so all my applications are shielded from changing from TopLink to Hibernate to WhatEverElseInFuture.


Anyway, it's not a great inconvenience to switch manually to Java 7, after 
compiling in Java 6.  I was just hoping for more flexibility.  It would seem 
to me, at least from a GUI perspective, moving the platform combo box from 
the top-level into each one of the tabs (compile, run, etc.) would do the 
trick….but that suggestion could be part of the RFE bug I'll write.

My guess is that you will have a little more trouble than just a RFE for the IDE. There is library level incompatibilities that the IDE would not be able to overcome (there is no way to use Javac 7 compiler with JDK 6 libraries).

Regards,

Edson


Thanks again for trying to help.
tom






[nbusers] Is it possible to have a different JRE from the build Java platform?

Thomas Wolf 11/14/2012

[nbusers] Re: Is it possible to have a different JRE from the build Java platform?

Edson Richter 11/14/2012

[nbusers] Re: Is it possible to have a different JRE from the build Java platform?

Thomas Wolf 11/14/2012

[nbusers] Re: Is it possible to have a different JRE from the build Java platform?

Thomas Wolf 11/14/2012

[nbusers] Re: Is it possible to have a different JRE from the build Java platform?

Edson Richter 11/15/2012

[nbusers] Re: Is it possible to have a different JRE from the build Java platform?

Thomas Wolf 11/15/2012

[nbusers] Re: Is it possible to have a different JRE from the build Java platform?

Edson Richter 11/15/2012

[nbusers] Re: Is it possible to have a different JRE from the build Java platform?

Thomas Wolf 11/15/2012

[nbusers] Re: Is it possible to have a different JRE from the build Java platform?

Edson Richter 11/15/2012

[nbusers] Re: Is it possible to have a different JRE from the build Java platform?

Thomas Wolf 11/15/2012

[nbusers] Re: Is it possible to have a different JRE from the build Java platform?

Edson Richter 11/15/2012

[nbusers] Re: Is it possible to have a different JRE from the build Java platform?

Thomas Wolf 11/16/2012

Project Features

About this Project

www was started in November 2009, is owned by jpirek, and has 21 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20140418.2d69abc). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close