The only way to create a
Java application that uses WebSphere resources like Datasources appropriately is to create what's called an application client. An Application Client is a special project type (create it with new>project and select Application Client) that you add to an EAR file. When you create the Application Client project the classpath will be set appropriately with J2EE.jar and the others.
Finally, you run an application Client by creating an application client configuration using Run... and creating one in the application client runner configuration editor.
Trust me, this is the ONLY supported way to make this work. BTW,
you should probably read in the infoCenter for WebSphere about "launchClient" as well, since you'll probably want to run this at the command line at some point.
A good idea for more information might be to read the
EJB client chapter of my book, which covers all of this in detail.
Kyle