Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.1-rc-1
-
Fix Version/s: 1.5
-
Component/s: None
-
Labels:None
-
Environment: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.
Issue Links
- duplicates
-
GROOVY-1659
Compiler cant find groovy scripts in same directory if path (on windows) has a space
-
- relates to
-
GROOVY-2260
Wrong install : Exception in thread "Main Thread" java.lang.NoClassDefFoundError: Files\Groovy
-
I tested with 1.1-final-SNAPSHOT (jdk 1.6.0_03, winxp) with the following setup
---- Caller.groovy -----
import inner.Util
def util = new Util()
println util.any()
----------------------------
----Util.groovy --------
package inner
class Util {
def any() { "any" }
}
--------------------------
then on C:\tmp\bug2271 I copied Caller.groovy and C:\tmp\bug2771\inner Util.groovy
c:\tmp\bug2271> groovy Caller.groovy
any
then on "C:\tmp\bug 2271" I copied Caller.groovy and "C:\tmp\bug 2771\inner" Util.groovy
c:\tmp\bug 2271> groovy Caller.groovy
any
Can you please check again with your setup to see if the problem persists?