Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / June 2006

Tip: Looking for answers? Try searching our database.

java jsp compiliing issue

Thread view: 
tiewknvc9 - 14 Jun 2006 21:57 GMT
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.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.