Java: Difference between revisions

From Proteopedia
Jump to navigation Jump to search
Jaime Prilusky (talk | contribs)
No edit summary
Eric Martz (talk | contribs)
 
(32 intermediate revisions by 2 users not shown)
Line 1: Line 1:
''Java'' (or more specifically the ''Java virtual machine'') is software that enables programs written in the ''Java language'' to operate essentially identically on multiple computer platforms, such as Microsoft Windows, Apple Mac OS X, and linux, without special adaptation to each platform. [[Jmol]] is one such program. Jmol will not operate unless Java is installed on the host computer. Since interactive molecular visualizations in [[Proteopedia]] depend upon Jmol, both Proteopedia and Jmol require Java.
''Java'' (or more specifically the ''Java virtual machine'') is software that enables programs written in the ''Java language'' to operate essentially identically on multiple computer platforms, such as Microsoft Windows, Apple Mac OS X, and linux, without special adaptation to each platform. [[Jmol]] can operate using Java or HTML5/Javascript. Jmol cannot operate in Java-mode unless Java is installed on the host computer. '''Interactive molecular visualizations in [[Proteopedia]] are computationally demanding and will perform best in Java-mode at this time'''.
* See [[Installing and enabling Java]] to make sure Java is up to date, and enabled in your favorite web browser.
* See [[Using Java for Rendering Structures]] for how to opt in to Java mode in Proteopedia.


