Re: Eclipse and Compojure

2010-08-10 Thread Laurent PETIT
2010/8/10 Rasmus Svensson r...@lysator.liu.se

  I assume the problem is that there are no .class files in the jar. I
  tried to rebuild the compojure jar using lein jar but still didn't
  get .class files, even though:

 Clojure looks for both .class files and .clj files, so you don't need
 to compile anything manually.

  I'm seeing the following error:
  java.io.FileNotFoundException: Could not locate compojure/
  core__init.class or compojure/core.clj on classpath:core.clj
  /web-
  app-adder/src/adder line 1  Clojure Compilation Problem

 As you can see, it actually said that it looked for:

 1) compojure/core__init.class
 2) compojure/core.clj

 and didn't find any of them. This means that the compojure jar file is
 not on the CLASSPATH somehow. I'm not a clojure + eclipse user, so I
 can't give you any advice on how to setup eclipse so that it uses the
 correct CLASSPATH . But one thing that might be useful to know is
 that, for the JVM, jar files counts as directories. Thus you might
 have to add the paths to all the jar file, not the directory that
 contains them.

 I hope that this could be helpful, or perhaps narrow down your
 debugging a little...


 Yes, probably, a REPL/environment was already running, and thus adding the
jars to the project's classpath didn't reflect automatically in the launched
environment. And then stopping the env and running a fresh one did the job.
So not specifically a problem with ccw, AFAICT

-- 
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: Eclipse and Compojure

2010-08-10 Thread Rasmus Svensson
 I assume the problem is that there are no .class files in the jar. I
 tried to rebuild the compojure jar using lein jar but still didn't
 get .class files, even though:

Clojure looks for both .class files and .clj files, so you don't need
to compile anything manually.

 I'm seeing the following error:
 java.io.FileNotFoundException: Could not locate compojure/
 core__init.class or compojure/core.clj on classpath:core.clj/web-
 app-adder/src/adder line 1  Clojure Compilation Problem

As you can see, it actually said that it looked for:

1) compojure/core__init.class
2) compojure/core.clj

and didn't find any of them. This means that the compojure jar file is
not on the CLASSPATH somehow. I'm not a clojure + eclipse user, so I
can't give you any advice on how to setup eclipse so that it uses the
correct CLASSPATH . But one thing that might be useful to know is
that, for the JVM, jar files counts as directories. Thus you might
have to add the paths to all the jar file, not the directory that
contains them.

I hope that this could be helpful, or perhaps narrow down your
debugging a little...

// raek

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


Eclipse and Compojure

2010-08-09 Thread scott
I was going to try out a compojure tutorial in Eclipse. It appears
that only .clj files and not the .class files are included in the
compojure jar file.

I'm seeing the following error:
java.io.FileNotFoundException: Could not locate compojure/
core__init.class or compojure/core.clj on classpath:core.clj/web-
app-adder/src/adder line 1  Clojure Compilation Problem

I assume the problem is that there are no .class files in the jar. I
tried to rebuild the compojure jar using lein jar but still didn't
get .class files, even though:

lein help jar
Create a $PROJECT.jar file containing the compiled .class files as
well as the source .clj files.

Any suggestions would be appreciated - thanks.

Scott Hickey

-- 
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: Eclipse and Compojure

2010-08-09 Thread Laurent PETIT
Hi,

How could I help you from the Eclipse side ? I don't totally understand the
steps you're following in Eclipse / counterclockwise (but maybe it's not an
eclipse / counterclockwise problem ?)

2010/8/9 scott jscotthic...@gmail.com

 I was going to try out a compojure tutorial in Eclipse. It appears
 that only .clj files and not the .class files are included in the
 compojure jar file.

 I'm seeing the following error:
 java.io.FileNotFoundException: Could not locate compojure/
 core__init.class or compojure/core.clj on classpath:core.clj
  /web-
 app-adder/src/adder line 1  Clojure Compilation Problem

 I assume the problem is that there are no .class files in the jar. I
 tried to rebuild the compojure jar using lein jar but still didn't
 get .class files, even though:

 lein help jar
 Create a $PROJECT.jar file containing the compiled .class files as
 well as the source .clj files.

 Any suggestions would be appreciated - thanks.

 Scott Hickey

 --
 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.comclojure%2bunsubscr...@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

Re: Eclipse and Compojure

2010-08-09 Thread scott
I have the tutorial described below working, using Emacs and
Leiningen.

http://mmcgrana.github.com/2010/07/develop-deploy-clojure-web-applications.html

I created a new Clojure project in Eclipse. I created a lib
directory, imported the dependent jar files that Leiningen pulled from
a repo into the lib directory, and added all of the jars to the
project build path.

When I imported the core.clj into the Eclipse project src folder, I
got:
java.io.FileNotFoundException: Could not locate compojure/
core__init.class or compojure/core.clj on classpath:
core.clj/web-
app-adder/src/adder line 1  Clojure Compilation Problem

It just occurred to me to start the REPL and see if the error still
shows up in the error console; it doesn't - the error disappears.

I shut down Eclipse and restarted, and I don't see the error in the
error console anymore - irregardless of the REPL running.

I assumed the problem had to do with the JDT finding no .class files
in the compojure jar file, but there is no error in the error console
now.

Thanks for offering to help - it seems to work now.

Scott Hickey



On Aug 9, 1:41 pm, Laurent PETIT laurent.pe...@gmail.com wrote:
 Hi,

 How could I help you from the Eclipse side ? I don't totally understand the
 steps you're following in Eclipse / counterclockwise (but maybe it's not an
 eclipse / counterclockwise problem ?)

 2010/8/9 scott jscotthic...@gmail.com

  I was going to try out a compojure tutorial in Eclipse. It appears
  that only .clj files and not the .class files are included in the
  compojure jar file.

  I'm seeing the following error:
  java.io.FileNotFoundException: Could not locate compojure/
  core__init.class or compojure/core.clj on classpath:    core.clj
   /web-
  app-adder/src/adder     line 1  Clojure Compilation Problem

  I assume the problem is that there are no .class files in the jar. I
  tried to rebuild the compojure jar using lein jar but still didn't
  get .class files, even though:

  lein help jar
  Create a $PROJECT.jar file containing the compiled .class files as
  well as the source .clj files.

  Any suggestions would be appreciated - thanks.

  Scott Hickey

  --
  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.comclojure%2bunsubscr...@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