Saturday, May 20, 2017

Be ready and prepare Raspberry Pi for Java 9

   Java 9 is coming soon with many new features. Aside of continued discussion about Project Jigsaw impact, it's time to get prepared.
This article helps you to prepare your RaspberryPi environment with multiple installed JDKs.
Whole process is quite straight forward: 

The first step is to download the last stable release of java jdk-9. 
In the article we use the most recent build: jdk-9+170


You can download JDK directly into your RapsberryPi or your local machine and then by using $scp command upload it to your RaspberryPi machine
$scp ./jdk-9-ea+170_linux-arm32-vfp-hflt_bin.tar.gz pi@<raspberrypi_ip>/home/pi

The next step is to login into your RaspberryPi machine  
$ssh pi@<raspberry_ip>

To unzip the downloaded JDK file execute following command:
$ sudo tar zxvf jdk-9-ea+170_linux-arm32-vfp-hflt_bin.tar.gz -C /opt

The command extracts the jdk-9 into the /opt folder

Now link java and javac with newly available JDK
$ sudo update-alternatives --install /usr/bin/javac javac /opt/jdk-9/bin/javac 1
$ sudo update-alternatives --install /usr/bin/java java /opt/jdk-9/bin/java 1

by using following command we select the jdk-9 available for us under the number 1
$ sudo update-alternatives --config javac
$ sudo update-alternatives --config java

at the end we verify our current java version by:
$ java -version
java version "9-ea"
Java(TM) SE Runtime Environment (build 9-ea+170)
Java HotSpot(TM) Client VM (build 9-ea+170, mixed mode)

$ javac -version
javac 9-ea


Congratulation your RaspberryPi is now running on Java 9 and you can switch between JDKs.

53 comments:

  1. I have to voice my passion for your kindness giving support to those people that should have guidance on this important matter.
    Java Training in Marathahalli

    ReplyDelete
  2. That was a very nice and interesting post.

    Please click on the link below.
    Advanced Excel Courses in Bangalore

    ReplyDelete
  3. This comment has been removed by the author.

    ReplyDelete
  4. Really awesome blog. Your blog is really useful for me. Thanks for sharing this informative blog. Keep update your blog...Java Training in Chennai
    Java Training Institute in Chennai

    ReplyDelete
  5. I simply wanted to write down a quick word to say thanks to you for those wonderful tips and hints you are showing on this site.
    AWS Training in Bangalore

    ReplyDelete
  6. Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging. If anyone wants to become a Java developer learn from Java Training in Chennai. or learn thru Java Online Training from India . Nowadays Java has tons of job opportunities on various vertical industry.

    ReplyDelete
  7. Hi Thanks for the nice information its very useful to read your blog. We provide best Software Services

    ReplyDelete
  8. I have to voice my passion for your kindness giving support to those people that should have guidance on this important matter.

    white label website builder

    ReplyDelete
  9. wow...nice blog, very help full information. Thanks for sharing.
    Best Mobility Services | Austere Technologies

    ReplyDelete
  10. The administration robots are divided into expert and administration robots in view of their item writes. کوادکوپتر

    ReplyDelete
  11. Your good knowledge and kindness in playing with all the pieces were very useful. I don’t know what I would have done if I had not encountered such a step like this.nebosh fire certificate in chennai

    ReplyDelete
  12. Great article, really very helpful content you made. Thank you, keep sharing.

    Internet Of Things Services | Austere Technologies

    ReplyDelete
  13. Really great blog, it's very helpful and has great knowledgeable information. Thanks for sharing.

    Best Software Company | Austere Technologies

    ReplyDelete
  14. Very good informative article. Thanks for sharing such nice article, keep on up dating such good articles.

    Mobility Services | Austere Technologies

    ReplyDelete
  15. I strongly believe that there will be great opportunities for those who looked into this area...
    Best Online Software Training Institute | Java Training

    ReplyDelete

  16. Pretty blog, so many ideas in a single site, thanks for the informative article, keep updating more article.
    Webdesining course in chennai

    ReplyDelete
  17. I ‘d mention that most of us visitors are endowed to exist in a fabulous place with very many wonderful individuals with very helpful things.
    safety course in chennai

    ReplyDelete
  18. Great blog created by you. I read your blog, its best and useful information. You have done a great work. Super blogging and keep it up
    Java training in chennai

    ReplyDelete
  19. Nice blog with excellent information. Thank you, keep sharing.

    Best Commerce College| Avinash college of commerce

    ReplyDelete
  20. I think this is the best article today. Thanks for taking your own time to discuss this topic, I feel happy about that curiosity has increased to learn more about this topic. Keep sharing your information regularly for my future reference.
    Java Courses in chennai

    ReplyDelete
  21. Very good informative article. Thanks for sharing such nice article, keep on up dating such good articles.

    Best chartered accountant course in Hyderabad | Avinash college of commerce

    ReplyDelete
  22. Pretty article! I found some useful information in your blog, it was awesome to read, thanks for sharing this great content to my vision, keep sharing..
    java training in chennai
    java course in chennai

    ReplyDelete
  23. Its quite interesting! Informative and Impressive blog. Thanks for sharing such useful information.

    Java training in Chennai

    ReplyDelete
  24. Hi Thanks for the nice information its very useful to read your blog. We provide best System Integration Services

    ReplyDelete
  25. Thank you for sharing this valuable information. But get out this busy life and find some peace with a beautiful trip. book best Andaman honeymoon packages

    ReplyDelete
  26. Thank you for sharing this valuable information. But get out this busy life and find some peace with a beautiful trip. book ANDAMAN TRIP @ 7999

    ReplyDelete
  27. Hi Thanks for the nice information its very useful to read your blog. We provide best Association Of Chartered Certified Accountants

    ReplyDelete
  28. Hi Thanks for the nice information its very useful to read your blog. We provide Software Development Services

    ReplyDelete
  29. Thank you for sharing this valuable information. But get out this busy life and find some peace with a beautiful trip. book ANDAMAN TOUR PACKAGE@14599/

    ReplyDelete
  30. Hi Thanks for the nice information its very useful to read your blog. We provide best financial education

    ReplyDelete
  31. The young boys ended up stimulated to read through them and now have unquestionably been having fun with these things.
    fire and safety course in chennai

    ReplyDelete
  32. Hi Thanks for the nice information its very useful to read your blog. We provide best Certified Financial Analyst

    ReplyDelete
  33. This is an awesome post. Really very informative and creative contents. This concept is a good way to enhance the knowledge. Excellent post.

    aws training in bangalore

    java training in bangalore

    ReplyDelete
  34. Hi Thanks for the nice information its very useful to read your blog. We provide best Certified Public Accountant

    ReplyDelete
  35. Hi Thanks for the nice information its very useful to read your blog. We provide best Cost And Management Accountancy (CMA)

    ReplyDelete
  36. Hi Thanks for the nice information its very useful to read your blog. We provide best company secretary course

    ReplyDelete
  37. You made such an interesting piece to read, giving every subject enlightenment for us to gain knowledge. Thanks for sharing the such information with us

    java training in chennai

    ReplyDelete
  38. Your article gives lots of information to me. Thanks for sharing.
    acca course in hyderabad | ISFS

    ReplyDelete
  39. This is an awesome post. Really very informative and creative contents. This concept is a good way to enhance knowledge. I like it and help me to development very well. Thank you for this brief explanation and very nice information. Well, got good knowledge.
    WordPress website development Chennai

    ReplyDelete
  40. Thanks for sharing a valuable information to us. Thanks for your blog.
    CIMA training institute in Hyderabad | ISFS

    ReplyDelete