> Java > toys > hello
> Java > toys > hello
by ZweiBieren Is Java on Your Box? toy stuffed monkey
 
PhysPics programs require Java version 1.8. The Hello tool tests your Java setup and reports the Java version. If it works, you'll know Java is completely installed. Begin by downloading hello.jar with the button at the left. Open the browser's download directory and double click hello.jar.

If all is well, a window appears:

If the version is 1.8.xxxx your system is all set for PhysPics applications.

Open a command window

Among the many ways to open a command window is to type windows-key-R and enter "cmd" at the prompt. To open it with administrator privileges, type control-shift-enter.

If no window appears, Java may not be installed. One way to check is with the "where" command: Open a command window (see box to the right) and enter "where javaw". With luck the response will be the file location of the javaw executable. If not, see the next section, Installing Java. But if the window appears it can be faster to follow the second section, Associating .jar Files with Java.

Installing Java

From the Java download page, click Agree and Start Free Download. (I've checked. You need not worry about the Java License Update.) Follow that page's steps to get Java installed. Usually the install properly associates .jar files with Java; so try again to double-click hello.jar. If it still fails, consult your local guru.

Associating .jar Files with Java

If Java is installed but double clicking hello.jar fails, you may only need to modify the "file association" between .jar and running Java. While the command window is open, you can run the Hello tool from it:

java -jar your-browser's-download-directory/Hello.jar
You should see the window above.

To change the association you need administrator permission. Close the Command Prompt window and type Window-key-X again. This time select "Command Prompt (Admin)" (You will have to enter your administrator password.) Enter the commands

assoc .jar
ftype jarfile
On my box this looks like
commands with results .jar=jarfile and 
                 jarfile='<i>file-location</i>
                 -jar "%1" %*'
If a value is reported for either .jar or jarfile, then you will be replacing an existing association. It is probably okay to do so, but use your own judgment. Do the changes by entering
assoc .jar=jarfile
ftype "jarfile=the-value-from-where-java-above" -jar "%1" %*
Exit the command window. Try again to double click hello.jar; it should now work. Failure suggests you need consult your local Java guru.

 
Copyright © 2021 ZweiBieren, All rights reserved. Apr 2, 2021 00:51 GMT Page maintained by ZweiBieren