Uploaded image for project: 'Code Tools'
  1. Code Tools
  2. CODETOOLS-7900135

jtreg should detect validity of JT_HOME

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • None
    • None
    • tools
    • None

      From Jim Gish:

      I just ran into an issue that took me more time to track down than I would have liked. I had set JT_HOME incorrectly and I got the error message "Cannot determine version of java to run jtreg"

      This lead me to believe that I had not set the java to run properly, when in fact it was a second-level error caused by the fact that JT_HOME/lib/jtreg.jar didn't exist and it thus couldn't load com.sun.javatest.regtest.GetSystemProperty

      If the following lines are inserted in the jtreg script, this would have saved me a lot of time:

      if [ ! -r $JT_HOME/lib/jtreg.jar ];then
         echo "Invalid JT_HOME=$JT_HOME. Cannot find/read $JT_HOME/lib/jtreg.lib"
         exit 1;
      fi

            jjg Jonathan Gibbons
            jjg Jonathan Gibbons
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: