Create Your First Groovy Program in IntelliJ IDEA



Enroll in The Complete Apache Groovy Developer Course for only $20 http://bit.ly/2avWVTP

In this video we introduce you to my favorite IDE IntelliJ IDEA. We are going to open this for the first time and talk about how to use it to write groovy scripts and programs.

Please Subscribe to this channel and leave a comment below.

Blog: http://therealdanvega.com/blog
Facebook: http://www.facebook.com/therealdanvega
Twitter: http://www.twitter.com/therealdanvega

source

10 thoughts on “Create Your First Groovy Program in IntelliJ IDEA”
  1. If you are using Java 9/10/11 then make sure you have entered following in the VM Options:
    –add-opens=java.base/java.lang=ALL-UNNAMED –add-opens=java.base/java.lang.invoke=ALL-UNNAMED
    (VM Options located inside Run Configurations menu)

    Also you have to add JAXB dependencies if you are using Groovy 2.5.3 + Java 11
    Groovy comes with extra JAXB Jars so we can add them:
    Project Structure->Modules->Dependencies-> + -> JARs or directories
    Select folder:
    groovy-2.5.7(here version for example)/lib/extras-jaxb

  2. Hey Dan, what book do you recommend to study groovy in a more advance way (considering that 2.5 is out)? I took your course which was pretty cool and now I would like to continue studying in depth, I feel that didn't reach even 10% of groovy power.

  3. When you get to the part where you select Groovy Library my newer version of IntelliJ uses the macOS native dialog rather than the Java based file dialog on this video so it drove me metal trying to figure out how to get it to see the .sdkman directory!

    I eventually figured out that there is a shortcut cmd+Shift+. which shows hidden files! Then you navigate to /Users/<your login>/.sdkman/candidates/groovy/2.4.15 (or whatever current version is).

    Then, you can select your Groovy library.

  4. honestly I've been trying to see what the hype is for intellij and why someone would pay for it when eclipse is an awesome and intuitive development tool. so far I have been fighting issues like autocompletion not working for .groovy classes and just way too much configuration when I'd rather just code. also I do not see any way to create simple jUnit tests like when I just right click a class in eclipse and choose create jUnit test (which also brings in jUnit jars if needed)… so simple and nothing like that in intellij

  5. What d'you do if you used Homebrew to install Groovy? I've been pointing it variously at the groovy base direction under /usr/local/Cellar/groovy/2.4.7 – which gets nothing, no error message & no groovy library – and the libexec directory under that, which gets an error message where IDEA says it can't determine the version of Groovy I'm using.

Leave a Reply

Your email address will not be published.

Captcha loading...