• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

javax.sql - JBuilder6

 
Rick Fischer
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I cannot import javax.sql.*; in my JBuilder6 Professsional IDE. I get a complier error. Is there a library I need to add? I've tried JDataStore and DBExpress among others.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34974
379
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rick,
Do you have j2ee.jar in your classpath?
 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jeanne Boyarsky:
Rick,
Do you have j2ee.jar in your classpath?


Jeanne, if I am not wrong, javax.sql package is in J2SE... We do not need j2ee.jar to import that package... But I've heard that javax.sql is just added to the JDK 1.4... So if Rick is not using JDK 1.4, it would raise an error about importing package...

I has been using JBuilder since it was in version 3. One thing is that JBuilder 6's default JDK is 1.3 and it's better to use external JDK 1.4, instead of default 1.3 of JBuilder 6, Rick... Hope it helps...
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in 1.3 javax.sql was not part of the core APIs and had to be installed separately (for example from J2EE though there was a standalone version as well).

From the 1.4 API docs:

Provides the API for server side data source access and processing from the JavaTM programming language. This package supplements the java.sql package and, as of the version 1.4 release, is included in the JavaTM 2 SDK, Standard Edition. It remains an essential part of the Java 2 SDK, Enterprise Edition (J2EETM).
 
Rick Fischer
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your feedback

I downloaded and installed j2sdk1.4.2_05. I also set the JDK in the project properties to the new JDK. I still get the compiler error on the import javax.sql.*; I could not find J2EE.jar or J2SE.jar in the J2sdk1.4.2_05 directory or anywhere on my system. How do I get these?
 
Rick Fischer
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I finally got it working, but still not sure where (in what jar) it found javax.sql.DataSource. Does anyone know how I can find this out?

Thanks
 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Rick Fischer:
I finally got it working, but still not sure where (in what jar) it found javax.sql.DataSource. Does anyone know how I can find this out?


Then try to reset your JDK to be 1.3 again... You'll see that there is an error again... So the main problem is with the version of JDK you are using...

Hope it helps...

P.S., Don't forget to restart the JBuilder whenever you change your JDK for your project. I heard that earlier versions of JBuilder need that...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic