• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Configuring a SQL datasource

 
Ranch Hand
Posts: 55
Netbeans IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
how could i configure a SQL datasource for glassfish server. I can't able to configure my database which is in SQL server 2008. i've downloaded the jtds.jar file, and told to put it in my classpath.
Now while using the IDE we don't need the class path we only need it when we run the java from command prompt right??
So, if we use the IDE, should we still need to copy the jtds jar file to the class path??
If so, then I have the one path value as jdk/bin, then where should i put the jtds jar file?
I have the Path setting value as C:\Program Files\Java\jdk 1.6.0\bin and system variable CompSpec value as C:\WINDOWS\system32\cmd.exe
Now, should i place the jtds jar file location in the PATH value separated by a comma? Or should i create a new path to it?
Please help me someone, i need to clear the confusion today only. I am into this confusion for a long 1 week.
I just can't able to configure the datasource at the moment.
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Now while using the IDE we don't need the class path we only need it when we run the java from command prompt right??


Java programs always need a classpath. The IDE hides the implementation details of that classpath.


I have the Path setting value as C:\Program Files\Java\jdk 1.6.0\bin and system variable CompSpec value as C:\WINDOWS\system32\cmd.exe


The path environment variable is different from the a classpath environment variable. See this.


 
Rituparna Duttagupta
Ranch Hand
Posts: 55
Netbeans IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK. I've copied the jtds.jar into the C:/Program files/Java/jre1.6.0/lib/ext directory thus got it in the CLASSPATH. Now what's the next step??
 
Sheriff
Posts: 28394
100
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The next step is to take it back out of there. Don't just sling things into the extensions directory because you don't know what else to do, that decision will come back to haunt you after a while.

I would recommend reading the Glassfish documents to find the answer to your question. I would expect it would be in an FAQ or something like that.

Since your question is about configuring Glassfish and not at all about object-relational mapping, I would also suggest you might get better answers by having your post moved to a relevant forum. Would you like one of the moderators to do that?
reply
    Bookmark Topic Watch Topic
  • New Topic