This content has been marked as final. Show 1 reply
The error you get is normal. Typically, the context is provided by a JEE container, such as Oracle WebLogic Server or Oracle GlassFish Server. Your desktop application lacks such a container.
It is possible to implement custom JNDI behavior in Java. The blog entry below provides a sample. I didn't validate the contents, however.
JEE containers usually encrypt the connection credentials; make sure your custom implementation does likewise if you choose to go this route.