This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Peter, I was a cobol programmer in a former life and have been having some trouble teaching myself java. In fact, I'm working on a project where even my co-workers don't know any java and can't be used as resources. Therefore, I'm always looking for "THE" book which will clear up whatever it is that I'm not understanding. One of the things which really helps, is a good example. So, I went to http://afu.com/jj6/ and copied your clock example. I compiled it on my AS/400 and have a couple of small errors. It is hard for noobes to know where to start to fix problems - even small ones, when there are so many unknowns. Does your book help the real beginner to find answers to problems?
ps: I encountered 2 errors when I compiled your code: Clock.java:51: class clock4 is public, should be declared in a file named clock4.java
Clock.java:26: cannot resolve symbol symbol : variable EXIT_ON_CLOSE location: interface javax.swing.WindowConstants this.setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
I've done enough to know that I needed to re-name the program. That fixed that. The other is less clear to me, I believe I have to find the javax.swing stuff and put it in my class path. I'll work on that. My classpath was set up long ago, and I'm not sure if I remember right, how to add to it on the IBM iSeries AS/400 I'm using. I'll research that.
Any way, sorry for the long discourse. Still, a good beginner book has good examples and good help for when those examples don't work. Does your book have those?
Originally posted by David Ulicny: Maybe you are working with J2SDK 1.3 and there is not EXIT_ON_CLOSE constant.
A quick check of the API's will tell you that EXIT_ON_CLOSE has been around since version 1.3 (for JFrame) and was added to the WindowConstants interface in version 1.4, so my guess is that Robyne's version is earlier. [ September 29, 2004: Message edited by: Nigel Browne ]
Joined: Jun 04, 2003
Thank you all for your responses. I never meant to "fault" Peter for anything. My Ultimate question was about whether there were examples and help for errors. I should have specified "common" errors. It turns out that my problem with EXIT_ON_CLOSE will remain and is probably not common to those who are in a seasoned shop or who know something more about what they're doing.
I do not have access to J2S??.
That answers a question I had about what is the difference between Java and Java2.
I have access to JDK1.2 and JDK1.3. I choose to use JDK1.2 as it handles a certain JNDI problem for me better than the JDK1.3.
Anyway, if I in anyway implied fault, please forgive me. I was trying to ask an honest question and find out if this book is a good choice for someone so new to Java that they don't know what a JDK is.
I see that Peter's book serves a good purpose in keeping Java programmers up to date with the most current options.