Wrox Programmer Forums
|
BOOK: Ivor Horton's Beginning Java, Java 7 Edition
This is the forum to discuss the Wrox book Ivor Horton's Beginning Java, Java 7 Edition by Ivor Horton ; ISBN: 978-0-470-40414-0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Ivor Horton's Beginning Java, Java 7 Edition 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 December 9th, 2011, 02:00 PM
Registered User
 
Join Date: Dec 2011
Posts: 7
Thanks: 1
Thanked 0 Times in 0 Posts
Default Need help with book ch01, page 24

Hello. I'm a novice Java programmer. This is my first programming language and i just started on this book a few days ago.

I tried to follow the instructions given in the book but i got this error in my command:

C:\Users\shawnlim2010\My Documents\NetBeansProjects\OurFirstProgram\src\our first
program>java OurFirstProgram
Exception in thread "main" java.lang.NoClassDefFoundError: OurFirstProgram (wron
g name: ourfirstprogram/OurFirstProgram)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java :791)
at java.security.SecureClassLoader.defineClass(Secure ClassLoader.java:14
2)
at java.net.URLClassLoader.defineClass(URLClassLoader .java:449)
at java.net.URLClassLoader.access$100(URLClassLoader. java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java: 361)
at java.net.URLClassLoader$1.run(URLClassLoader.java: 355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.j ava:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:4 23)
at sun.misc.Launcher$AppClassLoader.loadClass(Launche r.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:3 56)
at sun.launcher.LauncherHelper.checkAndLoadMain(Launc herHelper.java:472)

I've managed to compile OurFirstProgram.java successfully. But as you can see I am having trouble running OurFirstProgram. I'm not sure why. Would anyone be able to help?

Thanks.

-shawn
 
Old December 10th, 2011, 03:36 AM
Registered User
 
Join Date: Dec 2011
Posts: 7
Thanks: 1
Thanked 0 Times in 0 Posts
Default solved! yay!

solved the problem already. I realize i set my class name wrongly. hehe.
 
Old December 12th, 2011, 10:04 AM
Registered User
 
Join Date: Dec 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Congrats! Good start!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Questions about the Access 2010 24 Hour Trainer Book? Post them here! gjgriffith BOOK: Microsoft Access 2010 24-Hour Trainer 2 January 30th, 2012 05:14 PM
Hosed on page 24 hshlom BOOK: Professional ASP.NET MVC 1.0 ISBN: 978-0-470-38461-9 0 August 7th, 2011 10:24 PM
Page 24: Failed at the first Hurdle! ken evans BOOK: Professional C# 4.0 and .NET 4 1 December 15th, 2010 02:28 PM
Chapter 1 Page 24 Data Grid + Linked List Box not working VS2008 nineismine BOOK: Beginning ASP.NET 2.0 and Databases 0 May 10th, 2009 03:11 PM
Ch01 - Installation questions chino BOOK: Beginning ASP.NET 1.0 2 May 16th, 2004 04:52 AM





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