Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-2211

unable to resolve class by directorynames with blanks eg: "Eigene Dateien"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.1-rc-1
    • 1.5
    • None
    • None
    • Windows XP

    Description

      unable to resolve class by directorynames with blanks eg: "Eigene Dateien"

      I make a directory
      C:\Dokumente und Einstellungen\Nagy\Eigene Dateien\BlankTest
      next I create a groovy file

      ------------------------ 8< -------------------------
      //
      //
      // Dieses Skript dient zum Klären des Problems
      // beim aufrufen von Klassen in "Eigene Datein"
      // Es scheint Probleme bei der Verwendung von Blanks
      // in Verzeichnisnamen zu geben
      //
      // .-update-.
      // – wann----wer- was -------------------------------------
      // 01.10.2007 | ny | erstellt

      import pckUtil.ClMyUtil

      def oUtil = new ClMyUtil()
      println oUtil.Any()
      ------------------------ 8< -------------------------

      Afterwards: create directory
      pckUtil
      in this directory I create a testclass ClMyUtil

      ------------------------ 8< -------------------------
      package pckUtil

      // ---- Classe ----------------------------------------------------
      class ClMyUtil {
      // ----------------------------------------------------------------
      //
      // Dies ist eine Klasse um das Problem bei
      // "Eigene Dateien" zu klaeren.
      //
      //
      // .-update-.
      // – wann----wer- was -------------------------------------
      // 01.10.2007 | ny | erstellt
      // | |
      // | |
      // | |

      def Any =

      { return "pong" }

      }
      ------------------------ 8< -------------------------

      Back to Applicationroot
      cd ..

      Now I run with following error:

      $ groovy BlankTest.groovy
      org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed,
      BlankTest.groovy: 15: unable to resolve class pckUtil.ClMyUtil
      @ line 15, column 1.
      import pckUtil.ClMyUtil
      ^

      1 error

      When I copy this application to eg. "c:\temp" its run trouble-free

      ------------------------ 8< -------------------------
      $ cd
      C:\temp\BlankTest

      $ groovy BlankTest.groovy
      pong
      ------------------------ 8< -------------------------
      Strange!

      In "Eigene Dateien" I used a old trick from MS-DOS

      subst M: "%cd%"
      M:
      groovy BlankTest.groovy

      this run also ok.

      I assume this problems is hidden by blanks in directoryname.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              wnagy Wilhelm Nagy
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: