Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java Browser Plugin Or Manually installing Java

Here is my question i installed Java Plugin for Chrome it does mean i have installed java in my machine...And after installing this plugin can i run below command

java -jar myfile.jar

through a batch file or i have to install java in my machine and setup class-path then it should work?

If i will install Java browser plugin it automatically installed java in my machine and setup path as well.

Its hard for me t understand the situation how it works. Can anyone help me on this?

like image 437
subodh joshi Avatar asked Nov 11 '22 14:11

subodh joshi


1 Answers

The JRE is the Java Runtime Environment, i.e. the software you need to interpret and execute Java class files. The Java browser plugin is the bridge between the JRE and the browser, used to run Java classes of applets embedded in HTML.

You can check the Java plugin of Chrome browser in this link.

The plugin is bundled with the JRE, and runs inside a browser, allowing Java code to run inside the browser process on the client. The main entry point class must be written as an Applet when the plugin is used, but all the Java code it calls can be just regular Java.

There are limitations when running Java code with the Java plugin for security reasons. All code shall run within sandbox with limited access to the file system and such.

Also as the plugin check for installed JRE version at your machine, that means you do have JRE. You can install as many JDKs as you like. Just put them in different folders.

The one you refer to on the path is your choice - but presumably you'd choose the one that you want to use whenever you type "java ...." commands at the command line. In the absence of any other factors you should probably set this to be your most recent JDK version.

Note that your IDE may support multiple JDKs, for example Eclipse has "Preferences / Java / Installed JREs" where you can set up multiple JDKs/JREs for use with Eclipse

like image 191
Aditya Avatar answered Nov 15 '22 11:11

Aditya