Re: clojure box: Problem with classpath (noob question)

2010-05-01 Thread Rainer
Hello Shawn,

thank you for help. Yes, I am using Clojure Box 1.1.0. I changed
my .emacs-file to:

(setq swank-clojure-classpaths
(list c:/Clojure))

I still get the same error. Since I am a total emacs newbie, I might
be making a stupid mistake that might not be obvious to advanced
users.

Anything else I could try?



On 30 Apr., 19:27, Shawn Hoover shawn.hoo...@gmail.com wrote:
 On Thu, Apr 29, 2010 at 6:58 PM, Rainer wolf.rai...@gmail.com wrote:
  Hello,

  I'm stuck with Programming Clojure on page 37 on a Windows 7
  machine. After downloading the examples dir into C:/clojure, I
  typed:

  user (require 'examples.introduction)

  and I got

  ; Evaluation aborted.

  java.io.FileNotFoundException: Could not locate examples/
  introduction__init.class or examples/introduction.clj on classpath:
  (NO_SOURCE_FILE:0)

  My .emacs file looks like this:

  (setq swank-clojure-extra-classpaths
                 (list C:/Clojure))

 I'm not sure what version of Clojure Box you have, but in 1.1 you should set
 swank-clojure-classpath, not swank-clojure-extra-classpaths.

 Shawn

 --
 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 
 athttp://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


clojure box: Problem with classpath (noob question)

2010-04-30 Thread Rainer
Hello,

I'm stuck with Programming Clojure on page 37 on a Windows 7
machine. After downloading the examples dir into C:/clojure, I
typed:

user (require 'examples.introduction)

and I got

; Evaluation aborted.

java.io.FileNotFoundException: Could not locate examples/
introduction__init.class or examples/introduction.clj on classpath:
(NO_SOURCE_FILE:0)

My .emacs file looks like this:

(setq swank-clojure-extra-classpaths
(list C:/Clojure))

The files in C:/Clojure are there (I triplechecked)

Any help will be appreciated.

-- 
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


Fwd: clojure box: Problem with classpath (noob question)

2010-04-30 Thread Rainer Wolf
Hello,

yesterday, I sent my noob question about the classpath to the group. So far,
my message has not shown up yet. Could you please post my message to the
Clojure group? Thank you in advance.

Kind regards,

Rainer Wolf

-- Forwarded message --
From: Rainer wolf.rai...@gmail.com
Date: Fri, Apr 30, 2010 at 12:58 AM
Subject: clojure box: Problem with classpath (noob question)
To: Clojure clojure@googlegroups.com


Hello,

I'm stuck with Programming Clojure on page 37 on a Windows 7
machine. After downloading the examples dir into C:/clojure, I
typed:

user (require 'examples.introduction)

and I got

; Evaluation aborted.

java.io.FileNotFoundException: Could not locate examples/
introduction__init.class or examples/introduction.clj on classpath:
(NO_SOURCE_FILE:0)

My .emacs file looks like this:

(setq swank-clojure-extra-classpaths
   (list C:/Clojure))

The files in C:/Clojure are there (I triplechecked)

Any help will be appreciated.




-- 
Rainer Wolf

-- 
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

Re: clojure box: Problem with classpath (noob question)

2010-04-30 Thread Shawn Hoover
On Thu, Apr 29, 2010 at 6:58 PM, Rainer wolf.rai...@gmail.com wrote:

 Hello,

 I'm stuck with Programming Clojure on page 37 on a Windows 7
 machine. After downloading the examples dir into C:/clojure, I
 typed:

 user (require 'examples.introduction)

 and I got

 ; Evaluation aborted.

 java.io.FileNotFoundException: Could not locate examples/
 introduction__init.class or examples/introduction.clj on classpath:
 (NO_SOURCE_FILE:0)

 My .emacs file looks like this:

 (setq swank-clojure-extra-classpaths
(list C:/Clojure))


I'm not sure what version of Clojure Box you have, but in 1.1 you should set
swank-clojure-classpath, not swank-clojure-extra-classpaths.

Shawn

-- 
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

Re: Problem with CLASSPATH

2009-04-20 Thread Adam Blinkinsop

On Apr 5, 1:32 pm, dlb d...@davidlballenger.com wrote:
 I have the same problem on my Mac as well, i.e. if clojure.jar is
 loaded from ~/Library/Java/Extensions rather than from the classpath,
 then clojure does not find files on the classpath.  I did some poking
 around and on my Mac OS X 10.5.6 with Java 6.
 ...

It seems like this is something that could be easily fixed during the
installation process.  That is, installing Clojure should create a set
of scripts, clj and cljc that start up the repl (or load a script,
as in the Wiki) and compile Clojure programs, respectively.  The
Clojure jars could be in some central location (say, /usr/lib/clojure
on a standard *nix system), and these scripts would get all the jars 
classes from there into the classpath somehow.

This way, people new to the system could download, do some make 
make install or ant install (?) process, and have an immediately
working system with little to no effort.  Does this sound like it
would be desired and/or useful?

--~--~-~--~~~---~--~~
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
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
-~--~~~~--~~--~--~---



Re: Problem with CLASSPATH

2009-04-05 Thread dlb


I have the same problem on my Mac as well, i.e. if clojure.jar is
loaded from ~/Library/Java/Extensions rather than from the classpath,
then clojure does not find files on the classpath.  I did some poking
around and on my Mac OS X 10.5.6 with Java 6.

When I start clojure with clojure.jar only on the CLASSPATH, then the
parent CassLoader of the DynamicClassLoader returned by
clojure.lang.RT.baseLoader() and/or clojure.lang.RT.getRootClassLoader
() is a sun.misc.Launcher$AppClassLoader.  That in turn has a parent
of class sun.misc.Launcher$ExtClassLoader.

When I move clojure.jar to ~/Library/Java/Extensions and restart, then
the parent CassLoader of the DynamicClassLoader is a sun.misc.Launcher
$ExtClassLoader. Its parent is nil. Since the ExtClassLoader handles
loading from extension directories and not from the CLASSPATH as
AppClassLoader does, that would explain why the files aren't being
found on the CLASSPATH in this case.

You can see the differences by using the following in the REPL:

With clojure.jar from the CLASSPATH:

Clojure
user= (. (clojure.lang.RT/baseLoader) getParent)
#AppClassLoader sun.misc.launcher$appclassloa...@e47858e
user= ^D

With clojure.jar from an extensions directory:

Clojure
user= (. (clojure.lang.RT/baseLoader) getParent)
#ExtClassLoader sun.misc.launcher$extclassloa...@cc7ad6
user= ^D

Same results if getRootClassLoader is used instead of baseLoader.

Don't know if this is Mac-specifc behavior or not.

   - David

On Mar 24, 3:36 pm, Rich rwml...@gmail.com wrote:
 I think I figured it out.

 If I install clojure.jar into /Library/Java/Extensions/ (the ext
 directory on Macs) then it won't work. Even if I use java -cp ... to
 point to a different clojure.jar. Simply having the jar in that folder
 breaks things.

 Once I deleted it from /Library/Java/Extensions, I could manually set
 the class path using java -cp and things worked fine again.

 So, at least I have a good work around. But does anyone know why
 placing the jars in the ext directory no longer works? It was my
 understanding that this was the recommended way to install Jars. Does
 placing them in the java.ext.dirs on other systems also cause
 problems? Or is this just a Mac thing?

 Thanks everyone for your help.

 -Rich-



--~--~-~--~~~---~--~~
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
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
-~--~~~~--~~--~--~---



Re: Problem with CLASSPATH

2009-03-24 Thread Rich

Has anyone gotten 20090320 to work on a new MacBook Pro running
Leopard?

With further investigation, it looks like any call to (use...) either
explicitly or as part of an (ns...) function call causes clojure to
crash since the upgrade. I've fiddled around with the class path, and
nothing seems to work.

Interestingly enough, my Structure.clj file sets the namespace, but
doesn't use any other files. So, I can launch it from the command line
like this:

java clojure.lang.Script Structure.clj

And I don't get any errors.

When I open up the REPL, however and try (use 'Structure), It crashes.

I would go back to the older version, but I cannot get duck-streams
from clojure.contrib to work on that version. Clojure.contrib seems to
build without errors, but it just doesn't work.

Previously, I'd built both clojure and clojure.contrib from source,
and everything worked fine. However, I have no clue which revision
that was, so I don't know how to go back to that version. So, I'm
stuck between two non-working versions. Which is frustrating, because
I'm in the middle of a project, and I need to get things moving again
quickly.

Any help or advice would be greatly appreciated.

-Rich-

On Mar 23, 11:12 am, Rich rwml...@gmail.com wrote:
 Let me clarify my last post. In both cases, the directory was on the
 class path (either implicitly as ., or explicitly given the absolute
 path).

 However, in both cases I got the same FileNotFound exception.

 -Rich-

 On Mar 23, 6:39 am, Rich rwml...@gmail.com wrote:

  . should be set by default. I verified that it was set using (.
  System getProperties). I also tried explicitly setting the absolute
  path using -cp. No luck on either count.

  -Rich-

  On Mar 23, 5:14 am, revoltingdevelopment

  christopher.jay.jo...@gmail.com wrote:
   I also had the NO_SOURCE_FILE error when using contrib packages, upon
   upgrade to 20090320.  My CLASSPATH included ..  I had to revert to
   starting clojure with an explicit -cp.  I'm new to both Java and
   Clojure, but this led me to think my CLASSPATH was being ignored.  I
   chalked it up to my misunderstanding or not really keeping track of
   how I had things set up before, but it seemed different.

   On Mar 23, 9:24 am, Mark Volkmann r.mark.volkm...@gmail.com wrote:

On Mon, Mar 23, 2009 at 7:34 AM, Rich rwml...@gmail.com wrote:

 Structure.clj does call ns as shown below:

 (ns Structure)

 So, as far as I can tell, Clojure should look for Structure.clj in the
 class path. At least, that's what it used to do. I guess I could move
 all the code into a sub-directory, and rename all the namespaces--but
 I'd rather keep it organized the way it is, if possible.

Do you have . or the current directory in CLASSPATH?

 On Mar 23, 1:33 am, Mark Volkmann r.mark.volkm...@gmail.com wrote:
 On Mon, Mar 23, 2009 at 4:59 AM, Rich rwml...@gmail.com wrote:

  Hi,

  I'd been using the 20081217 release. The following code worked, as
  long as Structure was in the working directory:

  Clojure
  user= (use 'Structure)
  nil

  However, after I updated to 20090320, I get the following errors:

  Clojure
  user= (use 'Structure)
  java.io.FileNotFoundException: Could not locate 
  Structure__init.class
  or Structure.clj on classpath:  (NO_SOURCE_FILE:0)

  In both cases, I'm launching Clojure from the directory that 
  contains
  Structure.clj as follows:

  java clojure.lang.Repl

  What am I doing wrong?

 Does Structure.clj contain a call to the ns macro? If so, I think you
 need to move Structure.clj to a subdirectory that matches its
 namespace. For example, if the namespace is a.b.c then you need a
 directory in the classpath that contains an a directory that
 contains a b directory that conains c.clj, not Structure.clj.

--
R. Mark Volkmann
Object Computing, Inc.
--~--~-~--~~~---~--~~
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
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
-~--~~~~--~~--~--~---



Re: Problem with CLASSPATH

2009-03-24 Thread David Nolen
The latest version of Clojure incorporated lazy sequences which broke many
libraries early on.  Most of these problems have been worked out. In my
experience you should use the cutting edge version of everything including
SLIME.  I clone everything from GitHub (clojure, clojure-contrib,
swank-clojure, clojure-mode, slime).  This has worked for me for the past 6
months with very few problems (except the original transition to lazy
sequences).

On Tue, Mar 24, 2009 at 5:03 AM, Rich rwml...@gmail.com wrote:


 Has anyone gotten 20090320 to work on a new MacBook Pro running
 Leopard?

 With further investigation, it looks like any call to (use...) either
 explicitly or as part of an (ns...) function call causes clojure to
 crash since the upgrade. I've fiddled around with the class path, and
 nothing seems to work.

 Interestingly enough, my Structure.clj file sets the namespace, but
 doesn't use any other files. So, I can launch it from the command line
 like this:

 java clojure.lang.Script Structure.clj

 And I don't get any errors.

 When I open up the REPL, however and try (use 'Structure), It crashes.

 I would go back to the older version, but I cannot get duck-streams
 from clojure.contrib to work on that version. Clojure.contrib seems to
 build without errors, but it just doesn't work.

 Previously, I'd built both clojure and clojure.contrib from source,
 and everything worked fine. However, I have no clue which revision
 that was, so I don't know how to go back to that version. So, I'm
 stuck between two non-working versions. Which is frustrating, because
 I'm in the middle of a project, and I need to get things moving again
 quickly.

 Any help or advice would be greatly appreciated.

 -Rich-

 On Mar 23, 11:12 am, Rich rwml...@gmail.com wrote:
  Let me clarify my last post. In both cases, the directory was on the
  class path (either implicitly as ., or explicitly given the absolute
  path).
 
  However, in both cases I got the same FileNotFound exception.
 
  -Rich-
 
  On Mar 23, 6:39 am, Rich rwml...@gmail.com wrote:
 
   . should be set by default. I verified that it was set using (.
   System getProperties). I also tried explicitly setting the absolute
   path using -cp. No luck on either count.
 
   -Rich-
 
   On Mar 23, 5:14 am, revoltingdevelopment
 
   christopher.jay.jo...@gmail.com wrote:
I also had the NO_SOURCE_FILE error when using contrib packages, upon
upgrade to 20090320.  My CLASSPATH included ..  I had to revert to
starting clojure with an explicit -cp.  I'm new to both Java and
Clojure, but this led me to think my CLASSPATH was being ignored.  I
chalked it up to my misunderstanding or not really keeping track of
how I had things set up before, but it seemed different.
 
On Mar 23, 9:24 am, Mark Volkmann r.mark.volkm...@gmail.com wrote:
 
 On Mon, Mar 23, 2009 at 7:34 AM, Rich rwml...@gmail.com wrote:
 
  Structure.clj does call ns as shown below:
 
  (ns Structure)
 
  So, as far as I can tell, Clojure should look for Structure.clj
 in the
  class path. At least, that's what it used to do. I guess I could
 move
  all the code into a sub-directory, and rename all the
 namespaces--but
  I'd rather keep it organized the way it is, if possible.
 
 Do you have . or the current directory in CLASSPATH?
 
  On Mar 23, 1:33 am, Mark Volkmann r.mark.volkm...@gmail.com
 wrote:
  On Mon, Mar 23, 2009 at 4:59 AM, Rich rwml...@gmail.com
 wrote:
 
   Hi,
 
   I'd been using the 20081217 release. The following code
 worked, as
   long as Structure was in the working directory:
 
   Clojure
   user= (use 'Structure)
   nil
 
   However, after I updated to 20090320, I get the following
 errors:
 
   Clojure
   user= (use 'Structure)
   java.io.FileNotFoundException: Could not locate
 Structure__init.class
   or Structure.clj on classpath:  (NO_SOURCE_FILE:0)
 
   In both cases, I'm launching Clojure from the directory that
 contains
   Structure.clj as follows:
 
   java clojure.lang.Repl
 
   What am I doing wrong?
 
  Does Structure.clj contain a call to the ns macro? If so, I
 think you
  need to move Structure.clj to a subdirectory that matches its
  namespace. For example, if the namespace is a.b.c then you need
 a
  directory in the classpath that contains an a directory that
  contains a b directory that conains c.clj, not
 Structure.clj.
 
 --
 R. Mark Volkmann
 Object Computing, Inc.
 


--~--~-~--~~~---~--~~
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
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
-~--~~~~--~~--~--~---



Re: Problem with CLASSPATH

2009-03-24 Thread Stephen C. Gilardi


On Mar 24, 2009, at 5:03 AM, Rich wrote:


Has anyone gotten 20090320 to work on a new MacBook Pro running
Leopard?


I tried it just now and it worked for me. Here's the test I did:

- Download 20090320 zip file
- Expand it into dir
	- create a file in dir called Structure.clj with contents: (ns  
Structure)

- cd to dir
- launch clojure with java -cp clojure.jar:. clojure.main
- at the prompt issue (use 'Structure)
- receive the response nil

I'm using java 1.6 on a 64-bit capable (Core2 Duo based) MacBook Pro.

Does that same test fail on your machine?

One thing to note is that namespace names should always have at least  
one period in them. I believe this is due to a rule regarding Java  
packages. At some point the clojure namespace became clojure.core  
for this reason. I haven't had a problem with such top level  
namespace names on my machine locally, but they're not officially  
supported.


--Steve



smime.p7s
Description: S/MIME cryptographic signature


Re: Problem with CLASSPATH

2009-03-24 Thread Mark Volkmann

On Tue, Mar 24, 2009 at 9:44 AM, Stephen C. Gilardi squee...@mac.com wrote:

 One thing to note is that namespace names should always have at least one
 period in them. I believe this is due to a rule regarding Java packages. At
 some point the clojure namespace became clojure.core for this reason. I
 haven't had a problem with such top level namespace names on my machine
 locally, but they're not officially supported.

I hadn't run across that rule before. I guess the user namespace is
an exception. That should be mentioned at
http://clojure.org/namespaces. Where did you find that?

-- 
R. Mark Volkmann
Object Computing, Inc.

--~--~-~--~~~---~--~~
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
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
-~--~~~~--~~--~--~---



Re: Problem with CLASSPATH

2009-03-24 Thread Mark Volkmann

On Tue, Mar 24, 2009 at 9:44 AM, Stephen C. Gilardi squee...@mac.com wrote:

 One thing to note is that namespace names should always have at least one
 period in them. I believe this is due to a rule regarding Java packages. At
 some point the clojure namespace became clojure.core for this reason. I
 haven't had a problem with such top level namespace names on my machine
 locally, but they're not officially supported.

I hadn't run across that rule before. I guess the user namespace is
an exception. That should be mentioned at
http://clojure.org/namespaces. Where did you find that?

-- 
R. Mark Volkmann
Object Computing, Inc.

--~--~-~--~~~---~--~~
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
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
-~--~~~~--~~--~--~---



Re: Problem with CLASSPATH

2009-03-24 Thread Stephen C. Gilardi

On Mar 24, 2009, at 10:49 AM, Mark Volkmann wrote:
On Tue, Mar 24, 2009 at 9:44 AM, Stephen C. Gilardi  
squee...@mac.com wrote:


One thing to note is that namespace names should always have at  
least one
period in them. I believe this is due to a rule regarding Java  
packages. At
some point the clojure namespace became clojure.core for this  
reason. I
haven't had a problem with such top level namespace names on my  
machine

locally, but they're not officially supported.


I hadn't run across that rule before. I guess the user namespace is
an exception. That should be mentioned at
http://clojure.org/namespaces. Where did you find that?


It turns out not to be a Java package name rule, but a consequence of  
how Clojure maps namespaces into Java. A Clojure namespace maps to a  
Java class. If the namespace has only one component in its name, the  
class that implements it will be not be in any package. It's classes  
at the top level (outside of any package) that may cause a problem.


Rich's description here:

http://groups.google.com/group/clojure/msg/58e3f8e5dfb876c9

includes:


The main structural change related to AOT is that the mapping between
a Clojure namespace and a Java package has changed. Where it was ns
maps to package:

my.fancy.lib == my/fancy/lib/lib.clj

it is now ns maps to class:

my.fancy.lib == my/fancy/lib.clj, when compiled, my/fancy/lib.class

Just lift your files up a directory to accommodate this change. Note
that this implies that all namespaces should have at least 2 segments,
and following the Java package name guidelines, e.g.
com.mydomain.mylib, is recommended.

Accordingly, the clojure ns has been renamed clojure.core. Any
explicitly qualified references will need to be changed. boot.clj has
been renamed core.clj.


He uses the word should there and that's consistent with it working  
OK in some cases, but it's a guideline that we should encourage and  
follow.


I agree this should be mentioned on the namespaces page at clojure.org.

--Steve



smime.p7s
Description: S/MIME cryptographic signature


Re: Problem with CLASSPATH

2009-03-24 Thread Rich

I think I figured it out.

If I install clojure.jar into /Library/Java/Extensions/ (the ext
directory on Macs) then it won't work. Even if I use java -cp ... to
point to a different clojure.jar. Simply having the jar in that folder
breaks things.

Once I deleted it from /Library/Java/Extensions, I could manually set
the class path using java -cp and things worked fine again.

So, at least I have a good work around. But does anyone know why
placing the jars in the ext directory no longer works? It was my
understanding that this was the recommended way to install Jars. Does
placing them in the java.ext.dirs on other systems also cause
problems? Or is this just a Mac thing?

Thanks everyone for your help.

-Rich-

On Mar 24, 5:19 am, Stephen C. Gilardi squee...@mac.com wrote:
 On Mar 24, 2009, at 10:49 AM, Mark Volkmann wrote:



  On Tue, Mar 24, 2009 at 9:44 AM, Stephen C. Gilardi  
  squee...@mac.com wrote:

  One thing to note is that namespace names should always have at  
  least one
  period in them. I believe this is due to a rule regarding Java  
  packages. At
  some point the clojure namespace became clojure.core for this  
  reason. I
  haven't had a problem with such top level namespace names on my  
  machine
  locally, but they're not officially supported.

  I hadn't run across that rule before. I guess the user namespace is
  an exception. That should be mentioned at
 http://clojure.org/namespaces. Where did you find that?

 It turns out not to be a Java package name rule, but a consequence of  
 how Clojure maps namespaces into Java. A Clojure namespace maps to a  
 Java class. If the namespace has only one component in its name, the  
 class that implements it will be not be in any package. It's classes  
 at the top level (outside of any package) that may cause a problem.

 Rich's description here:

        http://groups.google.com/group/clojure/msg/58e3f8e5dfb876c9

 includes:



  The main structural change related to AOT is that the mapping between
  a Clojure namespace and a Java package has changed. Where it was ns
  maps to package:

  my.fancy.lib == my/fancy/lib/lib.clj

  it is now ns maps to class:

  my.fancy.lib == my/fancy/lib.clj, when compiled, my/fancy/lib.class

  Just lift your files up a directory to accommodate this change. Note
  that this implies that all namespaces should have at least 2 segments,
  and following the Java package name guidelines, e.g.
  com.mydomain.mylib, is recommended.

  Accordingly, the clojure ns has been renamed clojure.core. Any
  explicitly qualified references will need to be changed. boot.clj has
  been renamed core.clj.

 He uses the word should there and that's consistent with it working  
 OK in some cases, but it's a guideline that we should encourage and  
 follow.

 I agree this should be mentioned on the namespaces page at clojure.org.

 --Steve

  smime.p7s
 3KViewDownload
--~--~-~--~~~---~--~~
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
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
-~--~~~~--~~--~--~---



Problem with CLASSPATH

2009-03-23 Thread Rich

Hi,

I'd been using the 20081217 release. The following code worked, as
long as Structure was in the working directory:

Clojure
user= (use 'Structure)
nil

However, after I updated to 20090320, I get the following errors:

Clojure
user= (use 'Structure)
java.io.FileNotFoundException: Could not locate Structure__init.class
or Structure.clj on classpath:  (NO_SOURCE_FILE:0)

In both cases, I'm launching Clojure from the directory that contains
Structure.clj as follows:

java clojure.lang.Repl

What am I doing wrong?

-Rich-
--~--~-~--~~~---~--~~
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
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
-~--~~~~--~~--~--~---



Re: Problem with CLASSPATH

2009-03-23 Thread Mark Volkmann

On Mon, Mar 23, 2009 at 4:59 AM, Rich rwml...@gmail.com wrote:

 Hi,

 I'd been using the 20081217 release. The following code worked, as
 long as Structure was in the working directory:

 Clojure
 user= (use 'Structure)
 nil

 However, after I updated to 20090320, I get the following errors:

 Clojure
 user= (use 'Structure)
 java.io.FileNotFoundException: Could not locate Structure__init.class
 or Structure.clj on classpath:  (NO_SOURCE_FILE:0)

 In both cases, I'm launching Clojure from the directory that contains
 Structure.clj as follows:

 java clojure.lang.Repl

 What am I doing wrong?

Does Structure.clj contain a call to the ns macro? If so, I think you
need to move Structure.clj to a subdirectory that matches its
namespace. For example, if the namespace is a.b.c then you need a
directory in the classpath that contains an a directory that
contains a b directory that conains c.clj, not Structure.clj.

-- 
R. Mark Volkmann
Object Computing, Inc.

--~--~-~--~~~---~--~~
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
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
-~--~~~~--~~--~--~---



Re: Problem with CLASSPATH

2009-03-23 Thread Rich

Structure.clj does call ns as shown below:

(ns Structure)

So, as far as I can tell, Clojure should look for Structure.clj in the
class path. At least, that's what it used to do. I guess I could move
all the code into a sub-directory, and rename all the namespaces--but
I'd rather keep it organized the way it is, if possible.

-Rich-

On Mar 23, 1:33 am, Mark Volkmann r.mark.volkm...@gmail.com wrote:
 On Mon, Mar 23, 2009 at 4:59 AM, Rich rwml...@gmail.com wrote:

  Hi,

  I'd been using the 20081217 release. The following code worked, as
  long as Structure was in the working directory:

  Clojure
  user= (use 'Structure)
  nil

  However, after I updated to 20090320, I get the following errors:

  Clojure
  user= (use 'Structure)
  java.io.FileNotFoundException: Could not locate Structure__init.class
  or Structure.clj on classpath:  (NO_SOURCE_FILE:0)

  In both cases, I'm launching Clojure from the directory that contains
  Structure.clj as follows:

  java clojure.lang.Repl

  What am I doing wrong?

 Does Structure.clj contain a call to the ns macro? If so, I think you
 need to move Structure.clj to a subdirectory that matches its
 namespace. For example, if the namespace is a.b.c then you need a
 directory in the classpath that contains an a directory that
 contains a b directory that conains c.clj, not Structure.clj.

 --
 R. Mark Volkmann
 Object Computing, Inc.
--~--~-~--~~~---~--~~
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
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
-~--~~~~--~~--~--~---



Re: Problem with CLASSPATH

2009-03-23 Thread Mark Volkmann

On Mon, Mar 23, 2009 at 7:34 AM, Rich rwml...@gmail.com wrote:

 Structure.clj does call ns as shown below:

 (ns Structure)

 So, as far as I can tell, Clojure should look for Structure.clj in the
 class path. At least, that's what it used to do. I guess I could move
 all the code into a sub-directory, and rename all the namespaces--but
 I'd rather keep it organized the way it is, if possible.

Do you have . or the current directory in CLASSPATH?

 On Mar 23, 1:33 am, Mark Volkmann r.mark.volkm...@gmail.com wrote:
 On Mon, Mar 23, 2009 at 4:59 AM, Rich rwml...@gmail.com wrote:

  Hi,

  I'd been using the 20081217 release. The following code worked, as
  long as Structure was in the working directory:

  Clojure
  user= (use 'Structure)
  nil

  However, after I updated to 20090320, I get the following errors:

  Clojure
  user= (use 'Structure)
  java.io.FileNotFoundException: Could not locate Structure__init.class
  or Structure.clj on classpath:  (NO_SOURCE_FILE:0)

  In both cases, I'm launching Clojure from the directory that contains
  Structure.clj as follows:

  java clojure.lang.Repl

  What am I doing wrong?

 Does Structure.clj contain a call to the ns macro? If so, I think you
 need to move Structure.clj to a subdirectory that matches its
 namespace. For example, if the namespace is a.b.c then you need a
 directory in the classpath that contains an a directory that
 contains a b directory that conains c.clj, not Structure.clj.

-- 
R. Mark Volkmann
Object Computing, Inc.

--~--~-~--~~~---~--~~
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
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
-~--~~~~--~~--~--~---



Re: Problem with CLASSPATH

2009-03-23 Thread revoltingdevelopment

I also had the NO_SOURCE_FILE error when using contrib packages, upon
upgrade to 20090320.  My CLASSPATH included ..  I had to revert to
starting clojure with an explicit -cp.  I'm new to both Java and
Clojure, but this led me to think my CLASSPATH was being ignored.  I
chalked it up to my misunderstanding or not really keeping track of
how I had things set up before, but it seemed different.

On Mar 23, 9:24 am, Mark Volkmann r.mark.volkm...@gmail.com wrote:
 On Mon, Mar 23, 2009 at 7:34 AM, Rich rwml...@gmail.com wrote:

  Structure.clj does call ns as shown below:

  (ns Structure)

  So, as far as I can tell, Clojure should look for Structure.clj in the
  class path. At least, that's what it used to do. I guess I could move
  all the code into a sub-directory, and rename all the namespaces--but
  I'd rather keep it organized the way it is, if possible.

 Do you have . or the current directory in CLASSPATH?



  On Mar 23, 1:33 am, Mark Volkmann r.mark.volkm...@gmail.com wrote:
  On Mon, Mar 23, 2009 at 4:59 AM, Rich rwml...@gmail.com wrote:

   Hi,

   I'd been using the 20081217 release. The following code worked, as
   long as Structure was in the working directory:

   Clojure
   user= (use 'Structure)
   nil

   However, after I updated to 20090320, I get the following errors:

   Clojure
   user= (use 'Structure)
   java.io.FileNotFoundException: Could not locate Structure__init.class
   or Structure.clj on classpath:  (NO_SOURCE_FILE:0)

   In both cases, I'm launching Clojure from the directory that contains
   Structure.clj as follows:

   java clojure.lang.Repl

   What am I doing wrong?

  Does Structure.clj contain a call to the ns macro? If so, I think you
  need to move Structure.clj to a subdirectory that matches its
  namespace. For example, if the namespace is a.b.c then you need a
  directory in the classpath that contains an a directory that
  contains a b directory that conains c.clj, not Structure.clj.

 --
 R. Mark Volkmann
 Object Computing, Inc.
--~--~-~--~~~---~--~~
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
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
-~--~~~~--~~--~--~---



Re: Problem with CLASSPATH

2009-03-23 Thread Rich

. should be set by default. I verified that it was set using (.
System getProperties). I also tried explicitly setting the absolute
path using -cp. No luck on either count.

-Rich-

On Mar 23, 5:14 am, revoltingdevelopment
christopher.jay.jo...@gmail.com wrote:
 I also had the NO_SOURCE_FILE error when using contrib packages, upon
 upgrade to 20090320.  My CLASSPATH included ..  I had to revert to
 starting clojure with an explicit -cp.  I'm new to both Java and
 Clojure, but this led me to think my CLASSPATH was being ignored.  I
 chalked it up to my misunderstanding or not really keeping track of
 how I had things set up before, but it seemed different.

 On Mar 23, 9:24 am, Mark Volkmann r.mark.volkm...@gmail.com wrote:

  On Mon, Mar 23, 2009 at 7:34 AM, Rich rwml...@gmail.com wrote:

   Structure.clj does call ns as shown below:

   (ns Structure)

   So, as far as I can tell, Clojure should look for Structure.clj in the
   class path. At least, that's what it used to do. I guess I could move
   all the code into a sub-directory, and rename all the namespaces--but
   I'd rather keep it organized the way it is, if possible.

  Do you have . or the current directory in CLASSPATH?

   On Mar 23, 1:33 am, Mark Volkmann r.mark.volkm...@gmail.com wrote:
   On Mon, Mar 23, 2009 at 4:59 AM, Rich rwml...@gmail.com wrote:

Hi,

I'd been using the 20081217 release. The following code worked, as
long as Structure was in the working directory:

Clojure
user= (use 'Structure)
nil

However, after I updated to 20090320, I get the following errors:

Clojure
user= (use 'Structure)
java.io.FileNotFoundException: Could not locate Structure__init.class
or Structure.clj on classpath:  (NO_SOURCE_FILE:0)

In both cases, I'm launching Clojure from the directory that contains
Structure.clj as follows:

java clojure.lang.Repl

What am I doing wrong?

   Does Structure.clj contain a call to the ns macro? If so, I think you
   need to move Structure.clj to a subdirectory that matches its
   namespace. For example, if the namespace is a.b.c then you need a
   directory in the classpath that contains an a directory that
   contains a b directory that conains c.clj, not Structure.clj.

  --
  R. Mark Volkmann
  Object Computing, Inc.
--~--~-~--~~~---~--~~
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
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
-~--~~~~--~~--~--~---



Re: Problem with CLASSPATH

2009-03-23 Thread Rich

Let me clarify my last post. In both cases, the directory was on the
class path (either implicitly as ., or explicitly given the absolute
path).

However, in both cases I got the same FileNotFound exception.

-Rich-

On Mar 23, 6:39 am, Rich rwml...@gmail.com wrote:
 . should be set by default. I verified that it was set using (.
 System getProperties). I also tried explicitly setting the absolute
 path using -cp. No luck on either count.

 -Rich-

 On Mar 23, 5:14 am, revoltingdevelopment

 christopher.jay.jo...@gmail.com wrote:
  I also had the NO_SOURCE_FILE error when using contrib packages, upon
  upgrade to 20090320.  My CLASSPATH included ..  I had to revert to
  starting clojure with an explicit -cp.  I'm new to both Java and
  Clojure, but this led me to think my CLASSPATH was being ignored.  I
  chalked it up to my misunderstanding or not really keeping track of
  how I had things set up before, but it seemed different.

  On Mar 23, 9:24 am, Mark Volkmann r.mark.volkm...@gmail.com wrote:

   On Mon, Mar 23, 2009 at 7:34 AM, Rich rwml...@gmail.com wrote:

Structure.clj does call ns as shown below:

(ns Structure)

So, as far as I can tell, Clojure should look for Structure.clj in the
class path. At least, that's what it used to do. I guess I could move
all the code into a sub-directory, and rename all the namespaces--but
I'd rather keep it organized the way it is, if possible.

   Do you have . or the current directory in CLASSPATH?

On Mar 23, 1:33 am, Mark Volkmann r.mark.volkm...@gmail.com wrote:
On Mon, Mar 23, 2009 at 4:59 AM, Rich rwml...@gmail.com wrote:

 Hi,

 I'd been using the 20081217 release. The following code worked, as
 long as Structure was in the working directory:

 Clojure
 user= (use 'Structure)
 nil

 However, after I updated to 20090320, I get the following errors:

 Clojure
 user= (use 'Structure)
 java.io.FileNotFoundException: Could not locate Structure__init.class
 or Structure.clj on classpath:  (NO_SOURCE_FILE:0)

 In both cases, I'm launching Clojure from the directory that contains
 Structure.clj as follows:

 java clojure.lang.Repl

 What am I doing wrong?

Does Structure.clj contain a call to the ns macro? If so, I think you
need to move Structure.clj to a subdirectory that matches its
namespace. For example, if the namespace is a.b.c then you need a
directory in the classpath that contains an a directory that
contains a b directory that conains c.clj, not Structure.clj.

   --
   R. Mark Volkmann
   Object Computing, Inc.
--~--~-~--~~~---~--~~
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
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
-~--~~~~--~~--~--~---