Java is bundled with Mac OS X (10.6 and earlier), and the Apple ''Software Update'' on Macs upgrades Java as new versions are released. (For Mac OS 10.7 Lion, Java must be installed by the user.) Microsoft Windows does not provide Java, but it can easily be installed or updated by visiting [http://java.com Java.Com]. The original (and still most widely used) Java is developed by Sun Microsystems (a subsidiary of Oracle Corporation), and [http://en.wikipedia.org/wiki/Java_(software_platform)#Licensing since mid-2007, has been open-source software].
The original (and still most widely used) Java is developed by Sun Microsystems (a subsidiary of Oracle Corporation), and [http://en.wikipedia.org/wiki/Java_(software_platform)#Licensing since mid-2007, has been open-source software].


Apple adapted Java to work efficiently on OS 10.6 and earlier OS versions (citation needed). Apple Java is typically many versions behind Sun Java. For example, in March, 2011, the current Apple Java is 1.5.0_28 while Sun Java (e.g. installed on MS Windows) is 1.6.0_22. Beginning with OS 10.7 Lion, Apple is managing Java differently (details needed).
Occasionally bugs in current java releases affect the performance of Proteopedia or Jmol. These are generally resolved in subsequent releases. You should be able to bypass these problems now by running Jmol withing Proteopedia in HTML5/Javascript mode.
 
Occasionally bugs in current java releases affect the performance of Proteopedia or Jmol. These are generally resolved in subsequent releases.  


==Enable Java on your computer==
==Enable Java on your computer==
Besides any Preferences setup, you might need to go to [http://www.java.com/en/download/installed.jsp?detect=jre ''Do I Have Java?''] and enable Java by clicking on the ''inactive plugin'' statement, if present.  
Please see [[Installing and enabling Java]] for detailed instructions.


==Detecting your Java version==
==Detecting your Java version==
Line 24: Line 24:


In January, 2013, the [http://www.us-cert.gov/cas/techalerts/TA13-032A.html US Department of Homeland Security issued a warning recommending that Java be disabled in web browsers]. For a few days at the end of January, 2013, Apple blocked the use of java in web browsers on Mac computers worldwide. This was a major inconvenience to some, but clearly Apple felt the security risks were quite serious. Oracle, the company providing Java, subsequently fixed some of the vulnerabilities in Java (and Apple re-enabled Java on Macs), but most likely other security risks remain.
In January, 2013, the [http://www.us-cert.gov/cas/techalerts/TA13-032A.html US Department of Homeland Security issued a warning recommending that Java be disabled in web browsers]. For a few days at the end of January, 2013, Apple blocked the use of java in web browsers on Mac computers worldwide. This was a major inconvenience to some, but clearly Apple felt the security risks were quite serious. Oracle, the company providing Java, subsequently fixed some of the vulnerabilities in Java (and Apple re-enabled Java on Macs), but most likely other security risks remain.
In January 2014, Proteopedia moved to using a signed Java applet certified by the Jmol developers. Jmol is developed in the open by trustworthy developers and users can now easily opt to accept to run the Java code from these developers.


==How to be as safe as possible with Java==
==How to be as safe as possible with Java==


Assuming that you wish to use Proteopedia and other Jmol-based resources, such as [[FirstGlance in Jmol]], you will need java. (If you don't, simply uninstall Java.) How can you minimize your risk?
Assuming that you wish to use Proteopedia and other Jmol-based resources, such as [[FirstGlance in Jmol]], at their optimum ability you will need java. (If you don't, simply uninstall Java.) How can you minimize your risk?


*Whenever an '''update''' for Java is available, install it. To confirm that you have the latest Java, visit [http://java.com/ java.com], click on the link "Do I have Java?" and then on the button "Verify Java".
*Whenever an '''update''' for Java is available, install it. To confirm that you have the latest Java, visit [http://java.com/ java.com], click on the link "Do I have Java?" and then on the button "Verify Java".
Line 34: Line 36:


*'''Disable java''' in the web browser that you use for general-purpose browsing, email, google searches, etc. Here are instructions for [http://www.java.com/en/download/help/disable_browser.xml disabling java in a particular browser]. Use a '''different browser''' for resources that require Java.
*'''Disable java''' in the web browser that you use for general-purpose browsing, email, google searches, etc. Here are instructions for [http://www.java.com/en/download/help/disable_browser.xml disabling java in a particular browser]. Use a '''different browser''' for resources that require Java.
**'''Windows users''': Due to a limitation in Internet Explorer, you should '''use Internet Explorer for java'''. Use a different browser such as Firefox or Chrome for general web browsing, and disable java in that browser.
**'''Windows users''': Due to a limitation in Internet Explorer, you should '''use Internet Explorer for java'''. Use a different browser such as Firefox or Chrome for general web browsing. [[Installing_and_enabling_Java#Java_Applets_Do_Not_Work_In_Chrome|Chrome no longer supports Java]], but you should disable Java in Firefox for general web browsing.


These recommendations were made by Michael Horowitz in his Defensive Computing Blog in his January 2013 post [http://blogs.computerworld.com/cybercrime-and-hacking/21626/how-be-safe-possible-java How to be as safe as possible with Java].
These recommendations were made by Michael Horowitz in his Defensive Computing Blog in his January 2013 post [http://blogs.computerworld.com/cybercrime-and-hacking/21626/how-be-safe-possible-java How to be as safe as possible with Java].


==Long term solution==
==Jmol is now a signed Java applet==
In the quest to make Java less of a security risk Oracle has made it so that after January 15th, 2014, Java will no longer work with unsigned Java applets. Jmol on Proteopedia now runs with a signed applet and so you should be able to run Jmol in Java mode with no problem if you have an up to date installation of Java.
 
Recently with the changes users had to add Proteopedia to a trusted list of applets. We are leaving these oboselete directions on how to do that below in case you have issues while this transition is still new.
 
The version of the [[Jmol]] structure viewer previously utilized by Proteopedia ran on an unsigned applet.  If you are having problems because you have not updated your Java and are unable to at the present time, you may be able to add the Proteopedia site to a list of allow exceptions on your computer and get past security warnings. The following is how to do this:
 
* Copy the below URL to your clipboard by highlighting the text and select '''copy''' from under your browsers '''edit''' menu.
    <code><nowiki>http://proteopedia.org/wiki/</nowiki></code>
   
 
* Open the Java control panel.
 
    Windows/Mac - Open your system control panel or System Preferences and choose Java.
    Linux/Solaris - Run the jcontrol command.
 
* Choose the '''Security tab'''.
* Click the '''Edit Site List''' button near the bottom left.
*Click the '''Add''' button and paste in the text you copied earlier.
*Click '''OK'''. The window will close. You may see an additional prompt if you use an unencrypted protocol such as http or file. Choosing encrypted protocols defends
* Back on the control panel, click '''OK''' to close it.
*Open or reload the page on Proteopedia in your browser and you should get prompts you can now allow to activate Java again..
 
The technical version of above with some images that may help can be found [https://blogs.oracle.com/java-platform-group/entry/upcoming_exception_site_list_in?msgid=3-9509477622 here], under '''Adding a site to the Exception Site List'''.
 
At present Proteopedia uses a signed applet and adding Proteopedia to the exceptions list '''should not be needed'''.
 
==An alternative to Java has been implemented in Proteopedia==
 
The solely Java-based [[Jmol]] has been phased out of Jmol development in favor of a version of Jmol that does not absolutely require Java, see [http://wiki.jmol.org/index.php/JSmol JSmol object in the Jmol wiki]). It has the ability to either run in Java or use HTML5/Javascript on devices or machines not running Java.
 
Proteopedia is now using this new version of [[Jmol]]. This offers users a way to use Proteopedia without the need for Java. Another big advantage is that even tablets and mobile devices can now use Proteopedia. It is now even possible to author on your favorite tablet an entire page that includes 3D Proteopedia scenes.
 
Java-based [[Jmol]] has significant performance advantages over running in the HTML5/Javascript and power users may wish to keep using Java-based Jmol. Registered Proteopedia users wishing to still use Java-based [[Jmol]] still have that ability. It just needs to be on your machine and enabled in your Proteopedia preferences. Non-registered users can simply append <code>?_USE=SIGNED</code> to the URL of any Proteopedia page. For more about these options, see [[Using Java for Rendering Structures|here]].
 
For those wishing to see how the performance differs, we have [[Testing PDB File Sizes|a benchmarking page testing various structures operating on different platforms in different modes]].


It appears likely that Java-based Jmol will eventually be phased out in favor of a version of Jmol that does not require Java, called [http://sourceforge.net/projects/jsmol/ JSmol] (see also [http://wiki.jmol.org/index.php/JSmol JSmol in the Jmol wiki]).
==Controlling if Proteopedia scenes are rendered with Java==
See [[Using Java for Rendering Structures]] for how to opt in to Java mode. Otherwise, the default is the HMTL5/Javascript mode that has slower performance.


==See Also==
==See Also==
* [[Installing and enabling Java]]
* [[Using Java for Rendering Structures]]
* [http://en.wikipedia.org/wiki/Java_(software_platform) Java (software platform)] at Wikipedia.
* [http://en.wikipedia.org/wiki/Java_(software_platform) Java (software platform)] at Wikipedia.
* [http://www.apple.com/pr/library/2010/11/12openjdk.html Oracle and Apple Announce OpenJDK Project for Mac OS X] (November, 2010).
* [http://www.apple.com/pr/library/2010/11/12openjdk.html Oracle and Apple Announce OpenJDK Project for Mac OS X] (November, 2010).

Latest revision as of 20:20, 3 September 2015

Java (or more specifically the Java virtual machine) is software that enables programs written in the Java language to operate essentially identically on multiple computer platforms, such as Microsoft Windows, Apple Mac OS X, and linux, without special adaptation to each platform. Jmol can operate using Java or HTML5/Javascript. Jmol cannot operate in Java-mode unless Java is installed on the host computer. Interactive molecular visualizations in Proteopedia are computationally demanding and will perform best in Java-mode at this time.

The original (and still most widely used) Java is developed by Sun Microsystems (a subsidiary of Oracle Corporation), and since mid-2007, has been open-source software.

Occasionally bugs in current java releases affect the performance of Proteopedia or Jmol. These are generally resolved in subsequent releases. You should be able to bypass these problems now by running Jmol withing Proteopedia in HTML5/Javascript mode.

Enable Java on your computerEnable Java on your computer

Please see Installing and enabling Java for detailed instructions.

Detecting your Java versionDetecting your Java version

Jmol can be used, in any web page containing it, to report the version of Java currently installed: Click on Jmol, then on About Jmol. There are several free websites that report your java version, such as Java Tester. Java.Com also reports the java version on Windows: click on Do I Have Java?.

Java is a security threatJava is a security threat

Java has historically had flaws enabling criminals/vandals to commit identity theft and to compromise computers. Simply visiting a malicious website with a java-enabled web browser can compromise your computer.

According to a January, 2013 article:

" Java was responsible for 50% of all cyberattacks last year in which hackers broke into computers by exploiting software bugs, according to Kaspersky. That was followed by Adobe Reader, which was involved in 28% of all incidents. Microsoft Windows and Internet Explorer were involved in about 3% of incidents, according to the survey. "

In January, 2013, the US Department of Homeland Security issued a warning recommending that Java be disabled in web browsers. For a few days at the end of January, 2013, Apple blocked the use of java in web browsers on Mac computers worldwide. This was a major inconvenience to some, but clearly Apple felt the security risks were quite serious. Oracle, the company providing Java, subsequently fixed some of the vulnerabilities in Java (and Apple re-enabled Java on Macs), but most likely other security risks remain.

In January 2014, Proteopedia moved to using a signed Java applet certified by the Jmol developers. Jmol is developed in the open by trustworthy developers and users can now easily opt to accept to run the Java code from these developers.

How to be as safe as possible with JavaHow to be as safe as possible with Java

Assuming that you wish to use Proteopedia and other Jmol-based resources, such as FirstGlance in Jmol, at their optimum ability you will need java. (If you don't, simply uninstall Java.) How can you minimize your risk?

  • Whenever an update for Java is available, install it. To confirm that you have the latest Java, visit java.com, click on the link "Do I have Java?" and then on the button "Verify Java".
  • Do not visit unfamiliar websites. Especially do not click on unknown links or attachments in emails that you receive from sketchy senders. Also be careful when clicking links in google searches.
  • Disable java in the web browser that you use for general-purpose browsing, email, google searches, etc. Here are instructions for disabling java in a particular browser. Use a different browser for resources that require Java.
    • Windows users: Due to a limitation in Internet Explorer, you should use Internet Explorer for java. Use a different browser such as Firefox or Chrome for general web browsing. Chrome no longer supports Java, but you should disable Java in Firefox for general web browsing.

These recommendations were made by Michael Horowitz in his Defensive Computing Blog in his January 2013 post How to be as safe as possible with Java.

Jmol is now a signed Java appletJmol is now a signed Java applet

In the quest to make Java less of a security risk Oracle has made it so that after January 15th, 2014, Java will no longer work with unsigned Java applets. Jmol on Proteopedia now runs with a signed applet and so you should be able to run Jmol in Java mode with no problem if you have an up to date installation of Java.

Recently with the changes users had to add Proteopedia to a trusted list of applets. We are leaving these oboselete directions on how to do that below in case you have issues while this transition is still new.

The version of the Jmol structure viewer previously utilized by Proteopedia ran on an unsigned applet. If you are having problems because you have not updated your Java and are unable to at the present time, you may be able to add the Proteopedia site to a list of allow exceptions on your computer and get past security warnings. The following is how to do this:

  • Copy the below URL to your clipboard by highlighting the text and select copy from under your browsers edit menu.
   http://proteopedia.org/wiki/
   
  • Open the Java control panel.
   Windows/Mac - Open your system control panel or System Preferences and choose Java.
   Linux/Solaris - Run the jcontrol command.
  • Choose the Security tab.
  • Click the Edit Site List button near the bottom left.
  • Click the Add button and paste in the text you copied earlier.
  • Click OK. The window will close. You may see an additional prompt if you use an unencrypted protocol such as http or file. Choosing encrypted protocols defends
  • Back on the control panel, click OK to close it.
  • Open or reload the page on Proteopedia in your browser and you should get prompts you can now allow to activate Java again..

The technical version of above with some images that may help can be found here, under Adding a site to the Exception Site List.

At present Proteopedia uses a signed applet and adding Proteopedia to the exceptions list should not be needed.

An alternative to Java has been implemented in ProteopediaAn alternative to Java has been implemented in Proteopedia

The solely Java-based Jmol has been phased out of Jmol development in favor of a version of Jmol that does not absolutely require Java, see JSmol object in the Jmol wiki). It has the ability to either run in Java or use HTML5/Javascript on devices or machines not running Java.

Proteopedia is now using this new version of Jmol. This offers users a way to use Proteopedia without the need for Java. Another big advantage is that even tablets and mobile devices can now use Proteopedia. It is now even possible to author on your favorite tablet an entire page that includes 3D Proteopedia scenes.

Java-based Jmol has significant performance advantages over running in the HTML5/Javascript and power users may wish to keep using Java-based Jmol. Registered Proteopedia users wishing to still use Java-based Jmol still have that ability. It just needs to be on your machine and enabled in your Proteopedia preferences. Non-registered users can simply append ?_USE=SIGNED to the URL of any Proteopedia page. For more about these options, see here.

For those wishing to see how the performance differs, we have a benchmarking page testing various structures operating on different platforms in different modes.

Controlling if Proteopedia scenes are rendered with JavaControlling if Proteopedia scenes are rendered with Java

See Using Java for Rendering Structures for how to opt in to Java mode. Otherwise, the default is the HMTL5/Javascript mode that has slower performance.

See AlsoSee Also

Proteopedia Page Contributors and Editors (what is this?)Proteopedia Page Contributors and Editors (what is this?)

Eric Martz, Jaime Prilusky, Wayne Decatur