Hi,
Im new at JSP pages, but Im having a little difficulty compiling my
java code that I want to add to the site.
its a regular java class called "test"
it has a
public test(){}
constructor function and a
public static void main (String args[]){} function
I would like to use this class as a set utility funcitons. However
when I compile it in eclipse I am getting the error
"
java.lang.NoClassDefFoundError: test
Exception in thread "main"
"
how is this possible? I specified that the main function should be run
when I het run, but it cant find it? I also tried specifying the test
class to be the "run" of this file.
All I want to do is compile this thing so that I can use the utility
functions that I have created...
any ideas?
thanks in advance!
Mark Space - 15 Jun 2006 03:30 GMT
> Hi,
>
[quoted text clipped - 7 lines]
> constructor function and a
> public static void main (String args[]){} function
I'm not truly sure, but I don't think JSP classes have main functions.
The main thread is in the container (Tomcat), and your .class file is
loaded by the container.
You might have to turn this into a regular java class, do your testing,
then run it as a JSP. Long term, you should probably look into
integrating some sort of unit test framework into your JSP development.