0

I'm running Leiningen in Counterclockwise in Eclipse (Windows, if it's relevant).

The thing is, when I run Leiningen from the command prompt, it runs just fine. However when I run it inside Eclipse, although it runs fine it haunts me with the following warning:

Java HotSpot(TM) Client VM warning: TieredCompilation is disabled in this release.

The only relevant thing I found on the Internet is this. However the solution doesn't work for me as I don't have this line in lein.bat file. I've tried fiddling with Java options in lein.bat to enable TieredCompilation explicitly with no avail. I'm trying to understand - what's different when Eclipse runs lein, compared to when I run it from the prompt, how does it run it? How do I hide this message?

EDIT: this warning seems to appear only in 32-bit JVM; for anyone having the same problem, using 64-bit JVM solves it. For anyone that as to use 32-bit JVM for whatever reason, I'm still looking for a good solution.

Community
  • 1
  • 1
Domchi
  • 10,705
  • 6
  • 54
  • 64

1 Answers1

1

(converted from comment as I have to add additional info)

CCW uses its own version of Leiningen - for example, when I execute lein version from inside CCW I get 2.5.1, but if I drop to the command line and execute the same command I get 2.7.1. In my install (Neon + CCW - couldn't make the standalone CCW install work) there's a leiningen-standalone.jar in C:\eclipse\plugins\ccw.core_0.35.1.STABLE001. There may be a way to get Counterclockwise to use a separate version of Leiningen - perhaps more knowledgeable users will chime in with how to do this.

Also note that in the Windows install of Leiningen the LEIN_JVM_OPTS environment variable isn't defined at all in lein.bat, although it is used when invoking Java. Thus it seems you have two options:

  1. Less-preferred option: edit lein.bat and add the definition of LEIN_JVM_OPTS, probably somewhere near the beginning of the file. This has the disadvantage that when you upgrade Leiningen you'll lose your definition of LEIN_JVM_OPTS and have to find this message again.

  2. More-preferred option: since this is Windows you can go into Control Panel, type "environ" in the search box, then click on on the "Edit environment variables for your account" link which comes up under System (or click on "Edit the system environment variables" if you like). Create a new entry for LEIN_JVM_OPTS, specifying something like

    -XX:-TieredCompilation
    

and you should be good to go. While I don't know for certain if this environment variable is used by the standalone .jar version of Leiningen I'd certainly hope and expect it would be.

Best of luck.

  • You are correct, lein included with Eclipse is completely different (and older) 2.5.1 version. Which has no lein.bat so that won't work - and I've tried option 2 as well and it also didn't seem to have any effect. So it seems I can either wait for new CCW release and hope this is fixed or try hacking its lein plugin... But please do tell - do you get the same warning when running lein from Eclipse? – Domchi Jan 03 '17 at 00:23
  • I did an "Update Dependencies" which didn't cause an issue, but I doubt that does a Java compile. What command were you using which caused this issue? – Bob Jarvis - Слава Україні Jan 03 '17 at 00:31
  • From inside eclipse I get `Leiningen 2.5.1 on Java 1.8.0_112 Java HotSpot(TM) 64-Bit Server VM`. From the command line I get `Leiningen 2.7.1 on Java 1.8.0_112 Java HotSpot(TM) 64-Bit Server VM`. And no errors or problems are reported from either source. ??? – Bob Jarvis - Слава Україні Jan 04 '17 at 03:37
  • `Leiningen 2.7.1 on Java 1.8.0_51 Java HotSpot(TM) Client VM` from command line, and `Leiningen 2.5.1 on Java 1.8.0_31 Java HotSpot(TM) Client VM` from Eclipse. Now I've tried using newish JRE in Eclipse and then I get `Leiningen 2.5.1 on Java 1.8.0_111 Java HotSpot(TM) Client VM` - with the same warning. But then I saw you're on 64-bit JVM so I tried 64-bit JVM I had lying around and curiously I no longer get a warning. So 32-bit JVM returns warning only in Eclipse and not in prompt, while 64-bit JVM doesn't return warning from Eclipse either... strange. – Domchi Jan 07 '17 at 01:03
  • You might want to put that in as an answer and then accept it (after the obligatory two day delay :-) so that someone else with the same problem can find it more easily. – Bob Jarvis - Слава Україні Jan 07 '17 at 03:07
  • I've added the EDIT to my question. Still looking for 32-bit JVM solution though. – Domchi Jan 22 '17 at 18:40
  • You might try sending an email to Laurent Petit (his email address is available from [his GitHub page](https://github.com/laurentpetit)) - maybe he'd have an idea about this. – Bob Jarvis - Слава Україні Jan 22 '17 at 20:46