Some command-line arguments fail when read from file.

Issue #305 resolved
Noric Couderc
created an issue

ExtendJ 8.1.1 Java SE 8

The command-line argument -XDuseUnsharedTable=true is not accepted when read from an argument file (providing the arg @<filename>.txt), but it is when given from the command line.

Expected result: probably ignoring the argument, since it is a performance-related argument that is probably not that relevant for extendj.

Actual result:

Exception in thread "main" java.lang.Error: Command line argument error: option -XDuseUnsharedTable=true is not defined
at org.extendj.ast.Options.addOptions(Options.java:137)
at org.extendj.ast.Frontend.processArgs(Frontend.java:316)
at org.extendj.JavaCompiler.processArgs(JavaCompiler.java:169)
at org.extendj.ast.Frontend.run(Frontend.java:133)
at org.extendj.JavaCompiler.run(JavaCompiler.java:101)
at org.extendj.ExtensionMain.main(ExtensionMain.java:10)

Comments (3)

  1. Jesper Öqvist

    I get identical behavior when I call ExtendJ with -XDuseUnsharedTable=true on the command line and in an argument file:

    Σ 14:40:04 ~/git/extendj $ java -jar extendj.jar -version             
    ExtendJ 8.1.1-30-g64560eb3 Java SE 8                                  
    Σ 14:40:33 ~/git/extendj $ java -jar extendj.jar -XDuseUnsharedTable=true                                                                    
    Exception in thread "main" java.lang.Error: Command line argument error: option -XDuseUnsharedTable=true is not defined                      
            at org.extendj.ast.Options.addOptions(Options.java:138)       
            at org.extendj.ast.Frontend.processArgs(Frontend.java:416)    
            at org.extendj.JavaCompiler.processArgs(JavaCompiler.java:169)                                                                       
            at org.extendj.ast.Frontend.run(Frontend.java:147)            
            at org.extendj.JavaCompiler.run(JavaCompiler.java:101)        
            at org.extendj.JavaCompiler.main(JavaCompiler.java:61)        
            at org.jastadd.extendj.JavaCompiler.main(JavaCompiler.java:39)                                                                       
    Σ 14:40:41 ~/git/extendj $ echo "!$" > args && java -jar extendj.jar @args                                                                   
    echo "-XDuseUnsharedTable=true" > args && java -jar extendj.jar @args 
    Exception in thread "main" java.lang.Error: Command line argument error: option -XDuseUnsharedTable=true is not defined                      
            at org.extendj.ast.Options.addOptions(Options.java:138)       
            at org.extendj.ast.Frontend.processArgs(Frontend.java:416)    
            at org.extendj.JavaCompiler.processArgs(JavaCompiler.java:169)                                                                       
            at org.extendj.ast.Frontend.run(Frontend.java:147)            
            at org.extendj.JavaCompiler.run(JavaCompiler.java:101)        
            at org.extendj.JavaCompiler.main(JavaCompiler.java:61)        
            at org.jastadd.extendj.JavaCompiler.main(JavaCompiler.java:39)
    
  2. Log in to comment