JVM flags for REPL

33 views
Skip to first unread message

Mark Engelberg

unread,
Nov 12, 2012, 1:27:14 PM11/12/12
to clojured...@googlegroups.com
I'm revisiting Counterclockwise, and am excited about how it is coming along.

One thing that is essential for my work is that I need a way to configure the heap size of the java instantiation that runs the REPL, as well as ensuring that it runs the -server version.

A while back, I asked about whether this could be controlled from the project.clj file, and was told that it was in the plans, but had not been done yet.  My questions:

1. Has it been done?  (I don't see it in the issues list, but I don't see any reference to it in the release notes either, so I can't tell)
2. Is there an alternative workaround, for example, is there a way to set up a new default across all projects through an environment variable?

Thanks.

Laurent PETIT

unread,
Nov 12, 2012, 4:32:03 PM11/12/12
to clojured...@googlegroups.com
Hello,

2012/11/12 Mark Engelberg <mark.en...@gmail.com>

I'm revisiting Counterclockwise, and am excited about how it is coming along.

Glad to hear you thinking it's moving in the right direction ;-)
 
One thing that is essential for my work is that I need a way to configure the heap size of the java instantiation that runs the REPL, as well as ensuring that it runs the -server version.

A while back, I asked about whether this could be controlled from the project.clj file, and was told that it was in the plans, but had not been done yet.  My questions:

1. Has it been done?  (I don't see it in the issues list, but I don't see any reference to it in the release notes either, so I can't tell)

Not yet. The recent work has been on stabilizing the existing codebase. There will be a release next thursday with the result of this stabilization. Work on Leiningen generic launcher support had been postponed until after that (and there was also the fact that I had to choose a strategy for how to implement this. I think that I now have my mind clear on what could work, so the good news is I know what I'll try to implement (*)
 
2. Is there an alternative workaround, for example, is there a way to set up a new default across all projects through an environment variable?

There is a workaround, because even if it is not apparent when using shortcuts such as Ctrl-Alt-S, etc., there is an underlying Eclipse concept, that of a "Launch configuration", which is associated with the "launch" of the REPL's JVM. This "Launch configuration" is created on a per-project basis, and can be found (once you've started a REPL for the first time) in the Run > Run configurations ... menu (under the Clojure tree item on the left, you'll see one configuration per project).

Select the launch configuration for your project, its detail will appear on the main pane on the right, organized via tabs.
Under the "Arguments" tab, you'll be able to specify Program Arguments as well as VM arguments (e.g. -Xmx512m, etc.)

I don't think it's possible to specify this once and for all for all launch configurations, but rather once per project.

HTH,

-- 
Laurent

Christophe Grand

unread,
Nov 13, 2012, 2:46:02 AM11/13/12
to clojured...@googlegroups.com
On Mon, Nov 12, 2012 at 10:32 PM, Laurent PETIT <lauren...@gmail.com> wrote:

I don't think it's possible to specify this once and for all for all launch configurations, but rather once per project.


What about:

Preferences > Java > Installed JREs > (select the appropriate one) > Edit > Default VM arguments

Those settings should affect all your projects.

Christophe

Laurent PETIT

unread,
Nov 13, 2012, 4:16:44 AM11/13/12
to clojured...@googlegroups.com
Sent from a smartphone, please excuse the brevity/typos.
Wow, sounds cool, thx Christophe !

Christophe

--
You received this message because you are subscribed to the Google Groups "counterclockwise-users" group.
To post to this group, send email to clojured...@googlegroups.com.
To unsubscribe from this group, send email to clojuredev-use...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/clojuredev-users?hl=en.

Mark Engelberg

unread,
Nov 13, 2012, 5:04:05 AM11/13/12
to clojured...@googlegroups.com
This worked for me.  Thanks!

Laurent PETIT

unread,
Dec 13, 2012, 3:32:23 AM12/13/12
to clojured...@googlegroups.com
Tip added to the FAQ page:



2012/11/13 Christophe Grand <chris...@cgrand.net>

--
You received this message because you are subscribed to the Google Groups "counterclockwise-users" group.
Reply all
Reply to author
Forward
0 new messages