Re: strange error: : Could not find or load main class –jar

2013-01-31 Thread larry google groups
> I'm guessing encoding error.  In fact, if that error is a direct 
> copy-paste from either the exact error or what you sent the sysadmin, it 
> completely explains it.  Your `-` character in `-jar` above is in fact 
>`-` (en-dash), which is causing `java` to search the classpath 
> for a class named `-jar`. 


Good lord, you were correct! We re-typed it at the terminal and everything 
worked great. Very perceptive, that you figured that out. I would not have 
guessed that error even if I had one million years to figure out the 
problem.







W dniu czwartek, 31 stycznia 2013 15:16:37 UTC-5 użytkownik Marshall 
Bockrath-Vandegrift napisał:
>
> larry google groups > writes: 
>
> > Any suggestion, no matter how far fetched, will be welcome. I am 
> > ignorant about the JVM so I am having trouble debugging this problem.  
>
> > java -jar kiosk.clj 3 
>
> These are weird (.clj vs .jar), but since you say whatever you actually 
> ran worked... 
>
> > Then I gave the app to the sysadmin, and he tried to spin 
> > it up on another server, and on startup he got the error: 
> > 
> > Could not find or load main class -jar 
>
> I'm guessing encoding error.  In fact, if that error is a direct 
> copy-paste from either the exact error or what you sent the sysadmin, it 
> completely explains it.  Your `-` character in `-jar` above is in fact 
> `-` (en-dash), which is causing `java` to search the classpath for a 
> class named `-jar`. 
>
> -Marshall 
>
>

-- 
-- 
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.




Re: strange error: : Could not find or load main class –jar

2013-01-31 Thread larry google groups
> >java -jar kiosk.clj 3 
>
> These are weird (.clj vs .jar), but since you say whatever you 
> actually ran worked... 


Apologies. I re-typed and stupidly typed "clj". But what I sent to the 
sysadmin was a copy and paste of what I had used in my terminal to get the 
app running. 

I like your idea about the encoding error. He is about to test that idea. 



W dniu czwartek, 31 stycznia 2013 15:16:37 UTC-5 użytkownik Marshall 
Bockrath-Vandegrift napisał:
>
> larry google groups > writes: 
>
> > Any suggestion, no matter how far fetched, will be welcome. I am 
> > ignorant about the JVM so I am having trouble debugging this problem.  
>
> > java -jar kiosk.clj 3 
>
> These are weird (.clj vs .jar), but since you say whatever you actually 
> ran worked... 
>
> > Then I gave the app to the sysadmin, and he tried to spin 
> > it up on another server, and on startup he got the error: 
> > 
> > Could not find or load main class -jar 
>
> I'm guessing encoding error.  In fact, if that error is a direct 
> copy-paste from either the exact error or what you sent the sysadmin, it 
> completely explains it.  Your `-` character in `-jar` above is in fact 
> `-` (en-dash), which is causing `java` to search the classpath for a 
> class named `-jar`. 
>
> -Marshall 
>
>

-- 
-- 
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.




Re: strange error: : Could not find or load main class –jar

2013-01-31 Thread Marshall Bockrath-Vandegrift
larry google groups  writes:

> Any suggestion, no matter how far fetched, will be welcome. I am
> ignorant about the JVM so I am having trouble debugging this problem. 

> java -jar kiosk.clj 3

These are weird (.clj vs .jar), but since you say whatever you actually
ran worked...

> Then I gave the app to the sysadmin, and he tried to spin
> it up on another server, and on startup he got the error:
> 
> Could not find or load main class –jar

I’m guessing encoding error.  In fact, if that error is a direct
copy-paste from either the exact error or what you sent the sysadmin, it
completely explains it.  Your `-` character in `-jar` above is in fact
`-` (en-dash), which is causing `java` to search the classpath for a
class named `–jar`.

-Marshall

-- 
-- 
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.




Re: strange error: : Could not find or load main class –jar

2013-01-31 Thread Marko Topolnik
The java command is interpreting "-jar" as the name of a class instead of a 
command-line option. Something is messed up in the way the command is 
executed in your sysadmin's context.

