Hi all,
I'm having troubles trying to make nl.bitwalker.useragentutils to work with
my small project. The problem with this package starts from the beginning
-- since the latest version (1.6) is not in Maven Central or Clojars repo,
I had to install it manually, using following command:
$ mvn install:install-file -Dfile=UserAgentUtils-1.6.jar
-DgroupId=nl.bitwalker -DartifactId=UserAgentUtils -Dpackaging=jar
-Dversion=1.6 -DgeneratePom=true -DcreateChecksum=true
after that I've updated project.clj to look like this (I'm using lein2,
btw).:
(defproject helloworld "0.1.0-SNAPSHOT"
:main helloworld.core
:dependencies [[org.clojure/clojure "1.4.0"]
[nl.bitwalker/useragentutils "1.6"]])
lein deps runs just fine, but trying to import the package in the namespace
fails with the following exception: "java.lang.ClassNotFoundException:
nl.bitwalker.useragentutils.UserAgent". Here's the complete
helloworld/core.clj listing:
(ns helloworld.core
(:import [nl.bitwalker.useragentutils UserAgent])
(:gen-class :main true))
(defn -main
[& args]
(println "Hello World!"))
Now, changing the import to look like (:import
[nl.bitwalker.useragentutils.UserAgent]) actually makes the compile
succeed, but then I have no idea how to access UserAgent class, since
neither (UserAgent. ) nor (nl.bitwalker.useragentutils/UserAgent. ) works
when trying to compile the project.
I'm completely lost here. Any tips? Maybe somebody has experience working
with other UA parsing libraries?
Thanks.
P.S. I have 0 experience with Java, so I might be doing something
horrendously stupid.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en