Useful Tips

How to enable Java or JavaScript in different browsers?

Pin
Send
Share
Send
Send


Java Is a programming language and computing platform first released by Sun Microsystems in 1995. This is the underlying technology on which many modern programs are based (including utilities, games, and business applications). Java runs on more than 850 million personal computers and billions of devices (including mobile phones and televisions) worldwide.

Why is Java needed?

There are many applications and websites that will work only if you have Java installed and their number is constantly growing. Java provides performance, security, and reliability. Java is used everywhere: from laptops to data centers, from game consoles to scientific supercomputers, from mobile phones to the Internet!

Java versions

At the moment, there are many implementations of the Java platform, of which two are popular - the open version of OpenJDK and Oracle Java. The main differences between these versions are that Oracle Java contains some proprietary components, as well as patent protected components. OpenJDK is an implementation of the Java specifications with full open source code. Starting with version 7, OpenJDK is the reference implementation of Java SE. For most users, it doesn’t make much difference which version of Java to use, but in some cases, Oracle’s closed implementation is doing its best.

Java installation

You can install the latest version of JRE by clicking on the link on the left or by entering the following command in the terminal:

You can install the latest browser plugin by clicking on the link on the left or by typing the following command in the terminal:

You can install the latest version of the documentation package by clicking on the link on the left or by entering the following command in the terminal:

Installing Oracle Java with a third-party script from the webupd8.org project (JRE and JDK)

Due to the fact that Oracle has changed the distribution conditions for its Java implementation, the Ubuntu repository does not contain Oracle Java components. There is a PPA organized by webupd8.org that contains a program that will automatically check the Java version on the Oracle website and compare it with the version installed on your computer. This circumvents the restrictions imposed on the distribution of Oracle Java.

To add this repository and use the latest Java version from the Oracle site, perform the following actions in the terminal:

In addition, this repository changes the dependencies of packages that use Java, so that it becomes possible to safely remove OpenJDK from the system.

Check the installed version:

The installer requires confirmation of the license if you want accept license automaticallythen run the command:

Switch between versions of Java. You can install Java 7 or another version with the command:

After that, you can switch between versions of Java using commands. Switching to Java 7:

Switching to Java 8:

For automatically set environment variables you can execute the command:

Therefore, as an option, if you do not have programs using them, then do not install them.

If you are switching between different versions of Java, you must also reinstall this package. There are no similar packages for OpenJDK, so you will have to specify environment variables for it manually

Or by the command (added by the command export valid only until reboot)

The PATH variable must depend on JAVA_HOME and JRE_HOME, as shown in the command below. Teams with export must be typed in the console and then they will be valid until the system reboots. Or added to the end of the file / etc / profile and then they will act after rebooting the system.

Then, to quickly switch to other pre-existing environments when changing Java versions, you need to change only these environment variables:

Probably This script sets the PATH variable just like that, so you don’t need to change it and you only need to execute the last three commands.

Installing different versions of Java through the graphical menu can be made by a third-party script from Bruce Ingalls.

Installing a script from the repository:

Or install manually:

After that run the script:

For uninstall java 8 run the command:

What is the difference

Let's start with a simple explanation of what the difference between the two technologies above is. Java is a technology designed to develop applications that can work autonomously or through browsers.

With regard to JavaScript, everything is similar, with the exception of battery life. This technology is aimed only at browsers. The script is initially placed in HTML files, where it ensures stable operation and data exchange between web pages and the browser.

To supplement the information received, we give an example of the main differences between these languages.

  • Unlike Java, JavaScript comes in text format, which is much easier than doing additional compilation.
  • The confident work of each technology is to connect different modules.
  • The algorithms for working languages ​​are completely different and contain almost nothing in common.

Working with the Java Plugin

Before you start working with the plugin, you need to download it from an official source located at https://java.com/ru/download/. As a precaution, disable the firewall of your antivirus, otherwise there is a chance of blocking the download.

  • As soon as you follow the provided link, a window will open where there will be a red button with the inscription "Download Java for free."
  • Click on it and wait for the download to finish.
  • Run the source file.
  • A small launcher window will appear where you need to click “Install”.

After a short installation, the plugin will be available for use on your computer.

Internet explorer

  • In the upper right corner is the gear you need to click on.
  • A small menu will appear, select “Internet Options”.
  • Here you need to find the “Security” section and click on “Other”.
  • Rotate the window that appears until the talking block “Run Java application scripts” appears in front of you.
  • You can enable it using the mark on the left.
  • Save the new settings and exit, allow the "OK" key.

Google chrome

The developers of the project limited access to work with plugins after the release of 42 browser versions in 2015. In simple words, it will not be possible to launch Java using improvised means.

This web browser has left users the opportunity to independently adjust many aspects of the program.

  • First, go to your browser settings.
  • Select “Service”, and then refer to the “Plugins” block.
  • Here is the talking name "Java". It is necessary to click on it.
  • Pay attention to the set value. For the extension to work, the option "Always activate" or "Request activation" must be set. It changes depending on the wishes of the user.

Mozilla firefox

In this case, everything is much simpler compared to the options above.

  • Open the tool menu and select “Settings”.
  • We need the “Content” block, it is the third on the list.
  • Visit it, check the box next to "Use JavaScript."
  • Confirm the action using the OK button.

Yandex browser

The domestic project requires a little more time to move to the control menu.

  • Visit the “More” submenu, shown as three lines.
  • Rotate the window that opens to the very bottom until you come across “Show advanced settings”.
  • Get "Personal Information." Select "Configure Content."
  • There is a section dedicated to Java Script, in it you need to put a check mark next to the item "Allow JavaScript on all sites."
  • It remains to click "Finish."

If necessary, the script can be configured for individual Internet resources, it is enough to devote a little time to the settings for "Exception Management".

Everything is as simple as possible here:

  • Visit the Settings section.
  • Directly go to the "Advanced" tab and switch to the "Contents" item. Check the box next to "Enable JavaScript."

Pin
Send
Share
Send
Send