mixing clojure source with java class files problem!

2012-09-18 Thread Jim - FooBar();
Hi all, I'm having a really ridiculous problem...let's say there is jar on clojars with the following structure: --- top-level (.jar) --foo (clojure namespaces) -a.clj -b.clj -c.clj -- --bar (java .class files - no package declaration when compiled) --baz -d.class

Re: mixing clojure source with java class files problem!

2012-09-18 Thread Aaron Cohen
On Tue, Sep 18, 2012 at 10:52 AM, Jim - FooBar(); jimpil1...@gmail.com wrote: Hi all, I'm having a really ridiculous problem...let's say there is jar on clojars with the following structure: --- top-level (.jar) --foo (clojure namespaces) -a.clj -b.clj -c.clj -- --bar

Re: mixing clojure source with java class files problem!

2012-09-18 Thread Jim - FooBar();
On 18/09/12 16:00, Aaron Cohen wrote: The package is baked into the .class file format. You can't change it after the fack by just moving files in the directory structure. regardless of whether there is an actual package declaration? So, you're saying that if I compile the java source inside

Re: mixing clojure source with java class files problem!

2012-09-18 Thread Jim - FooBar();
It still not finding the compiled classes! I compiled them all using the exact same package declaration as the one found in the jar that I'm producing! I was also careful to convert the hyphen (directory name) to an underscore (in the .java file)... I am still getting a :

Re: mixing clojure source with java class files problem!

2012-09-18 Thread Jim - FooBar();
decompiling a simple interface gives: *package*encog_java.customGA; *import*org.encog.ml.MLRegression; *import*org.encog.ml.genetic.population.Population; *public**abstract**interface*CalculateScore { *public**abstract**double*calculateScore(MLRegression paramMLRegression);

Re: mixing clojure source with java class files problem!

2012-09-18 Thread Aaron Cohen
What did you use to compile this? I don't believe hyphens are legal in Java package names. It will be hard to use this in clojure, clojure converts hyphens to underscores automatically behind the scenes in package names. But your package actually has a (possibly invalid) hyphen in it's name, so

Re: mixing clojure source with java class files problem!

2012-09-18 Thread Jim - FooBar();
On 18/09/12 17:28, Aaron Cohen wrote: What did you use to compile this? I don't believe hyphens are legal in Java package names. I used regular *javac -cp blah:blah:blah encog-java/customGA/*.java* the compiler did not complain because the actual package declaration uses underscore instead

Re: mixing clojure source with java class files problem!

2012-09-18 Thread Aaron Cohen
On Tue, Sep 18, 2012 at 12:39 PM, Jim - FooBar(); jimpil1...@gmail.com wrote: On 18/09/12 17:28, Aaron Cohen wrote: What did you use to compile this? I don't believe hyphens are legal in Java package names. I used regular javac -cp blah:blah:blah encog-java/customGA/*.java the

Re: mixing clojure source with java class files problem!

2012-09-18 Thread Jim - FooBar();
On 18/09/12 17:50, Aaron Cohen wrote: I actually just tried this (I don't recommend this approach though), and it worked for me, maybe you missed a step. what? seriously? You mean you downloaded the jar and managed to import some class from inside encog_java/customGA/ in some dummy project of

Re: mixing clojure source with java class files problem!

2012-09-18 Thread Jim - FooBar();
On 18/09/12 17:50, Aaron Cohen wrote: I actually just tried this (I don't recommend this approach though), and it worked for me, maybe you missed a step. what jar is lein2 using? the one with the nice name or the one with the numbers at the end? which one of the 2 did you modify? Jim ps:

Re: mixing clojure source with java class files problem!

2012-09-18 Thread Aaron Cohen
On Tue, Sep 18, 2012 at 12:54 PM, Jim - FooBar(); jimpil1...@gmail.com wrote: On 18/09/12 17:50, Aaron Cohen wrote: I actually just tried this (I don't recommend this approach though), and it worked for me, maybe you missed a step. what jar is lein2 using? the one with the nice name or the

Re: mixing clojure source with java class files problem!

2012-09-18 Thread Jim - FooBar();
On 18/09/12 17:54, Jim - FooBar(); wrote: On 18/09/12 17:50, Aaron Cohen wrote: I actually just tried this (I don't recommend this approach though), and it worked for me, maybe you missed a step. what jar is lein2 using? the one with the nice name or the one with the numbers at the end?