Subject: Re: Java exec recognition
To: None <current-users@NetBSD.ORG>
From: Simon J. Gerraty <>
List: current-users
Date: 11/03/1997 00:01:19
> > Maybe what's needed is a generic run-this-program-on-files-with-
> > this-magic-number facility.

>Yes, it seems like this is a natural extension of EXEC_SCRIPT.  I could
>see possibly changing the EXEC_SCRIPT code to do the following:

Yes, very cool.  

I'm not sure how useful direct exec'ing of java classes would be though.

Almost every class I've written has a main() function - handy for
unit testing, so joe user trying foo.class may be invoking something that
is not the correct entry point for the utility he's after.

Given java's lack of getenv() and a standard location for properties etc
you generally need to invoke non-trivial java apps via a script to
ensure all the args are correct.

Add to that the fact that Sun recommend folk not use the anonymous package
for shipped apps etc, one usually needs to run:


Direct exec'ing of java classes would really only work for trivial apps.

But if its easy to setup I guess it can't hurt.

Simon J. Gerraty        <>

#include <disclaimer>   /* imagine something _very_ witty here */