Bug 92024 - "java" wrapper blocks options
"java" wrapper blocks options
Status: CLOSED NEXTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: jdkgcj (Show other bugs)
9
All Linux
high Severity high
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-05-31 14:28 EDT by Tim Landscheidt
Modified: 2005-10-31 17:00 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-06-02 07:32:31 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Tim Landscheidt 2003-05-31 14:28:57 EDT
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 16:00:53 EDT
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 07:32:31 EDT
jdkgcj has been removed from future distributions.

Note You need to log in before you can comment on or make changes to this bug.