How To Install Groovy On Ubuntu
Friends, in this postal service, we volition show you how to install Apache Dandy on Ubuntu 20.04 / Debian 10.
Citing Groovy's website nosotros get the following explanation:
Slap-up is a powerful, optionally typed and dynamic language, with static-typing and static compilation capabilities, for the Java platform aimed at improving developer productivity thanks to a concise, familiar and easy to learn syntax.
Therefore, it is possible to say that Cracking is a kind of evolution of Java, but it is not a different linguistic communication. Some of the features of Apache Great are the following:
- Pretty depression learning bend. Thank you to the articulate and readable syntax it has.
- Also, Groovy integrates perfectly with whatever Java application.
- It has a very complete and varied ecosystem.
So knowing nigh Groovy is a skillful idea if you similar Java very much or if y'all want to specialize in information technology.
Install Corking on Ubuntu xx.04 / Debian 10
Like almost everything in Linux, the installation of Groovy tin be done in several ways. And then you lot tin can choose which ane suits y'all best and have your criteria.
Earlier you start, recollect that Groovy requires y'all to take Java installed on your organization. So make certain yous practice.
:~$ sudo apt install openjdk-11-jdk Reading package lists... Done Building dependency tree Reading state information... Done The post-obit additional packages will be installed: adwaita-icon-theme at-spi2-core ca-certificates-java fontconfig fonts-dejavu-actress glib-networking glib-networking-common glib-networking-services gsettings-desktop-schemas gtk-update-icon-cache hicolor-icon-theme java-common libatk-bridge2.0-0 libatk-wrapper-coffee libatk-wrapper-java-jni libatk1.0-0 libatk1.0-data libatspi2.0-0 libcairo-gobject2 libcroco3 libdatrie1 libepoxy0 libfribidi0 libgail-common libgail18 libgdk-pixbuf2.0-0 libgdk-pixbuf2.0-bin libgdk-pixbuf2.0-common libgif7 libgraphite2-three libgtk-3-0 libgtk-3-bin libgtk-iii-mutual libgtk2.0-0 libgtk2.0-bin libgtk2.0-common libharfbuzz0b libice-dev libjson-glib-1.0-0 libjson-glib-1.0-common libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libproxy1v5 libpthread-stubs0-dev librest-0.7-0 librsvg2-2 librsvg2-common libsm-dev libsoup-gnome2.4-ane libsoup2.4-one libthai-data libthai0 libwayland-client0 libwayland-cursor0 libwayland-egl1 libx11-dev libxau-dev libxcb1-dev libxcursor1 libxdmcp-dev libxkbcommon0 libxt-dev openjdk-11-jdk-headless openjdk-11-jre openjdk-11-jre-headless x11proto-core-dev x11proto-dev xorg-sgml-doctools xtrans-dev Suggested packages: default-jre gvfs libice-dr. librsvg2-bin libsm-doc libx11-doc libxcb-doc libxt-doc openjdk-xi-demo openjdk-xi-source visualvm fonts-ipafont-gothic fonts-ipafont-mincho fonts-wqy-microhei | fonts-wqy-zenhei fonts-indic The following NEW packages will exist installed: adwaita-icon-theme at-spi2-core ca-certificates-java fontconfig fonts-dejavu-actress glib-networking glib-networking-common glib-networking-services gsettings-desktop-schemas gtk-update-icon-enshroud hicolor-icon-theme java-common libatk-bridge2.0-0 libatk-wrapper-coffee libatk-wrapper-java-jni libatk1.0-0 libatk1.0-data libatspi2.0-0 libcairo-gobject2 libcroco3 libdatrie1 libepoxy0 libfribidi0 libgail-mutual libgail18 libgdk-pixbuf2.0-0 libgdk-pixbuf2.0-bin libgdk-pixbuf2.0-common libgif7 libgraphite2-3 libgtk-3-0 libgtk-3-bin libgtk-three-common libgtk2.0-0 libgtk2.0-bin libgtk2.0-common libharfbuzz0b libice-dev libjson-glib-1.0-0 libjson-glib-ane.0-common libpango-1.0-0 libpangocairo-i.0-0 libpangoft2-1.0-0 libproxy1v5 libpthread-stubs0-dev librest-0.7-0 librsvg2-two librsvg2-common libsm-dev libsoup-gnome2.4-1 libsoup2.iv-1 libthai-data libthai0 libwayland-client0 libwayland-cursor0 libwayland-egl1 libx11-dev libxau-dev libxcb1-dev libxcursor1 libxdmcp-dev libxkbcommon0 libxt-dev openjdk-11-jdk openjdk-11-jdk-headless openjdk-11-jre openjdk-eleven-jre-headless x11proto-cadre-dev x11proto-dev xorg-sgml-doctools xtrans-dev 0 upgraded, 71 newly installed, 0 to remove and 0 non upgraded. Need to become 288 MB of archives. Afterward this operation, 527 MB of additional disk space will be used. Do you want to continue? [Y/due north]
Now, yous tin keep.
Installing Groovy from the official Ubuntu 20.04 / Debian 10 repositories
Smashing is becoming more pop every day, and this makes Debian include it in its repositories. This method although quite like shooting fish in a barrel and oriented to newcomers, may not be completely useful because you practise not get the latest stable version.
And so, open up a terminal and install it with the following control:
:~$ sudo apt update :~$ sudo apt install groovy
If you practise not have sudo enabled on Debian, y'all can do it with our tutorial.
How to enable sudo on Debian 10?
And so, y'all can show the installed version with the post-obit command
:~$ nifty -5
And that's it. As I said, this method, although easy, is not always convenient because we miss the news of the language.
Swell is available at Homebrew
We talked about Homebrew recently and it is that this community parcel manager, saves us a lot of fourth dimension to get contempo versions of applications that are not in the official repositories of some distributions.
So Groovy is available for installation using Homebrew. You have to install it first.
How to install Homebrew on Ubuntu 20.04 / Debian ten?
And and then, only run the following command:
:~$ mash install groovy
This method is also easy but as it is a third political party, not many developers prefer it.
Install Groovy using SDKMAN!
The method that combines simplicity and security is this. Using SDKMAN we tin can become Groovy installed on well-nigh any organisation. We are talking about a powerful script that does all the work for u.s.a..
And so let'due south go for it.
Get-go, open up a terminal and run this command to download and execute the script.
:~$ curl -s get.sdkman.io | bash
If y'all exercise not have curl installed, y'all can practice it with the post-obit control:
:~$ sudo apt install curl
This script downloads and installs SDKMAN and modifies some things in your profile. So, refresh the changes with the following control:
:~$ source "$HOME/.sdkman/bin/sdkman-init.sh"
Now, proceed to install Bang-up on Ubuntu 20.04 / Debian ten.
:~$ sdk install peachy
After the installation is consummate, you can brandish the version of Groovy or another choice:
:~$ dandy -five
And that's it.
Install Not bad on Ubuntu 20.04 / Debian x using a binary distribution
Some other way to install it is through the binary package compiled for Linux or whatever organisation with Java.
This procedure guarantees greater flexibility because we can copy it wherever we want and also guarantees to have the last stable version of Bang-up.
Peradventure this method is a little more complex than the previous ones, but it is the best for many developers.
Then, open a terminal and download the zippo file with the programme. You can practise this from the temporary folder.
:~$ cd /tmp/ :~$ wget -c https://bintray.com/antiquity/download/groovy/maven/apache-neat-binary-3.0.iv.cypher
At the fourth dimension of this mail service, the last stable version of Groovy is iii.0.4, check it before executing the commands.
Afterwards the download is finished, yous can unzip it using the unzip command. We'll take advantage of this, to unzip information technology in a different and permanent folder like /opt/
:~$ sudo unzip apache-corking-binary-3.0.4.aught -d /opt/bully
In case you practise not have the unzip command installed, just install it.
:~$ sudo apt install unzip zip
Afterward that, modify your contour file and add the path where you unzipped Peachy. In this case, information technology would look like this
:~$ nano ~/.profile
export JAVA_HOME=/usr/lib/jvm/java-one.xi.0-openjdk-amd64 consign GROOVY_HOME=/opt/dandy/groovy-3.0.four/ consign PATH=$GROOVY_HOME/bin:$PATH
Save the changes and close the file.
Utilise the changes with the following command:
:~$ source ~/.contour
And at present I do. Now Groovy is set up for battle. You can check the functioning of the command, for example past showing the help it provides:
:~$ groovy --assistance Usage: groovy [options] [filename] [args] The Groovy command line processor. -cp, -classpath, --classpath=<path> Specify where to find the class files - must be first argument -D, --define=<holding=value> Ascertain a organization property --disableopt=optlist[,optlist...] Disables 1 or all optimization elements; optlist tin be a comma separated listing with the elements: all (disables all optimizations), int (disable whatsoever int based optimizations) -d, --debug Debug mode will print out full stack traces -c, --encoding=<charset> Specify the encoding of the files -e=<script> Specify a command line script -i=[<extension>] Modify files in place; create backup if extension is given (east.g. '.bak') -northward Procedure files line by line using implicit 'line' variable -p Procedure files line by line and impress outcome (see likewise -n) -pa, --parameters Generate metadata for reflection on method parameter names (jdk8+ only) -pr, --enable-preview Enable preview Java features (JEP 12) (jdk12+ only) -fifty=[<port>] Heed on a port and procedure inbound lines (default: 1960) -a, --autosplit[=<splitPattern>] Split lines using splitPattern (default '\southward') using implicit 'split' variable --indy Enables compilation using invokedynamic --configscript=<script> A script for tweaking the configuration options -b, --basescript=<class> Base class name for scripts (must derive from Script) -h, --help Evidence this help message and exit -v, --version Print version information and exit
So, enjoy it.
Conclusion
Apache Bully does not replace Java but rather reinforces its use and utility thanks to information technology. With Neat you can implement a unproblematic, fast and expressive language that is capable of existence compatible with Java and thus facilitate the creation of applications.
Please share this post and join our Telegram channel.
Source: https://www.osradar.com/install-apache-groovy-ubuntu-debian/
Posted by: fitchsaylover.blogspot.com
0 Response to "How To Install Groovy On Ubuntu"
Post a Comment