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

Todd O'Bryan toddobryan at mac.com
Thu Oct 5 01:45:36 BST 2006


As you suspect, it is a JDK problem. You need at least version 1.5.0 for
the 3rd edition of the book.

Todd

On Thu, 2006-10-05 at 00:10 +0100, Andrew McKenzie wrote:
> 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?   
> _______________________________________________
> mailing list bluej-discuss at bluej.org
> To unsubscribe or change your preferences, go to
> http://lists.bluej.org/mailman/listinfo/bluej-discuss



More information about the bluej-discuss mailing list