I don't get it. Whats the fully qualified name of a standalone file that i 
have locally?

On Friday, February 22, 2013 6:03:13 PM UTC-5, AtKaaZ wrote:
>
> use fully qualified name for that class, I think?
>
>
> On Fri, Feb 22, 2013 at 11:50 PM, larry google groups <
> lawrenc...@gmail.com <javascript:>> wrote:
>
>> Hmm, okay. Seems to be working with:
>>
>>   :source-paths      ["src"]
>>   :java-source-paths ["src_java"]
>>
>> The example on the Leiningen site might be clear to those who know the 
>> JVM, but it was not clear to me. 
>>
>> But now I have the earlier problem: 
>>
>> Caused by: java.lang.RuntimeException: No such namespace: Base64Coder
>>
>> Not sure how to import this. I tried a simple:
>>
>> (ns mpdv.core
>>   (:gen-class)
>>   (:import
>>    (Base64Coder))
>>
>> But that does not work. 
>>
>>
>> On Friday, February 22, 2013 5:31:49 PM UTC-5, Marko Topolnik wrote:
>>>
>>> No, src is root for all Clojure. That means that your java root is under 
>>> the Clojure root. Move java to top-level.
>>>
>>> On Friday, February 22, 2013 11:28:17 PM UTC+1, larry google groups 
>>> wrote:
>>>>
>>>> I see this sentence:
>>>>
>>>> "Having one source root contain another (e.g. src and src/java) can 
>>>> cause obscure problems."
>>>>
>>>> but I have: 
>>>>
>>>> src/
>>>>     java/
>>>>     mpdv/
>>>>
>>>> Which I assume is what Leinengen is asking for. 
>>>>
>>>>
>>>> On Friday, February 22, 2013 5:23:28 PM UTC-5, larry google groups 
>>>> wrote:
>>>>>
>>>>> Maybe I spoke too soon. I have now stepped into the Twilight Zone. 
>>>>> Changes I make to files do not get built when a try to run lein. 
>>>>>
>>>>> Just to get some kind of reaction from Leinengen I just put random 
>>>>> garbage in the ns clause of my core.clj:
>>>>>
>>>>> (ns lkjlkljlkjlkj  mpdv.core
>>>>>   (:gen-class)
>>>>>   (:import
>>>>>    (java.net URL URLConnection)
>>>>>    (java.io ByteArrayInputStream BufferedReader IOException 
>>>>> InputStream InputStreamReader OutputStreamWriter 
>>>>> UnsupportedEncodingException)
>>>>>    (java.text SimpleDateFormat)
>>>>>    (java.util Date)
>>>>>    (java.security MessageDigest)
>>>>>    (org.apache.commons.mail SimpleEmail HtmlEmail)
>>>>>    (org.joda.time.format DateTimeFormat ISODateTimeFormat)
>>>>>    (Base64Coder)
>>>>>    (lkjlkjlkjoiuoiu))
>>>>>
>>>>> This should have caused an error, but instead, when I did "lein 
>>>>> uberjar" everything compiled -- but compiled without any of the changes 
>>>>> I've made during the last 30 minutes. 
>>>>>
>>>>> In the terminal, from the same terminal that I run "lein uberjar" I 
>>>>> can run: 
>>>>>
>>>>> cat src/mpdv/core.clj
>>>>>
>>>>> and I see my changes, including the random garbage that I just wrote, 
>>>>> but somehow, if I then type "lein uberjar" lein does not see it. 
>>>>>
>>>>> I do not know if this issue is related, but following the advice about 
>>>>> polygots, given here: 
>>>>>
>>>>> https://github.com/**technomancy/leiningen/blob/**
>>>>> stable/doc/MIXED_PROJECTS.md<https://github.com/technomancy/leiningen/blob/stable/doc/MIXED_PROJECTS.md>
>>>>>
>>>>> I added this to my project.clj file: 
>>>>>
>>>>>   :source-paths      ["src/mpdv"]
>>>>>   :java-source-paths ["src/java"]
>>>>>
>>>>> Did I do something wrong here? 
>>>>>
>>>>> Why is Leinengen still compiling, even though the source code is full 
>>>>> of garbage? 
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Friday, February 22, 2013 5:01:15 PM UTC-5, larry google groups 
>>>>> wrote:
>>>>>>
>>>>>> Ah, I see. This is a "polygot" project, which Leiningen describes 
>>>>>> here:
>>>>>>
>>>>>> https://github.com/**technomancy/leiningen/blob/**
>>>>>> stable/doc/MIXED_PROJECTS.md<https://github.com/technomancy/leiningen/blob/stable/doc/MIXED_PROJECTS.md>
>>>>>>
>>>>>> That worked for me. Leiningen  saves the day again. 
>>>>>>
>>>>>>
>>>>>> On Friday, February 22, 2013 4:25:04 PM UTC-5, larry google groups 
>>>>>> wrote:
>>>>>>>
>>>>>>> When I just do something obvious, like in mpdv.core:
>>>>>>>
>>>>>>> (ns mpdv.core
>>>>>>>   (:gen-class)
>>>>>>>   (:import
>>>>>>>    (Base64Coder))
>>>>>>>
>>>>>>> and then call its static methods I get: 
>>>>>>>
>>>>>>> Exception in thread "main" java.lang.**NoClassDefFoundError: 
>>>>>>> Base64Coder (wrong name: com/omniture/security/**Base64Coder), 
>>>>>>> compiling:(mpdv/core.clj:130)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Friday, February 22, 2013 4:18:00 PM UTC-5, larry google groups 
>>>>>>> wrote:
>>>>>>>>
>>>>>>>> I am ignorant of the JVM, and of Java, so I am sure this is a dumb 
>>>>>>>> question.
>>>>>>>>
>>>>>>>> I need to post to the Omniture API. They offer some sample code 
>>>>>>>> here: 
>>>>>>>>
>>>>>>>> https://developer.omniture.**com/en_US/blog/calling-rest-**
>>>>>>>> api-in-java<https://developer.omniture.com/en_US/blog/calling-rest-api-in-java>
>>>>>>>>
>>>>>>>> That code depends on a Base64Coder class which they offer in a zip 
>>>>>>>> file. I downloaded it and did: 
>>>>>>>>
>>>>>>>> javac Base64Coder.java
>>>>>>>>
>>>>>>>> and this gave me Base64Coder.class. 
>>>>>>>>
>>>>>>>> I created my project with Leinengen2. 
>>>>>>>>
>>>>>>>> I thought maybe I could just copy Base64Coder.class to the 
>>>>>>>> target/classes folder, but then how would I reference it in my code? 
>>>>>>>>
>>>>>>>>
>>>>>>>>  -- 
>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clo...@googlegroups.com<javascript:>
>> Note that posts from new members are moderated - please be patient with 
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+u...@googlegroups.com <javascript:>
>> 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+u...@googlegroups.com <javascript:>.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>
>
>
> -- 
> Please correct me if I'm wrong or incomplete,
> even if you think I'll subconsciously hate it.
>
>  

-- 
-- 
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/groups/opt_out.


Reply via email to