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 the
mangling prevents your class from being found.

--Aaron

On Tue, Sep 18, 2012 at 11:58 AM, Jim - FooBar(); <jimpil1...@gmail.com> wrote:
> 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);
>
> public abstract boolean shouldMinimize();
>
> public abstract void setPopulation(Population paramPopulation);
> }
>
> the package declaration seems perfectly fine in the class files (as
> expected)...what on earth is happening? Tried both hyphen/underscore when
> :import-ing but i get the same error!
>
> Jim
>
>
> On 18/09/12 16:51, Jim - FooBar(); wrote:
>
> 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 :
>
> ClassNotFoundException encog_java.customGA.CustomNeuralGeneticAlgorithm
> java.net.URLClassLoader$1.run (URLClassLoader.java:366)
>
> the jar i'm referring to is on clojars [enclog "0.5.6-SNAPSHOT"] in case you
> have any doubts that the classes are in there...
>
> any pointers are greatly appreciated...
>
> Jim
>
>
>
>
>
> On 18/09/12 16:16, Jim - FooBar(); wrote:
>
> 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 a replicated
> directory structure as the one it will be consumed from, everything will be
> fine?
> I honestly thought i could skip all that, by not having any packages at all!
> I also tried putting the class files right next to the clj files but again
> it wouldn't find them!
>
> What are you trying to accomplish by doing this?
>
>
> well, the short story is that I'm wrapping a library but I'm not completely
> satisfied with the way it does a couple of things...too many assumptions in
> some places - so I'm trying to sort of re-implement a couple of
> classes/interfaces and include them already compiled in a separate folder in
> the jar in case someone else faces similar issues. It took a while to write
> the java code and of course compile it successfully against all the
> prerequisites...now, apparently i need to recompile in a replicated dir
> structure...
>
> I did not use proxy and the gang cos it just seemed easier (mutable
> variables/inheritance etc etc)
>
> Jim
>
>
>
> --
> 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

Reply via email to