CSE 142, Spring 2021: Software

If you are having any trouble getting Java and jGRASP installed on your machine, contact Jonathan Sanders.

JDK

The Java Development Kit (JDK) includes the compiler that you will need for compiling and running Java programs. Follow the instructions on this page to acquire the JDK.

Some users already have the JDK installed on their computers, because of other software that they use that is written in Java. If you think this applies to you, you can safely skip the JDK section of this guide, although you may find that you need to come back and complete it anyway.

jGRASP

We will be using the Java development environment jGRASP in this course. Follow the instructions on this page to download and set up jGRASP.

Troubleshooting

Below are listed a few common issues that students have run into, and potential solutions.

Missing Compiler Error Messages

Some users who have their OS configured with a non-English primary language cannot properly see the compiler errors in jGRASP. To fix this problem, follow these steps in jGRASP.

  1. Click "Settings" -> "Compiler Settings" -> "Workspace".
  2. In the settings box that pops up, click the "Flags / Args" tab (in the lower row of tabs).
  3. Then, click the black "button" under "FLAGS or ARGS" and next to "Compile".
  4. In the text box that becomes available type in -J-Duser.language=en and click "OK".

"unable to encode text using charset us-ascii" Errors

Some Windows users who have their OS configured with a non-English primary language encounter an "unable to encode text using charset us-ascii" error when closing jGRASP. This seems to happen after opening and closing a file whose path contains non-English characters. Until this bug is fixed in jGRASP, we recommend only storing your Java files in folders with English names. Sorry about that!

Once jGRASP has seen a file with a non-English path, it will remember it, even if you've renamed the folder. To make it forget about the old path and stop displaying this error message, you'll need to delete your jGRASP workspace and create a new default one. Before doing this, make sure you know where on your computer your Java code is saved, because jGRASP will forget which files and folders you have open.

  1. Make sure jGRASP is closed.
  2. Open C:\Users\YOUR_USERNAME\ in Windows Explorer and delete the folder named .grasp_settings.
  3. Re-open jGRASP.

This will reset jGRASP back to its default settings, making it forget the old filename.