On Thursday, January 31, 2013 9:01:07 PM UTC+1, larry google groups wrote:
>
>
> Any suggestion, no matter how far fetched, will be welcome. I am ignorant 
> about the JVM so I am having trouble debugging this problem. 
>
>
>
> W dniu czwartek, 31 stycznia 2013 13:22:20 UTC-5 użytkownik larry google 
> groups napisał:
>>
>> More info about my problem:
>>
>> java version "1.7.0_11"
>>
>> Java(TM) SE Runtime Environment (build 1.7.0_11-b21)
>>
>> Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode)
>>
>>
>>
>>
>> W dniu czwartek, 31 stycznia 2013 13:19:34 UTC-5 użytkownik larry google 
>> groups napisał:
>>>
>>> This does not seem to apply:
>>>
>>> https://github.com/technomancy/leiningen/issues/739
>>>
>>> "I suspect you're missing a :gen-class declaration in src/cljmx/core.clj
>>> ."
>>>
>>> But this is what I have:
>>>
>>> (ns kiosks-clojure.core
>>>   (:gen-class)
>>>   (:import
>>>(java.net URL)
>>>(java.io ByteArrayInputStream)
>>>(org.apache.commons.mail SimpleEmail)
>>>(org.apache.commons.mail HtmlEmail)
>>>(java.text SimpleDateFormat))
>>>
>>>
>>> Again, this worked fine on my local machine, and also on another server 
>>> that the company gave me, but when I give it to the sysadmin, he gets the 
>>> error. Perhaps this has something to do with the classpath? In the past, I 
>>> was always the one to install the jvm, and I ran the uberjars from my 
>>> directory. But maybe something needs to be made more specific for a 
>>> sysadmin to run this in any directory they like? 
>>>
>>>
>>>
>>>
>>>
>>> W dniu czwartek, 31 stycznia 2013 13:06:26 UTC-5 użytkownik larry google 
>>> groups napisał:

 I wrote a small Clojure app (1.4) and then bundled it up with "lein 
 uberjar". This app uses Ring and Jetty so it handles the webserver itself. 

 On my local machine, a Macintosh, in the terminal, I can start it with:

 java -jar kiosk.clj 3

 This works fine. 

 I also moved to another server, running Centos, and I used "yum 
 install" to install a JVM and then I again did: 

 java -jar kiosk.clj 3

 and that worked fine.

 Then I gave the app to the sysadmin, and he tried to spin it up on 
 another server, and on startup he got the error:

 Could not find or load main class -jar

 What does this mean? 





-- 
-- 
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.




Re: strange error: : Could not find or load main class –jar

2013-01-31 Thread larry google groups

I am using wrap-resource instead of wrap-file. Could that cause some issues 
with the path? (And, is this a path issue?)

(def app
  (-> app-routes
  (wrap-resource "public")
  (wrap-session {:cookie-name "timeout-discovery-session" :cookie-attrs 
{:max-age 1 }})
  (wrap-cookies)
  (wrap-keyword-params)
  (wrap-nested-params)
  (wrap-params)))




W dniu czwartek, 31 stycznia 2013 15:01:07 UTC-5 użytkownik larry google 
groups napisał:
>
>
> Any suggestion, no matter how far fetched, will be welcome. I am ignorant 
> about the JVM so I am having trouble debugging this problem. 
>
>
>
> W dniu czwartek, 31 stycznia 2013 13:22:20 UTC-5 użytkownik larry google 
> groups napisał:
>>
>> More info about my problem:
>>
>> java version "1.7.0_11"
>>
>> Java(TM) SE Runtime Environment (build 1.7.0_11-b21)
>>
>> Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode)
>>
>>
>>
>>
>> W dniu czwartek, 31 stycznia 2013 13:19:34 UTC-5 użytkownik larry google 
>> groups napisał:
>>>
>>> This does not seem to apply:
>>>
>>> https://github.com/technomancy/leiningen/issues/739
>>>
>>> "I suspect you're missing a :gen-class declaration in src/cljmx/core.clj
>>> ."
>>>
>>> But this is what I have:
>>>
>>> (ns kiosks-clojure.core
>>>   (:gen-class)
>>>   (:import
>>>(java.net URL)
>>>(java.io ByteArrayInputStream)
>>>(org.apache.commons.mail SimpleEmail)
>>>(org.apache.commons.mail HtmlEmail)
>>>(java.text SimpleDateFormat))
>>>
>>>
>>> Again, this worked fine on my local machine, and also on another server 
>>> that the company gave me, but when I give it to the sysadmin, he gets the 
>>> error. Perhaps this has something to do with the classpath? In the past, I 
>>> was always the one to install the jvm, and I ran the uberjars from my 
>>> directory. But maybe something needs to be made more specific for a 
>>> sysadmin to run this in any directory they like? 
>>>
>>>
>>>
>>>
>>>
>>> W dniu czwartek, 31 stycznia 2013 13:06:26 UTC-5 użytkownik larry google 
>>> groups napisał:

 I wrote a small Clojure app (1.4) and then bundled it up with "lein 
 uberjar". This app uses Ring and Jetty so it handles the webserver itself. 

 On my local machine, a Macintosh, in the terminal, I can start it with:

 java -jar kiosk.clj 3

 This works fine. 

 I also moved to another server, running Centos, and I used "yum 
 install" to install a JVM and then I again did: 

 java -jar kiosk.clj 3

 and that worked fine.

 Then I gave the app to the sysadmin, and he tried to spin it up on 
 another server, and on startup he got the error:

 Could not find or load main class -jar

 What does this mean? 





-- 
-- 
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.




Re: strange error: : Could not find or load main class –jar

2013-01-31 Thread larry google groups

Any suggestion, no matter how far fetched, will be welcome. I am ignorant 
about the JVM so I am having trouble debugging this problem. 



W dniu czwartek, 31 stycznia 2013 13:22:20 UTC-5 użytkownik larry google 
groups napisał:
>
> More info about my problem:
>
> java version "1.7.0_11"
>
> Java(TM) SE Runtime Environment (build 1.7.0_11-b21)
>
> Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode)
>
>
>
>
> W dniu czwartek, 31 stycznia 2013 13:19:34 UTC-5 użytkownik larry google 
> groups napisał:
>>
>> This does not seem to apply:
>>
>> https://github.com/technomancy/leiningen/issues/739
>>
>> "I suspect you're missing a :gen-class declaration in src/cljmx/core.clj
>> ."
>>
>> But this is what I have:
>>
>> (ns kiosks-clojure.core
>>   (:gen-class)
>>   (:import
>>(java.net URL)
>>(java.io ByteArrayInputStream)
>>(org.apache.commons.mail SimpleEmail)
>>(org.apache.commons.mail HtmlEmail)
>>(java.text SimpleDateFormat))
>>
>>
>> Again, this worked fine on my local machine, and also on another server 
>> that the company gave me, but when I give it to the sysadmin, he gets the 
>> error. Perhaps this has something to do with the classpath? In the past, I 
>> was always the one to install the jvm, and I ran the uberjars from my 
>> directory. But maybe something needs to be made more specific for a 
>> sysadmin to run this in any directory they like? 
>>
>>
>>
>>
>>
>> W dniu czwartek, 31 stycznia 2013 13:06:26 UTC-5 użytkownik larry google 
>> groups napisał:
>>>
>>> I wrote a small Clojure app (1.4) and then bundled it up with "lein 
>>> uberjar". This app uses Ring and Jetty so it handles the webserver itself. 
>>>
>>> On my local machine, a Macintosh, in the terminal, I can start it with:
>>>
>>> java -jar kiosk.clj 3
>>>
>>> This works fine. 
>>>
>>> I also moved to another server, running Centos, and I used "yum install" 
>>> to install a JVM and then I again did: 
>>>
>>> java -jar kiosk.clj 3
>>>
>>> and that worked fine.
>>>
>>> Then I gave the app to the sysadmin, and he tried to spin it up on 
>>> another server, and on startup he got the error:
>>>
>>> Could not find or load main class -jar
>>>
>>> What does this mean? 
>>>
>>>
>>>
>>>

-- 
-- 
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.




Re: strange error: : Could not find or load main class –jar

2013-01-31 Thread larry google groups
More info about my problem:

java version "1.7.0_11"

Java(TM) SE Runtime Environment (build 1.7.0_11-b21)

Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode)




