[Bluej-discuss] Cannot create an instance of Class.

Andrew McKenzie icapetown at gmail.com
Thu Oct 5 00:10:52 BST 2006


I am somewhat frustrated and there is nothing worse than this as it is
probably caused by my ignorance.

I have just started working through the book and I am in chapter 1 - opened
up 1st example and had the same problem as Lawrence - I am trying to compile
as suggested by Ian - but for some or other reason I am picking up faults
with the code.  I apologise as I do not believe there are any problems -
once again I am sure that it is me.

Anyway BlueJ tells me the following:

In Square - line 174 cannot access Canvas
In Circle - line 175 cannot access Canvas
In Triangle - line 177 cannot access Canvas
(bit of a theme here)

In Canvas - line 45 <identifier> expected  -  the actual code:*     private
List<Object> objects;*
**
So I keep trying to compile but obviously with these problems it won't
compile *-* so I can't create an object and all the rest of chapter 1 - I
even thought there may be some errata on the web site hence I ended up here.

I've had a look at Chapter 2 - examples work fine - Chapter 3 - picks up
problems again??

I've installed BlueJ 2.1.2 - could it be a JDK version conflict??  Under
preferences - Libraries - I am pointing to j2sdk1.4.2_12 lib??  Could this
be a problem?

Any ideas?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.bluej.org/pipermail/bluej-discuss/attachments/20061005/eba7a55e/attachment-0001.html


More information about the bluej-discuss mailing list