Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Eclipse: Changing from JRE to JDK. And undoing it

 
Bill Clar
Ranch Hand
Posts: 163
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Paul Clapham
Sheriff
Pie
Posts: 20771
30
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 163
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic