![]() |
|
|
|
| ||||||
|
Welcome to the The ProgrammersTalk Community forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
![]() |
![]() | | LinkBack | Thread Tools | Display Modes | ![]() |
| |||
| Access When i am tryin to connect my java program to MySql database...it is showing following error: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial ............................................... See the following code and let me know if anything is incomplete or any error Context initCtx = new InitialContext(); Context envCtx = (Context) initCtx.lookup("java:comp/env"); DataSource ds = (DataSource) envCtx.lookup("jdbc/Authentication"); conn = ds.getConnection(); System.out.println ("Database connection established"); |
| |
| The Following User Says Thank You to HelloWorld For This Useful Post: | ||
ccoonen (11-18-2007) | ||
![]() |
| Thread Tools | |
| Display Modes | |
| |