Re: Is it possible to determine that I did a 'lein repl'

2015-02-27 Thread Cecil Westerhof
2015-02-27 21:10 GMT+01:00 Sean Corfield : > On Feb 27, 2015, at 6:56 AM, Cecil Westerhof > wrote: > > Caused by: java.lang.RuntimeException: Unable to resolve symbol: jvm-opts > in this context, compiling:(/home/cecil/Clojure/quotes/project.clj:9:38) > > > Right, as I said: > ​You are right: I

Re: Is it possible to determine that I did a 'lein repl'

2015-02-27 Thread Sean Corfield
On Feb 27, 2015, at 6:56 AM, Cecil Westerhof wrote: > Caused by: java.lang.RuntimeException: Unable to resolve symbol: jvm-opts in > this context, compiling:(/home/cecil/Clojure/quotes/project.clj:9:38) Right, as I said: "jvm-opts is a function in project.clj that returns the default JVM option

Re: Is it possible to determine that I did a 'lein repl'

2015-02-27 Thread Cecil Westerhof
2015-02-27 15:56 GMT+01:00 Cecil Westerhof : > 2015-02-27 14:29 GMT+01:00 Sean Corfield : > >> On Feb 27, 2015, at 12:09 AM, Cecil Westerhof >> wrote: >> >> In my application I have a quit button which does: >> (System/exit 0) >> >> But when I used 'lein repl' I do not want to exit, but just

Re: Is it possible to determine that I did a 'lein repl'

2015-02-27 Thread Cecil Westerhof
2015-02-27 14:29 GMT+01:00 Sean Corfield : > On Feb 27, 2015, at 12:09 AM, Cecil Westerhof > wrote: > > In my application I have a quit button which does: > (System/exit 0) > > But when I used 'lein repl' I do not want to exit, but just close the > frame. Can this be done? > > > Here’s how we

Re: Is it possible to determine that I did a 'lein repl'

2015-02-27 Thread Sean Corfield
On Feb 27, 2015, at 12:09 AM, Cecil Westerhof wrote: > In my application I have a quit button which does: > (System/exit 0) > > But when I used 'lein repl' I do not want to exit, but just close the frame. > Can this be done? Here’s how we do it. Add the following to project.clj: :profile

Re: Is it possible to determine that I did a 'lein repl'

2015-02-27 Thread Cecil Westerhof
2015-02-27 11:42 GMT+01:00 henry w : > Well, I dont know if you could. but unless anyone else chimes in with > another solution... there's no problem using clojure and java together in a > lein project. > > And just to check ... this system/exit call is library code you have no > control over righ

Re: Is it possible to determine that I did a 'lein repl'

2015-02-27 Thread henry w
Well, I dont know if you could. but unless anyone else chimes in with another solution... there's no problem using clojure and java together in a lein project. And just to check ... this system/exit call is library code you have no control over right? I mean, if not of course you can stick a *

Re: Is it possible to determine that I did a 'lein repl'

2015-02-27 Thread Cecil Westerhof
2015-02-27 10:01 GMT+01:00 henry w : > I had exactly that problem when using an old version of JDAF. The newer > version makes it configurable. > > to get around the problem i used AspectJ like this: > > @Aspect > public class SystemExitEvader { > > @Pointcut("call(* java.lang.System.exit(..))

Re: Is it possible to determine that I did a 'lein repl'

2015-02-27 Thread henry w
I had exactly that problem when using an old version of JDAF. The newer version makes it configurable. to get around the problem i used AspectJ like this: @Aspect public class SystemExitEvader { @Pointcut("call(* java.lang.System.exit(..)) && args(status)") public void systemExitCall(in