From: Dave Smith <DavidS<mith@by...> - 2002-09-27 15:28:17
I've been using J for months and am loving it. I work as a system admin
for the computer science department of my university. We've been looking
at a bunch of editors for our intro to programming class. These students
use Java only. I just recommended to my boss that we use J. All the admins
love it. In order for us to use it in the department (over 1,000
students), it will need three buttons when editing in Java mode:
2. Execute class file
3. Execute applet
Peter, is there any way you could add those three buttons for our users?
From: Peter Graves <peter@ar...> - 2002-09-27 16:32:02
> I've been using J for months and am loving it. I work as a system admin
> for the computer science department of my university. We've been looking
> at a bunch of editors for our intro to programming class. These students
> use Java only. I just recommended to my boss that we use J. All the admins
> love it. In order for us to use it in the department (over 1,000
> students), it will need three buttons when editing in Java mode:
> 1. Compile
> 2. Execute class file
> 3. Execute applet
> Peter, is there any way you could add those three buttons for our users?
I think the right thing to do would be to provide a generic facility
to specify which buttons appear on the toolbar for a given mode.
For each button you'd specify the icon, the text for the button, and
the command to be executed (including arguments).
One way to do this would be to give each mode a toolbar file, just
like it currently has a keywords file, and you could replace the Java
mode toolbar file in the version of j that you distribute to your
(Or you could just point to the custom toolbar file in ~/.j/prefs. A
global site preferences file in /etc might be the best way to handle
this sort of situation.)
As far as the commands themselves go, the compile command is already
And the "execute applet" command would just launch an external browser
with the appropriate command line, right?
Which leaves "execute class file".
If you have a typical hello.java program (for example) and you do
"execute class file", where should the output (e.g. "hello world") go?
In theory the output can go to a transient output buffer in j (which
is where the output of the compile command goes), but there might be
problems with buggy student programs that get stuck in a loop or
generate pathological amounts of output. It's not so easy to kill
external programs from within j, especially on Windows. (If you're not
using Windows, we have more options.) And there's no way to get user
input in that situation, for interactive programs.
Worst case, once j supports custom toolbars, you could write an
extension class to provide any extra commands you might need. J
already has an extension class facility that would probably be
adequate for this, and I'll try to make sure that you have whatever
specific infrastructure you might need for the commands themselves.
How does this sound so far?