A small improvement to GroovyConsole - No Fluff Just Stuff

A small improvement to GroovyConsole

Posted by: Andres Almiray on May 4, 2010

If you're a Mac user you've probably noticed that running a Java based application results in a default icon being placed in the dock. Groovy's console application is no exception, as the following pic bears witness



However, fixing this issue is simple; you just need to add a JVM option like the following one:
-Xdock:icon=/path/to/your/icons.icns
Where can this option be added you ask? Why yes, here is how you can do it:
  1. Go to $GROOVY_HOME/bin
  2. Edit startGroov
  3. Search for JAVA_OPTS and Darwin. You'll find a line that looks like this
    if $darwin; then
        JAVA_OPTS="$JAVA_OPTS -Xdock:name=$GROOVY_APP_NAME"
    fi
    
  4. Add the -Xdock:icon entry to that line et voilĂ !
Alternatively you can wait for the next release of Groovy, which most likely will come with a default Groovy icon, like the following one



Keep on Groovying!
Andres Almiray

About Andres Almiray

Andres is a Java/Groovy developer and a Java Champion with more than 20 years of experience in software design and development. He has been involved in web and desktop application development since the early days of Java. Andres is a true believer in open source and has participated on popular projects like Groovy, Griffon, and DbUnit, as well as starting his own projects (Json-lib, EZMorph, GraphicsBuilder, JideBuilder). Founding member of the Griffon framework and Hackergarten community event. https://ch.linkedin.com/in/aalmiray

Why Attend the NFJS Tour?

  • » Cutting-Edge Technologies
  • » Agile Practices
  • » Peer Exchange

Current Topics:

  • Languages on the JVM: Scala, Groovy, Clojure
  • Enterprise Java
  • Core Java, Java 8
  • Agility
  • Testing: Geb, Spock, Easyb
  • REST
  • NoSQL: MongoDB, Cassandra
  • Hadoop
  • Spring 4
  • Cloud
  • Automation Tools: Gradle, Git, Jenkins, Sonar
  • HTML5, CSS3, AngularJS, jQuery, Usability
  • Mobile Apps - iPhone and Android
  • More...
Learn More »