jextract to write classifies if a directory is specified with -o

Henry Jen henry.jen at oracle.com
Thu Mar 8 08:31:04 UTC 2018


Updated webrev can be found at http://cr.openjdk.java.net/~henryjen/panama/buildClasses.1/webrev/

- added -d option to generate class files
- added —jar to be synonymous for -o
- A little cleanup on -h/-?/—help, they should be synonyms

Cheers,
Henry



> On Mar 7, 2018, at 10:36 AM, Henry Jen <henry.jen at oracle.com> wrote:
> 
> I will add -d.
> 
> We didn’t use -jar because historically, we are generate source files and not jar files. -o for output file is general convention and is what most C compilers has. We can add —jar as long option.
> 
> I don’t like -f, it’s neutral on input and output, reasonable choice for tools like jar, but probably not here.
> 
> Cheers,
> Henry
> 
> 
>> On Mar 7, 2018, at 1:31 AM, Maurizio Cimadamore <maurizio.cimadamore at oracle.com> wrote:
>> 
>> Javac does not support this feature. And, I think if it did, it would safe to assume that it would use a different option than -d, which comes with a significant JavaFileManager baggage. I'd probably see it more as a post-processing step which, after placing your classfiles in the -d folder, it would also generate a jarfile where you want it to be (to mimic how users typically do it by piping multiple shell commands).
>> 
>> On a related point, while javac doesn't have a 'jar' mode, the VM launcher does - and that option is called '-jar'. Any reason as why we can't reuse that name here?
>> 
>> Maurizio
>> 
>> 
>> On 07/03/18 03:42, John Rose wrote:
>>> +1  BTW, can javac emit its results directly to a jar?  If it did,
>>> what would that look like?
>>> 
>>> On Mar 6, 2018, at 8:36 AM, Sundararajan Athijegannathan <sundararajan.athijegannathan at oracle.com> wrote:
>>>> I wonder if we should have -d (for directory) option for directory for output. That would make it consistent with other tools like javac. With -d, we can create directory if it does not exist.
>> 
> 



More information about the panama-dev mailing list