ClassNotFound exception when running Java Application fron within Eclipse -
12-04-2008, 12:38 PM
I am a fairly infrequent user of Eclipse. Although I can compile what is a fairly simple Java application which finds all the Classes defined in a jar file, when I come to run the application I get a ClassNotFound exception. However, if I run the same application from a command line (either specifying the .jar file in the CLASSPATH environment or using the -classpath switch) it runs OK.
In the Project>Properties>Java Build Path I have specified the required .jar file. What am I doing wrong?
Re : ClassNotFound exception -
10-06-2009, 04:33 AM
Hi,
Is it possible that the JRE of eclipse (you can specify this in the preference pane, Java, installed JREs) is not the JRE you use in the command line (you can specify this in your OS environment variables?)?
Paul,
Thanks for your reply. It was such a long time ago that I can't remember the exact problem. I am not experiencing problems at the moment, so I assume that I somehow resolved the problem.
Thanks anyway.
Stuart Millington