Bug 92024

Summary: "java" wrapper blocks options
Product: [Retired] Red Hat Linux Reporter: Tim Landscheidt <tim>
Component: jdkgcjAssignee: Jakub Jelinek <jakub>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: 9   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-06-02 11:32:31 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Tim Landscheidt 2003-05-31 18:28:57 UTC
The wrapper shell script /usr/bin/java (jdkgcj 0.2.3-5) blocks options 
"intended" for the java application to be executed. Example: 
 
--- start of HelloWorld.java --- 
class HelloWorldApp 
  { 
    public static void main (String [] args) 
      { 
        System.out.print ("Received arguments: "); 
        for (int i = 0; i < args.length; i++) 
          { 
            if (i > 0) 
              System.out.print (", "); 
            System.out.print (args [i]); 
          } 
        System.out.println (); 
      } 
  } 
--- end of HelloWorld.java --- 
 
After compiling: 
 
| [tim@lockfix /var/tmp]$ java -cp HelloWorldApp.class HelloWorldApp 1 2 3 
| Received arguments: 1, 2, 3 
| [tim@lockfix /var/tmp]$ java -cp HelloWorldApp.class HelloWorldApp 1 -2 3 
| Warning: -2 not understood. Ignoring. 
| Received arguments: 1, 3 
 
This is a show stopper for many applications. 
 
 
Suggested fix: 
 
Hmmm. The whole script is FUBAR and needs a complete rewrite :-). *Maybe*: 
When the *first* unknown option (or any other string, such as the class name) 
is encountered, just call 'gij $params "$@"' (BTW, I *really* dislike the 
temporary file idea ... *brrr*). At a glance, javac may have similar problems.

Comment 1 Tim Landscheidt 2003-05-31 20:00:53 UTC
Speaking of show stoppers, I wanted to cross-reference 
<URI:http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7482> at least once in 
Bugzilla :-). 

Comment 2 Jakub Jelinek 2003-06-02 11:32:31 UTC
jdkgcj has been removed from future distributions.