Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > JSP Basics
|
JSP Basics Beginning-level questions on JSP. More advanced coders should post to Pro JSP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the JSP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 1st, 2003, 03:07 AM
Registered User
 
Join Date: Aug 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default BookApp returns error

Hi,

In chapter 7 there is an example of a Java-Application "BookApp". When I compiled the code, and wanted to run it I got the error :

"Exception in thread "main" java.lang.NoClassDefFoundError : BookApp

My code looks like :

public class BookApp{

    private String title;

    public String getTitle(){
        return title;
    }

    public void setTitle(String title){
        this.title = title;
    }

    public static void main (String[] args){
        BookApp myBook = new BookApp();
        myBook.setTitle("Beginning JSP Web-Development");
        System.out.println(myBook.getTitle());
    }
}

Java-code and compiled class are in the directory \com\wrox\library.

 
Old September 5th, 2003, 10:11 PM
Registered User
 
Join Date: Aug 2003
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

this seems to be a classpath problem. Check your classpath and make sure it is setup properly.

-rick






Similar Threads
Thread Thread Starter Forum Replies Last Post
Not all code returns a value Doom C# 4 February 11th, 2008 03:48 PM
Ch1 MySQL returns Error 1046: No database selected aiche_ag BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 1 October 1st, 2007 02:47 PM
SQL Query returns error Raphasevilla Access VBA 2 February 22nd, 2006 08:30 AM
DELETE FROM returns error: Too many fields defined bsausser SQL Language 6 November 23rd, 2005 04:18 PM
UPDATE statement returns syntax error AviatorTim Classic ASP Databases 2 January 8th, 2004 05:22 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.