Can you run it java plugin

How to use the Java plugin in Firefox 52 in Ubuntu?

Firefox disabled NPAPI plugins in release 52, with the exception of the Flash plugin. This means you can no longer use the Java plugin.

To continue using the Java plugin, you need to switch to Firefox 52 ESR which still supports it.

In case you wish to keep using the current (most up-to-date) version of Firefox but also install Firefox 51 (FF 51) in parallel, so you can use FF 51 when you need to use the JRE (Java NPAPI) plugin, you can follow these steps:

  1. Open a shell terminal window as a common user (not root / superuser!) and then run this command in order to create an «applications» folder:
sudo killall firefox ; if [ `getconf LONG_BIT` == 64 ]; then wget https://ftp.mozilla.org/pub/firefox/releases/51.0/linux-x86_64/en-US/firefox-51.0.tar.bz2 -O ~/applications/ff51.tar.bz2; else wget https://ftp.mozilla.org/pub/firefox/releases/51.0/linux-i686/en-US/firefox-51.0.tar.bz2 -O ~/applications/ff51.tar.bz2; fi; cd ~/applications ; tar -xvf ~/applications/ff51.tar.bz2 ; rm ~/applications/ff51.tar.bz2 ~/applications/firefox/updater* 
  • Note: the above command downloads FF 51 in United States’ English ( en-US ). If e.g. you want the Brazilian Portuguese version, replace en-US by pt-BR on the command above. The same logic applies to other languages. A full list of ISO language-country codes available for FF 51 can be found here.
if [ ! -d ~/.mozilla ]; then mkdir ~/.mozilla; fi; if [ ! -d ~/.mozilla/plugins ]; then mkdir ~/.mozilla/plugins; fi; chmod -R 770 ~/.mozilla 
if [ `getconf LONG_BIT` == 64 ]; then sudo ln -sf $(echo $(which java) | rev | cut -c10- | rev)/lib/amd64/libnpjp2.so ~/.mozilla/plugins/sunjava; else sudo ln -sf $(echo $(which java) | rev | cut -c10- | rev)/lib/i386/libnpjp2.so ~/.mozilla/plugins/sunjava; fi 
sudo ln -sf ~/applications/firefox/firefox /usr/bin/firefox51 
sudo cp `find /usr/share/applications -iname '*firefox*.desktop' -print -quit` /usr/share/applications/firefox51.desktop ; sudo sed -i -e 's|Exec=firefox \%u|Exec=firefox51 -P ff51 \%u|' "/usr/share/applications/firefox51.desktop" ; sudo sed -i -e 's|Exec=firefox -new-window|Exec=firefox51 -P ff51 -new-window|' "/usr/share/applications/firefox51.desktop" ; sudo sed -i -e 's|Exec=firefox -private-window|Exec=firefox51 -P ff51 -private-window|' "/usr/share/applications/firefox51.desktop" ; sudo sed -i -e 's|Firefox|Firefox 51|' "/usr/share/applications/firefox51.desktop" 
  • Note: if you want the above «supercommand» to have a slight chance to work, it is mandatory that you have a current version of Firefox installed, because the first thing the above command does is to look for a firefox.desktop file in /usr/share/applications/ , and the only chance of such file existing is if you have the current Firefox version installed (besides of FF 51).
  • If you want to see a full list of the about: URLs used by Firefox, just go to about:about. I particularly find about:mozilla pretty interesting (and weird, at the same time).
  • «With great power comes great responsibility»: some about: URLs let you do things that can break your browser. Be careful. You have been warned.
Читайте также:  Ссылки на странице

Источник

How can I run «Can You RUN It» app?

I have used Ubuntu for quite some time now, but I’m having issues with this program I want to use. I recently build a new computer, and wanted to use Ubuntu (because it’s great), the problem is, I want to know if my new PC can handle the games I’m going to play in the near future. The website I use is called Can You RUN It. The ways to see if you can run it are 2 ways, using Java, or using the desktop app. I downloaded the desktop app and ran it with Wine. For some strange reason, it showed the PC components I used for my last build. It didn’t show the new components. I then went and installed IcedTea Java plugin for my Mozilla Firefox, but no luck. How do I use this program for Ubuntu?

Their website didn’t even ask to activate the Java plugin, so I’m not sure what’s going on there. The desktop app was able to grab everything except my graphics card. Is there a reason you need to use a program instead of just looking up the recommended system requirements?

Do you use Wine for any other programs? If not, try running winetricks, select the default prefix, and delete all data and applications. That should clean out any old data and force the detection program to find your hardware.

Looking at that website, it just give you and easy way to see your hardware specs. As you built the computer, you should know what it’s hardware is. when you enter a game name, and click the «can you run it» button, the bottom of the popup is an option to see the game requirements yourself. You can them compare it to your hardware specs. I’m not sure how that will help you however. When I did a quick search for Alien:Isolation. which I have so I know is Linux ported, it does not mention Linux as an option so you will have no way of knowing if the game will actually work on linux.

Читайте также:  How to convert char to int in javascript

Additionally to TrailRider’s words I’d say that the site seems to be buggy. Besides the system requirements being incomplete, their Java applet also never works — instead it just goes out with «Timeout». And they have no the obvious button like «Contact us» or «Report a problem». No surprise, actually — they’re saying that the site is beta. So, you can’t rely on this site, at least not yet.

1 Answer 1

Well Can You Run It is a system requirements checking tool for any game for Windows. Basically it downloads and run a desktop app on your computer which you have to run it on your computer. This app then detects your hardware configuration and matches against the selected game requirements.

Note: The desktop app does not require you to install Java but make sure you have the latest version of the supported browsers.

If your hardware configuration is equal or above the game requirements then the result displayed on your browser is OK which means you can run that game otherwise a negative result is displayed suggesting you the necessary changes to for your hardware upgrade. I have written a complete guide on using this tool which you can find here.

Источник

How to download and install Java plugin in a browser

Java applets (Plugins) were introduced in the first version of Java. From early 2010 major browsers started avoiding Java applets because of security constraints and difficulty with the underlying platforms. Java Applets are deprecated in Java 9 and are completely removed from Java 11.

Applets are usually written in Java. However, they can even be written with any other language run on JVM like Jython, Scala, Pascal, JRuby and so on.

Some advantages of Java Applets are as below,

  • They can run much faster compared Javascript
  • Since they run as a separate process on JVM, they get access to all the system resources including hardware
  • Till the canvas support came into existence applets were the favorite to render 3D graphics
  • Cross-platform, once created can be run on any platform

It is important to note that, in modern browsers, Java support has to be enabled manually as Java isn’t enabled by default.

2. Enable Java support in browsers

In this section, we will see how Java can be enabled in various browsers on the Windows platform.

2.1. Internet Explorer

  1. Click on Tools menu and click on Internet Options
  2. Go to Security tab and click on Custom Levels
  3. In the new popup scroll to Scripting section and enable/disable Java by going to the section Scripting of Java Applets

2.2. Google Chrome

  1. Click on the wrench icon on the far right of the address bar
  2. On the menu click on Settings
  3. Click on Advanced settings at the end of the Settings menu
  4. Click on Content Settings
  5. Scroll down to Plug-ins and look for Java and click on Disable link to turn on/off the Java plugins

2.3. Mozilla Firefox

  • Click on the little hamburger icon (Tools menu) on the far right next to address bar and choose Add-Ons menu
  • Click on Plugins from the left side menu and scroll down to the bottom
  • Click on Java Applet Plugins to enable/disable Java plugins

2.4. Safari

  • Go to Preferences
  • Click on Security
  • Scroll down to Enable Java. Enable or Disable by clicking on the checkbox

3. Java Plugin Example

In this section, I will show how to write a sample Java Plugin. I am using the IntelliJ Idea editor and in the end, I have attached the complete source code.

3.1. Java plugin lifecycle

  • Init – init() method is to group initialization logic. This method runs first when the applet is run.
  • Start – the start() method runs after the init method and it contains the actual code to run. This method runs each time when the plugin is restored or tabs are switched.
  • Paint – paint() method is used to redraw the applet. This method is invoked after the start method and whenever the browser is refreshed and resized.
  • Stop – this method is automatically called whenever the user moves off the page where the plugin sits. Stop method is called whenver the plugin window is minimized and even when the browser tabs are switched.
  • Destroy – this method is automatically called whenever the browser is shut down normally. This method removes the plugin object from the memory.

3.2. Example program

In this section, I am going to show a basic plugin program that shows the applet lifecycle methods.

package com.jcg.plugin; import java.applet.Applet; import java.awt.*; public class JavaPluginDemo extends Applet < //init method is called only once, when the plugin class is initially loaded public void init() < System.out.println("Plugin initialized"); >//executed immediately after init method. It gets executed each time when the plugin //is reloaded, resized and refreshed public void start() < System.out.println("Plugin execution started"); >//executed whenever the plugin is minimized and user moved to another tab public void stop() < System.out.println("Plugin execution stopped"); >//redraws the output on the plugin. executed immediately after the start method. //executed whenever applet is resized and refreshed public void paint(Graphics g) < System.out.println("Painting the plugin"); g.drawString("Painting the applet. ", 10, 40); >//executed only once like init method. executed when the applet is closed public void destroy() < System.out.println("Plugin is bing removed"); >>

Right-click on the program and click run. This launches the applet viewer. Output in the applet viewer is as in the below image,

Java plugin - output

Output from the plugin lifecycle methods is as follows,

Java plugin - lifecycle methods output

In the above output, you can notice that start, paint and stop methods are called multiple times. Whereas, init and destroy are called only once.

3.3. Serving Java Plugins

Plugins can be locally viewed in Applet Viewer. When it has to be served to a remote computer, it has to be served via HTML. Below is the sample HTML snippet to serve Java Plugin,

tag is used to serve the applets.

4. Download Source Code

Download
You can download the full source code of this example here: How to download and install Java plugin in a browser

Источник

Java plugin no longer supported in firefox 52. Is there any other way to run java applets in firefox

Recently I installed Oracle Java. It worked fine, But with the recent upgrade with Firefox throws an error. I checked it here, which says:

Starting with Firefox Version 52 (released in March 2017), Firefox has limited support for plug-ins, and therefore will not run Java. Use the Java Control Panel to find the installed Java version.

$ java -version java version "1.8.0_121" Java(TM) SE Runtime Environment (build 1.8.0_121-b13) 

3 Answers 3

The following steps should work (tested on Mint 18 based on Ubuntu 16.04LTS):

  1. Download and extract the Firefox ESR install from here: https://www.mozilla.org/en-US/firefox/organizations/all/
  2. Launch Firefox and type about:config in the location bar
  3. Accept the risks and then add a key (right click mouse >New > Boolean)
  4. Call the key plugin.load_flash_only and set it to false
  5. Add a Firefox extension for switching the user agent eg. User-Agent Switcher
  6. Set the user agent to an earlier version of Firefox on Linux eg. Mozilla/5.0 (X11; Linux i586; rv:31.0) Gecko/20100101 Firefox/31.0
  7. Close Firefox
  8. Download the tar.gz JRE package for Linux on www.java.com and store the file in the folder Downloads in your home folder (ie. ~/Downloads ). It will be of the form: jre-8u161-linux-i586.tar.gz for the 32 bit version. Choose the 32 bit or 64 bit version according to the version of Firefox ESR you downloaded.
  9. Then do the following to extract the JRE in a shell (replacing with 64 bit versions if needed):
sudo mkdir -p -v /opt/java/32 cd ~/Downloads tar -zxvf jre-8u161-linux-i586.tar.gz sudo mv -v jre1.8.0_* /opt/java/32 
mkdir -p ~/.mozilla/plugins/ cd /opt/java/32/jre1.8.0_161 ln -sf $PWD/lib/i386/libnpjp2.so ~/.mozilla/plugins/ 
sudo apt-get remove icedtea-plugin sudo apt-get remove icedtea-8-plugin sudo apt-get remove icedtea-netx sudo apt-get remove icedtea-netx-common 
sudo apt-get install libgtk-3-0:i386 libasound2:i386 libdbus-glib-1-2:i386 libxt6:i386 libxtst6:i386 libcanberra-gtk-module:i386 libcanberra-gtk3-module:i386 topmenu-gtk3:i386 libpangoxft-1.0-0:i386 libxft2:i386 libpangox-1.0-0:i386 libxmu6:i386 libxv1:i386 libasound2-plugins:i386 

Источник

Оцените статью