Andre's Blog

20170525 Raspberry Pi - Developer Tools 2 - Java Gradle Git

[RASPBERRY PI] [LINUX]

[JAVA] [GRADLE] [GIT]

[RASPBERRY PI - DEVELOPER TOOLS]

In this post I explain how I have set up Java, Gradle and Git on my Raspberry Pi.

My initial reason to start working with the Pi was :

I want to be able to develop, compile and debug my blog and my other software while I am in the bus or in the tube.

Installation of Java and Gradle is the same as under Ubuntu, download and unpack them and put their bin folders into the path in .bashrc.

The Raspbian/Jessie light default image is 32bit, and since I use the 32 bit image I use jdk-8u121-linux-arm32-vfp-hflt.tar.gz.

I don't link it here, better google for Java SE 8 Archive Downloads to find a current version.

I googled reasons for why the default images on the Pi are 32bit, though 64bit is supported. I have found these articles :

RASPBERRY PI: Der mit dem 64-Bit-Kernel tanzt

Raspberry Pi 3 Still Essentially a 32-Bit SBC For Now

Gradle does not differ the architectures, you get it from here.

This is how I have put Java and Gradle into the path in .bashrc :

JAVA_HOME=/home/pi/bin/jdk1.8.0_121
GRADLE_HOME=/home/pi/bin/gradle-3.4.1/bin
export PATH=$PATH:$JAVA_HOME/bin:$GRADLE_HOME

Now to Git. I have set up one server repo (origin) on the Pi, to be able to sync Ipad and Pi :

$ mkdir gitserver
$ cd gitserver
$ mkdir piblog.git
$ cd piblog.git
$ git init --bare --shared
$ cd ..
$ chmod -R o+w piblog.git

and then I have cloned it on the Pi to use it there

$ cd /mnt/usbstickext4/pi/gitrepo
$ git clone ssh://pi@10.0.0.51/home/pi/gitserver/piblog.git

and on my Mac I created a clone the same way and then created from that clone another origin on my Synology as backup :

$ git remote add piblogorigin ssh://amos@10.0.0.42/volume1/homes/amos/gitrepo/piblog.git
$ git push piblogorigin
$ git pull piblogorigin master
$ git push piblogorigin master
$ git remote

The output of git remote is now

origin
piblogorigin

Select where to go ...


The Blog
My Technical Blogs
Projects
Blogs Of Friends
RSS
CV/About
Me