Java Pet Peeve
|
I'm guessing there's got to be a very good reason for this, but I can't see it. Perhaps somebody can enlighten me. I'm thinking of something here that can help novice Java users. |
Hand's up all the people who, when they were first starting with Java, accidentally typed something like:
% java SomeApp.class
when they really should have been trying to run:
% java SomeApp
You got back an error message like:
Exception in thread "main" java.lang.NoClassDefFoundError: SomeApp/class
Now experienced Java users realise soon realise what's going on here and adjust accordingly. But what about helping novice Java users?
With just a little more effort the java program could check to see if there was a SomeApp.class file in the currently directory and then check if it was a valid class file and if so, it could return an error message like:
Exception in thread "main" java.lang.NoClassDefFoundError: SomeApp/class
Did you really mean "java SomeApp" ?
or something similar. I'd leave it to HCI people, or a flock of senior engineers or lawyers to properly define the wording.
What am I missing?
Update: After receiving some private email on this, I've filed CR #6222504 on this issue. If you are interested get yourself added to that bug's interest list.
( Jan 27 2005, 07:50:24 AM PST ) [Listen] Permalink Comments [7]
Comments are closed for this entry.













public class class { }You get:% javac class.java class.java:1: <identifier> expected public class class { ^ class.java:1: <identifier> expected public class class { ^ class.java:4: '{' expected ^ 3 errorsPosted by Watt on January 27, 2005 at 09:12 AM PST #
Posted by Rich Burridge on January 27, 2005 at 09:37 AM PST #
Posted by Laird Nelson on January 28, 2005 at 05:57 AM PST #
Posted by ozan yigit on January 29, 2005 at 08:35 PM PST #
Posted by 67.114.129.160 on January 30, 2005 at 08:15 AM PST #
Posted by Carfield on February 01, 2005 at 02:04 AM PST #
Posted by Fred on January 20, 2006 at 12:18 AM PST #