aspose file tools*
The moose likes IDEs, Version Control and other tools and the fly likes Eclipse:  Changing from JRE to JDK.  And undoing it Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Eclipse:  Changing from JRE to JDK.  And undoing it" Watch "Eclipse:  Changing from JRE to JDK.  And undoing it" New topic
Author

Eclipse: Changing from JRE to JDK. And undoing it

Bill Clar
Ranch Hand

Joined: Sep 21, 2006
Posts: 153

I set my Eclipse (Kepler) to use a JDK as an installed JRE so that I could access the Java source files. Doing so botched up my ability to return generated keys from JDBC. I reverted
back to the default JRE (Windows Preferences --> Java --> Installed JREs) but it didn't fix the problem.



This code (it's dummy data, that's why it's hard coded) used to work in my project. To verify I tested this exact code in a separate test project. Works like a charm in the test project.

I've refreshed my project. I've removed the JRE7 libraries and re-added them. Nothing works. I know Eclipse is twitchy and there are some tricks to get it to recognize changes in the project and/or environment but I can't find them even with a PhD in Google.

If you any suggestions, I'm all ears. Otherwise, I'll have to hack the project to get the generated key. Joy...

Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5843
    
    7

This should have nothing to do with the JDK/JRE, rather it has something to do with the JDBC driver you are using (the JDK/JRE has a JDBC interface only, the driver implements the interface and provides the functionality). So I would check which JDBC driver is being used.


JBoss In Action
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18911
    
    8

Yes. Which implies that changing the JDK/JRE caused the change in the device driver. Which in turn implies (to me, anyway) that the device driver was stored in the extensions directory (the lib/ext directory) of one or both of them.

Bill Clar
Ranch Hand

Joined: Sep 21, 2006
Posts: 153

Resolved. It wasn't the JDBC driver. It's my test database and how I was connecting. I ran another JUnit case to confirm this.

Thanks for your help.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Eclipse: Changing from JRE to JDK. And undoing it