Here is the sample code which shows the difference
(ns clojure.test-clojure.java.io (:use clojure.test clojure.java.io [clojure.test-helper :only [platform-newlines]]) (:import (java.io File BufferedInputStream FileInputStream InputStreamReader InputStream FileOutputStream OutputStreamWriter OutputStream ByteArrayInputStream ByteArrayOutputStream) (java.net URL URI Socket ServerSocket))) (defn temp-file [prefix suffix] (doto (File/createTempFile prefix suffix) (.deleteOnExit))) (let[ f (temp-file "clojure.java.io" "test-reader-writer") ] (println "valid on cygwin and windows" (reader (.getPath (.toURI f))))) (let[ f (temp-file "clojure.java.io" "test-reader-writer") ] (println "valid only on windows" (reader (.toURI f)))) On Nov 22, 11:41 am, Michael Jaaka <michael.ja...@googlemail.com> wrote: > Sorry the line is 46 not 56 in the > filehttps://github.com/richhickey/clojure/blob/master/test/clojure/test_c... > > On Nov 22, 11:39 am, Michael Jaaka <michael.ja...@googlemail.com> > wrote: > > > > > > > > > I have made some investigation and I noticed a problem at line 56 in > > test/clojure/test_clojure/java/io.clj > > > There is a difference between toURL and toURI > > first returns absolute path with spaces, second returns absolute path > > with %20 in places where the spaces should be > > now in cygwin and probably on other shells the %20 is not properly > > interpreted > > so after commenting line > > > (.toURI f) (.toURI f) > > > in tests all works fine > > > I would say that this is a problem in Clojure because it is already > > interpreting file: protocol, so it should also make sure that %20 is > > properly interpreted > > > On Nov 22, 10:15 am, Roberto Mannai <roberm...@gmail.com> wrote: > > > > The classpath option -cp is not handling correctly the spaces. I'd > > > suggest you to not have spaces in the Windows's paths. > > > > Install Java not in "c:\Program Files", but for example in > > > c:\develop\Java6 > > > > On Tue, Nov 22, 2011 at 10:04 AM, Michael Jaaka > > > > <michael.ja...@googlemail.com> wrote: > > > > Here is too a problem with building proper path, after M-x clojure- > > > > jack-in I got in buffer > > > > > Debugger entered--Lisp error: (error "Could not start swank server: > > > > java.lang.NoClassDefFoundError: Files\\Java\\jre6\\lib\\ext\\QTJava/ > > > > zip;\";;test;src;C:\\Java\\/lein\\self-installs\\leiningen-1/6/0- > > > > standalone/jar > > > > Caused by: java.lang.ClassNotFoundException: Files\\Java\\jre6\\lib\ > > > > \ext\\QTJava.zip;\";;test;src;C:\\Java\\.lein\\self-installs\ > > > > \leiningen-1.6.0-standalone.jar > > > > at java.net.URLClassLoader$1.run(URLClassLoader.java:202) > > > > at java.security.AccessController.doPrivileged(Native Method) > > > > at java.net.URLClassLoader.findClass(URLClassLoader.java:190) > > > > at java.lang.ClassLoader.loadClass(ClassLoader.java:306) > > > > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) > > > > at java.lang.ClassLoader.loadClass(ClassLoader.java:247) > > > > Could not find the main class: Files\\Java\\jre6\\lib\\ext\\QTJava.zip; > > > > \";;test;src;C:\\Java\\.lein\\self-installs\\leiningen-1.6.0- > > > > standalone.jar. Program will exit. > > > > Exception in thread \"main\" ") > > > > signal(error ("Could not start swank server: > > > > java.lang.NoClassDefFoundError: Files\\Java\\jre6\\lib\\ext\\QTJava/ > > > > zip;\";;test;src;C:\\Java\\/lein\\self-installs\\leiningen-1/6/0- > > > > standalone/jar\nCaused by: java.lang.ClassNotFoundException: Files\ > > > > \Java\\jre6\\lib\\ext\\QTJava.zip;\";;test;src;C:\\Java\\.lein\\self- > > > > installs\\leiningen-1.6.0-standalone.jar\n at > > > > java.net.URLClassLoader > > > > $1.run(URLClassLoader.java:202)\n at > > > > java.security.AccessController.doPrivileged(Native Method)\n at > > > > java.net.URLClassLoader.findClass(URLClassLoader.java:190)\n at > > > > java.lang.ClassLoader.loadClass(ClassLoader.java:306)\n at > > > > sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)\n at > > > > java.lang.ClassLoader.loadClass(ClassLoader.java:247)\nCould not find > > > > the main class: Files\\Java\\jre6\\lib\\ext\\QTJava.zip;\";;test;src;C: > > > > \\Java\\.lein\\self-installs\\leiningen-1.6.0-standalone.jar. Program > > > > will exit.\nException in thread \"main\" ")) > > > > error("Could not start swank server: %s" > > > > "java.lang.NoClassDefFoundError: Files\\Java\\jre6\\lib\\ext\\QTJava/ > > > > zip;\";;test;src;C:\\Java\\/lein\\self-installs\\leiningen-1/6/0- > > > > standalone/jar\nCaused by: java.lang.ClassNotFoundException: Files\ > > > > \Java\\jre6\\lib\\ext\\QTJava.zip;\";;test;src;C:\\Java\\.lein\\self- > > > > installs\\leiningen-1.6.0-standalone.jar\n at > > > > java.net.URLClassLoader > > > > $1.run(URLClassLoader.java:202)\n at > > > > java.security.AccessController.doPrivileged(Native Method)\n at > > > > java.net.URLClassLoader.findClass(URLClassLoader.java:190)\n at > > > > java.lang.ClassLoader.loadClass(ClassLoader.java:306)\n at > > > > sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)\n at > > > > java.lang.ClassLoader.loadClass(ClassLoader.java:247)\nCould not find > > > > the main class: Files\\Java\\jre6\\lib\\ext\\QTJava.zip;\";;test;src;C: > > > > \\Java\\.lein\\self-installs\\leiningen-1.6.0-standalone.jar. Program > > > > will exit.\nException in thread \"main\" ") > > > > clojure-jack-in-sentinel(#<process swank> "finished\n") > > > > > On Nov 22, 8:55 am, Roberto Mannai <roberm...@gmail.com> wrote: > > > >> If you're having problems with cygwin, you could use Emacs/lein > > > >> without > > > >> it:http://sourceforge.net/apps/wordpress/codesounding/2011/09/29/install... > > > > >> On Tue, Nov 22, 2011 at 8:24 AM, Michael Jaaka > > > > >> <michael.ja...@googlemail.com> wrote: > > > >> > Well, in plugins i had 1.3.3 but in project/dev had 1.2.1 and 1.3.3 > > > >> > so > > > >> > I deleted the 1.2.1. > > > >> > Then tried again to jack-in and got something like this: > > > > >> > error in process filter: Opening input file: no such file or > > > >> > directory, /home/mjaaka/tmp/test-project/src/test_project/C:Documents > > > >> > and Settings^Gmjaaka/.emacs.d/swank/slime-cdf283b4.el > > > > >> > So there is a problem with building absolute path on cygwin (by > > > >> > swank?). > > > > >> > My .emacs.d is located at C:\cygwin\home\mjaaka\.emacs.d and there is > > > >> > no /swank/slime-cdf283b4.el > > > >> > The nearest silme.el is located at > > > >> > C:\cygwin\home\mjaaka\.emacs.d\elpa > > > >> > \slime-20100404.1\slime.el > > > >> > Beside this in elpa I have clojure-mode-1.11.4, clojure-project- > > > >> > mode-1.0, clojurescript-mode-0.5, levenshtein-1.0, project-mode-1.0. > > > > > -- > > > > You received this message because you are subscribed to the Google > > > > Groups "Clojure" group. > > > > To post to this group, send email to clojure@googlegroups.com > > > > Note that posts from new members are moderated - please be patient with > > > > your first post. > > > > To unsubscribe from this group, send email to > > > > clojure+unsubscr...@googlegroups.com > > > > For more options, visit this group at > > > >http://groups.google.com/group/clojure?hl=en -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en