Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Configuring a SQL datasource

 
Rituparna Duttagupta
Ranch Hand
Posts: 55
Firefox Browser Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • 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.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • 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
Firefox Browser Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • 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??
 
Paul Clapham
Sheriff
Posts: 21579
33
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • 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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic