Jre -D option does not support spaces.

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P3
    • None
    • Affects Version/s: 1.1.4
    • Component/s: hotspot
    • None
    • sparc
    • solaris_2.5.1



      Name: diC59631 Date: 10/15/97


      Under JDK1.1.4 the following line will start my program:

      /usr/local/java1.1/bin/java -DLprCmd="/usr/bin/lp -d%P% %O% -c %F%" -DCparRoot=${CPARROOT} -DTmpRoot=${HOME} -DMailList=${MAILLIST} -DMailSubject="CIT Report" -DPopServer=${POPSERVER} citMain

      Changing this to use JRE as follows:

      /usr/local/java1.1rt/bin/jre -DLprCmd="/usr/bin/lp -d%P% %O% -c %F%" -DCparRoot=${CPARROOT} -DTmpRoot=${HOME} -DMailList=${MAILLIST} -DMailSubject="CIT Report" -DPopServer=${POPSERVER} citMain

      I get a message saying %O% class not found. It seems like jre does not like
      spaces in the -D even though they are surrounded by "". I tried
      to even quote the spaces and still did not work. I tried placing the
      quotes everywhere I could think of. After replacing those spaces with
      '_' (Knowing that it would no longer work), it just proceeded down the
      command line telling me the 'Report' class was not found. Another space
      in a '-D'.

      (All env. are defined in the shell script that starts the program.)

      Full Shell script.

      *****************************
      #!/bin/sh
       
      umask 002
      WELDROOT=/cae/welding
      CPARROOT=/cae/welding/cit
      POPSERVER=skynet.medar.com
      MAILLIST=cpar
      export WELDROOT CPARROOT MAILLIST
       
      cd ${WELDROOT}/lib/cit1.1
       
      /usr/local/java1.1/bin/java -DLprCmd="/usr/bin/lp -d%P% %O% -c %F%" -DCparRoot=${CPARROOT} -DTmpRoot=${HOME} -DMailList=${MAILLIST} -DMailSubject="CIT Report" -DPopServer=${POPSERVER} citMain
       
      ********************************

      This was updated from a JDK1.02 where their were no
      printing api, so I envented my own printing class, which requires
      the command string to go out to the printer.
      ======================================================================

            Assignee:
            David Connelly (Inactive)
            Reporter:
            Daniel Indrigo (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: