Java libraries are handled differently to native Clojure libraries. You can
either enter the full class with packages, such as:

    (java.util.UUID/randomUUID)

Or you can use import to access the class without the package:

    (import 'java.util.UUID)
    (UUID/randomUUID)

To check you have access to the java library, try entering the following
class name at the REPL:

    edu.emory.mathcs.jtransforms.fft.DoubleFFT_1D

If the library is loaded, this should return a class object, rather than
erroring.

- James


On 30 April 2014 16:40, Alan Forrester
<alanmichaelforres...@googlemail.com>wrote:

> I would like to try the JTransforms Java FFT library from Clojure:
>
> https://sites.google.com/site/piotrwendykier/software/jtransforms
>
> I created a new folder went to that folder in a console and typed
>
> lein try net.sourceforge.jtransforms/jtransforms "2.4.0"
>
> lein try retrieved some jars and poms from central, presumably
> jtransforms and its dependencies and started a REPL.
>
> Having got this far I can't seem to figure out how to require
> jtransforms in the REPL. I have tried
>
> (require '[x :as trans])
>
> for various values of x such as
> "net.sourceforge.jtransforms/jtransforms" and
> "net.sourceforge.jtransforms.jtransforms", "jtransforms.jtransforms"
> and the REPL keeps saying
>
> FileNotFoundException Could not locate jtranforms__init.class or
> jtransforms.clj on classpath: clojure.lang.RT.load (RT.java:443)
>
> I think I must be misunderstanding how to download libraries and their
> dependencies or how to require them when they have been downloaded.
> Can anybody shed some light on this for me?
>
> Thanks,
> Alan
>
> --
> 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 unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to