Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6326640

javac /java needs to specify classpath even compile/execute in the current dir on win platform

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P3 P3
    • None
    • 6
    • tools
    • x86
    • windows

      Platforms: WinXP Home, Win2003, WinXP Prof

      On the above platforms, tried to compile a java program
      1. with nightly build 1.6.0-internal-java2d_19_sep_2005_04_11-b00, when compiling, same results with or with out classpath specification:
      -----------------------------------------------------------------------------------------------------
      C:\pit-test\i18n-test\charview>Y:\i18n-dtf\nightly\mustang\windows-i586\bin\javac CharView.java
      Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/tools/javac/Main

      C:\pit-test\i18n-test\charview>Y:\i18n-dtf\nightly\mustang\windows-i586\bin\java -version
      java version "1.6.0-internal"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.6.0-internal-java2d_19_sep_2005_04_11-b00)
      Java HotSpot(TM) Client VM (build 1.6.0-ea-b52, mixed mode)

      This caused our nightly regression suite tests all failed with compilation error:

      http://sqeweb/i18n/nightly-results/mustang/i18n_reg_60-i18n_Reg_WinXP_ja-en-2005-09-20-10-45-41-0709/failed.html
      =========================================================================================

      2. with b52, b51, it compiles, but when execute, it gives following exception, example:
      ------------------------------------------------------------------------------
      C:\pit-test\i18n-test\charview>%JAVA_HOME%\bin\java -version
      java version "1.6.0-ea"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.6.0-ea-b52)
      Java HotSpot(TM) Client VM (build 1.6.0-ea-b52, mixed mode)

      C:\pit-test\i18n-test\charview>rm *.class

      C:\pit-test\i18n-test\charview>%JAVA_HOME%\bin\javac CharView.java
      Note: CharView.java uses or overrides a deprecated API.
      Note: Recompile with -Xlint:deprecation for details.

      C:\pit-test\i18n-test\charview>%JAVA_HOME%\bin\java CharView
      Exception in thread "main" java.lang.NoClassDefFoundError: CharView
      ----------------------------------------------------------------------------
      But if specify the classpath, then it runs fine
      -----
      C:\pit-test\i18n-test\charview>%JAVA_HOME%\bin\java -classpath . CharView
      ---------------------------------------------------------------------------

      Works fine on other platfomrs (Solaris and Linux)
      Thanks to Steven Chan, he also veirifed seeing the same problems.

      ==========================================================================================
      Re-ran the regression suite with promotion b52, the tests compiled and ran fine.
      MAybe the nightly build Windows binaries for some reason got corrupted?
      I'm reassigning the bug to i18n integrater.

            peytoia Yuka Kamiya (Inactive)
            mtiensunw Minchi Tien (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: