Bugs item #3429764, was opened at 2011-10-28 10:11
Message generated for change (Tracker Item Submitted) made by mgricken
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=438935&aid=3429764&group_id=44253
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Interactions
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Mathias Ricken (mgricken)
Assigned to: Nobody/Anonymous (nobody)
Summary: Confusing Error Message when main Method not static
Initial Comment:
When a program with a main method that is not static is run, DrJava prints a confusing error message when the "run" command is used. It works with the "java" command.
Welcome to DrJava. Working directory is D:\Documents\Dev\Java
> run Lab
java.lang.NullPointerException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at edu.rice.cs.drjava.model.compiler.JavacCompiler.runCommand(JavacCompiler.java:271)
> java Lab
Static Error: No method in static Lab has name 'main'
>
For an example program, see http://stackoverflow.com/questions/7911004/nullpointerexcetion-native-method-accessor-hashing-words-issue
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=438935&aid=3429764&group_id=44253
|