What is JShell?

Small overview of fupcoming first official Java REPL
31 August 2017   1519

JShell is Java’s first official REPL (READ-EVAL-PRINT-LOOP) tool. It is part of JDK 9 is going to be released in September 2017.

JShell REPL creates a simple programming environment in the command line that can:

  • read user's input
  • evaluate it
  • print the result
  • repeat the cycle

It works similar to Python interpreter or other JVM languages that have a REPL like Scala, Kotlin and Groovy.

You can write Java language expressions and statements in the JShell REPL, and they will be evaluated on their own without having to wrap them in classes or methods.

Let's take a look how to start with JShell.

As mentioned above, JShell is a part of upcoming Java 9. But eraly access is already available. 

When JDK 9 is installed, type jshell in your terminal to start a JShell session -

$ jshell
|  Welcome to JShell -- Version 9
|  For an introduction type: /help intro

jshell> 

An interactive JShell session will be started and JShell will greet you with a welcome message.

Learn more with this tutorial

New Vulnerability to be Found in Google+

Due to this vulnerability it was possible to obtain private information of 52.5 million accounts
11 December 2018   136

Google decided to close the social network Google+ not in August 2019, but in April. The reason was another vulnerability in the API, due to which it was possible to obtain private information of 52.5 million accounts. The company plans to close the social network API until mid-March 2019.

By December 10, 2018, the following error information was published:

  • Third-party applications requesting access to profile data, because of the bug in the API, received permission to view information, even if it is hidden by privacy settings;
  • the names of users, their email addresses, information about occupation, age and other confidential information were at risk;
  • passwords, financial data and national identification numbers have not been compromised;
  • the company has no evidence that anyone has exploited the vulnerability;
  • the error was fixed within 6 days: from November 7 to November 13, 2018.
  • Google said it sends notifications to all users affected by the bug.

The previous data leak of Google+ users occurred in October 2018. Then about 500 thousand accounts were compromised. The attackers could get the names, email addresses, age, gender and occupation of users.