APS Excellence in Physics Education Award
November 2019

Education Prize Logo
Science SPORE Prize
November 2011

NSF Logo
The Open Source Physics Project is supported by NSF DUE-0442581.

Open Source Physics Java FAQ

About   -   Terms of Use   -   Privacy Policy   -   Java FAQ   -   Acknowledgements

Java is the general term used to denote both the Java programming language and Java software development and distribution programs such as the Java Runtime Environment (JRE), the Java Development Kit (JDK), and Java Virtual Machine (JVM). Because Open Source Physics programs require Java, we provide answers to some common Java-related questions.

Glossary

For a discussion of Java terminology see: http://www.java.com/en/download/help/index.xml/

Java Runtime Environment(JRE): The Java Runtime Environment (JRE) provides the libraries, the Java Virtual Machine, and other components to run applets and applications written in the Java programming language. In addition, two key deployment technologies are part of the JRE: Java Plug-in, which enables applets to run in popular browsers; and Java Web Start, which deploys standalone applications over a network. It is also the foundation for the technologies in the Java 2 Platform, Enterprise Edition (J2EE) for enterprise software development and deployment. The JRE does not contain tools and utilities such as compilers or debuggers for developing applets and applications.

You can download the JRE from the Sun Java site: http://www.java.com/en/index.jsp

Java SE Development Kit(JDK): The Java Standard Edition Development Kit (JDK) is a superset of JRE. It includes the Java Runtime Environment (JRE) and command-line development tools, such as compilers and debuggers, that are necessary or useful for developing applets and applications. You only need JDE if you are compiling Java source code.

You can download the JDK from the Sun developer site: http://java.sun.com/javase/

Eclipse: Eclipse is an integrated development environment (IDE) written primarily in Java. In its default form it is meant for Java developers. Although OSP code is written in standard Java and can be compiled with any Java development environment, we have chosen to use Eclipse. You must download and install both the JDK and Eclipse in order to use the OSP Eclipse workspace.

Eclipse can be obtained from the Eclipse organization website: http://www.eclipse.org/

FAQ's

- How do I get Java?
- How do I check my computer's current version of Java?
- General Java troubleshooting - What version of Java do I need? - What operating system do I need?

How do I get Java?

To run the OSP Java-based simulations you must have Java JRE version 1.5 or higher installed on your computer.

You can obtain the free downloads of Java for Windows, Solaris, and Linux at http://www.java.com/en/index.jsp. After you have installed Java, you may need to close and re-open your browser for Java applets and Java Web Start to work.

On Macintosh OS X the latest version of Java (which will already be installed if you are using the auto-update feature). See http://www.apple.com/java/ for details.

How do I check my computer's current version of Java?

Windows Users: From a command line (Start menu->All Programs->Accessories->Command Prompt), type: java -version followed by the enter key. You should see some text which will include something like "(build 1.4.2_05_05-b04)"; this number is the version of Java you are using. If you receive an error, Java is not properly installed (see above to reinstall).

Macintosh Users: From the Apple menu, click on "About this Mac", then on "More Info...". You will find the Java software version under "Software->Applications".

General Java troubleshooting on Window

The following are some general steps that you may wish to perform when attempting to solve Java-related problems:

  • Empty Your Browser's Cache

    Internet Explorer: Select "Tools->Options", then click on the "Delete Files..." button under "Temporary Internet Files"

    Firefox: Select "Tools->Options->Privacy", then click the "Clear" button next to "Cache".

  • Empty Java Cache (Windows Only)

    From Windows' Start menu, select "Settings| Control Panel".  Run the Java control and look for the Temporary Internet Files heading under General. Then click the "Settings" button.  The Delete Files button in the Temporary Files Settings dialog removes Java applets and Web Start applications.

  • Make Sure Windows can find Java

    From a command line (Start menu->Accessories->Command Prompt), type java -version followed by the enter key. If you receive an error, Java is not properly installed. Please try reinstalling Java (see above) after uninstalling any Java entries in your list of installed programs (Control Panel ->Add/Remove Programs).

What version of Java do I need?

Version 1.0 of the Open Source Physics library requires Java 1.5 or above. Future versions of the OSP library will use generics and the JavaScript interpreter (Java 1.6).

What operating system do I need?

Open Source Physics programs runs on any operating system with a Java Virtual Machine. OSP applications have been tested on Windows XP, Windows 2000, Apple OS X Tiger and Panther, and various versions of Linux. OSP applets run on most (but not all) browsers on these same operating systems. Browsers are, however, continually being improved. Users are encouraged check at least two operating-system browser combinations, such as Internet Explorer and Mozilla and Windows or Safari and Mozilla on OS X, when running OSP programs as applets.

OSP Projects:
Open Source Physics - EJS Modeling
Tracker
Physlet Physics
Physlet Quantum Physics
STP Book