Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Java and JDK > BOOK: Beginning Java 2
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning Java 2
This is the forum to discuss the Wrox book Beginning Java 2, SDK 1.4 Edition by Ivor Horton; ISBN: 9780764543654
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Java 2 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 1st, 2004, 12:09 AM
Registered User
 
Join Date: Jan 2004
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Multiple Constructors Page 194

I have downloaded the programs from your website just in case I had keystroke errors. I'm working page 194 chapter 5 "Multiple Constructors" and when I compile and run the program I get the following error:
lava.lang.nocalssdeffounderror: sphere
Exception in thread "main"
I'm using NetBeans IDE 3.5.1
Could you tell me what I may be doing wrong?

Thank You,
Tony
  #2 (permalink)  
Old February 1st, 2004, 07:10 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , .
Posts: 175
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Maybe it's just a typo but shouldn't 'sphere' be 'Sphere'; by covention all classes in java should begin with a capital letter.

Cheers

Martyn
  #3 (permalink)  
Old February 5th, 2004, 11:00 PM
Authorized User
 
Join Date: Feb 2004
Location: , , .
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You have done something wrong with the packgage declaration. In the NetBeans you import a filesystem. Let's say I import the directory "c:\myclasses", that is the filesystem, let's say I have some more directories under "c:\myclasses", like
"com\myself\myjava" ( so it looks like: "c:\myclasses\com\myself\myjava" the first thing I have to write in my java code file is
"package com.myself.myjava;"
I hope this is of some help
best regards
rune

 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
page 194, eval() problem keenlearner BOOK: Professional Ajax ISBN: 978-0-471-77778-6 2 December 16th, 2006 08:27 AM
Printing PDF (page x to y) / multiple page seq's robbert XSLT 1 November 13th, 2006 10:27 AM
Custom Control with Multiple Constructors? three ASP.NET 2.0 Basics 12 May 2nd, 2006 05:29 PM
multiple constructors for custom controls three BOOK: Professional Web Parts and Custom Controls ASP.NET ISBN: 0-7645-7860-X 0 May 1st, 2006 03:24 PM
CH7: RegExp Object PG 194 and 195 xZanU BOOK: Professional JavaScript for Web Developers ISBN: 978-0-7645-7908-0 5 January 12th, 2006 04:31 PM



All times are GMT -4. The time now is 06:41 PM.


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