W dniu czwartek, 31 stycznia 2013 13:19:34 UTC-5 użytkownik larry google 
groups napisał:
>
> This does not seem to apply:
>
> https://github.com/technomancy/leiningen/issues/739
>
> "I suspect you're missing a :gen-class declaration in src/cljmx/core.clj."
>
> But this is what I have:
>
> (ns kiosks-clojure.core
>   (:gen-class)
>   (:import
>(java.net URL)
>(java.io ByteArrayInputStream)
>(org.apache.commons.mail SimpleEmail)
>(org.apache.commons.mail HtmlEmail)
>(java.text SimpleDateFormat))
>
>
> Again, this worked fine on my local machine, and also on another server 
> that the company gave me, but when I give it to the sysadmin, he gets the 
> error. Perhaps this has something to do with the classpath? In the past, I 
> was always the one to install the jvm, and I ran the uberjars from my 
> directory. But maybe something needs to be made more specific for a 
> sysadmin to run this in any directory they like? 
>
>
>
>
>
> W dniu czwartek, 31 stycznia 2013 13:06:26 UTC-5 użytkownik larry google 
> groups napisał:
>>
>> I wrote a small Clojure app (1.4) and then bundled it up with "lein 
>> uberjar". This app uses Ring and Jetty so it handles the webserver itself. 
>>
>> On my local machine, a Macintosh, in the terminal, I can start it with:
>>
>> java -jar kiosk.clj 3
>>
>> This works fine. 
>>
>> I also moved to another server, running Centos, and I used "yum install" 
>> to install a JVM and then I again did: 
>>
>> java -jar kiosk.clj 3
>>
>> and that worked fine.
>>
>> Then I gave the app to the sysadmin, and he tried to spin it up on 
>> another server, and on startup he got the error:
>>
>> Could not find or load main class -jar
>>
>> What does this mean? 
>>
>>
>>
>>

-- 
-- 
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.




Re: strange error: : Could not find or load main class –jar

2013-01-31 Thread larry google groups
This does not seem to apply:

https://github.com/technomancy/leiningen/issues/739

"I suspect you're missing a :gen-class declaration in src/cljmx/core.clj."

But this is what I have:

(ns kiosks-clojure.core
  (:gen-class)
  (:import
   (java.net URL)
   (java.io ByteArrayInputStream)
   (org.apache.commons.mail SimpleEmail)
   (org.apache.commons.mail HtmlEmail)
   (java.text SimpleDateFormat))


Again, this worked fine on my local machine, and also on another server 
that the company gave me, but when I give it to the sysadmin, he gets the 
error. Perhaps this has something to do with the classpath? In the past, I 
was always the one to install the jvm, and I ran the uberjars from my 
directory. But maybe something needs to be made more specific for a 
sysadmin to run this in any directory they like? 





W dniu czwartek, 31 stycznia 2013 13:06:26 UTC-5 użytkownik larry google 
groups napisał:
>
> I wrote a small Clojure app (1.4) and then bundled it up with "lein 
> uberjar". This app uses Ring and Jetty so it handles the webserver itself. 
>
> On my local machine, a Macintosh, in the terminal, I can start it with:
>
> java -jar kiosk.clj 3
>
> This works fine. 
>
> I also moved to another server, running Centos, and I used "yum install" 
> to install a JVM and then I again did: 
>
> java -jar kiosk.clj 3
>
> and that worked fine.
>
> Then I gave the app to the sysadmin, and he tried to spin it up on another 
> server, and on startup he got the error:
>
> Could not find or load main class -jar
>
> What does this mean? 
>
>
>
>

-- 
-- 
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.




strange error: : Could not find or load main class –jar

2013-01-31 Thread larry google groups
I wrote a small Clojure app (1.4) and then bundled it up with "lein 
uberjar". This app uses Ring and Jetty so it handles the webserver itself. 

On my local machine, a Macintosh, in the terminal, I can start it with:

java -jar kiosk.clj 3

This works fine. 

I also moved to another server, running Centos, and I used "yum install" to 
install a JVM and then I again did: 

java -jar kiosk.clj 3

and that worked fine.

Then I gave the app to the sysadmin, and he tried to spin it up on another 
server, and on startup he got the error:

Could not find or load main class –jar

What does this mean? 



-- 
-- 
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.