Developing RESTful Services with REST/JAX-RS: Lab Setup Instructions (Windows OS: Java 11, IntelliJ, Tomcat 9)
Below are the standard requirements for this course. If you have any questions or issues, please contact us.
Important Note: Student lab files are required on each computer used for the course. The links for these are not in this lab setup, and you should receive them separately.
Other notes:
- It’s a good idea to keep downloaded software install files on the machines during the class in case of problems that require a re-install.
- Cloning a setup is generally not a problem. If it is, we’ll mention it in the software section (for example, much of the IBM/RAD-WAS software can be problematic in this regard).
Hardware and classroom setup.
Each student and the instructor shall have a workstation that fulfills the listed requirements.
- Required: Intel-compatible processor (with reasonably recent hardware).
- Memory: 8GB min recommended
- Disk Space: Free disk space for software installs (generally minimum 2GB)
- Operating System: Windows OS (Any modern version - e.g. Windows 10. - labs have not been tested on Windows 8 variants)
- Required: Zip utility. A good free one is 7-zip
- Required: Adobe Acrobat Reader
- Required: One of Firefox browser (https://www.mozilla.org/en-US/firefox/new/) or Chrome browser (https://www.google.com/chrome/). Edge browser is not sufficient.
- Recommended: Internet access
- Recommended: Class machines networked together - allows students to access a shared network directory.
Install 7-zip
We’ve found that there are sometimes problems using the built in Windows archive/zip utility. This generally has to do with long path lengths that it can’t handle. Use 7-zip to extract the labs and any software zips which we’ve found very reliable.
- Can try direct download link for 64-bit install: https://www.7-zip.org/a/7z2301-x64.exe
- If that doesn’t work, go to home page https://www.7-zip.org
- Near the top of the page, find the download link for your bitness (probably 64 bit), and download the installer.
- Execute the installer, and take all the defaults.
- You can now extract zip files by right clicking on them, and selecting 7-Zip | Extract ...
Lab Files: Each student and instructor must have lab files installed (links to these files are generally sent separately via e-mail).
- Extract the lab files to a location conveniently accessible to the student (e.g. C:\ )
- Recommend using utility like 7-zip, not Windows built-in extractor.
- If using folder other than C:\, make sure that students know where they are.
Other instructor requirements for the classroom
- Projector or large screen TV capable of 1280x800 or higher resolution. Instructor must be able to use this to project slides.
- Whiteboard (preferred) or flip charts with markers.
Install Java Development Kit – JDK 11 (11.0.21)
- Note that any JDK 11 version should work fine. Other close (later) Java versions (e.g. Java 12 or 13) should be fine also, but have not been tested.
- Download:
- From https://www.oracle.com/java/technologies/javase/jdk11-archive-downloads.html download the installer file for the Windows x64 Installer
- File name is something like: jdk-11.0.21_windows-x64_bin
-
Run the installer and take all defaults.
- Create or modify environment variables. This will add an environment variable JAVA_HOME, and modify your path to include the jdk bin folder. For windows set the following.
- JAVA_HOME:
- Navigate to the System Properties widget > click the Advanced tab > click the Environment Variables button
- In the bottom half of the dialog, click New to add a new System variable
- Variable name: JAVA_HOME (this is case-sensitive)
- Variable value: C:\Program Files\Java\jdk-11.0.21 (or adjust to the actual path for your JDK version and where you installed the JDK – please double-check this path – probably best to copy and paste it)
- Click OK
- Path:
- Find this existing entry in the bottom half of the Environment Variables button, and click Edit
- Click in the Variable value field and move your cursor all the way to the left (pressing Home on your keyboard should do this quickly for you)
- Check whether the value below is already present, or add it at the beginning if necessary (make sure you get all of this, including the trailing semicolon, with no spaces):
%JAVA_HOME%\bin;
- Click OK repeatedly (likely in 3 different dialogs) until all the dialogs close.
-
Open a terminal prompt, type the below, and press Enter
javac -version
- You should get a message that tells you the version. If the command is not found, you did something wrong.
- Close the terminal prompt. You’re done installing Java
Install Tomcat 9.0
- Download: From https://tomcat.apache.org/download-90.cgi go to the Binary distributions section for Tomcat 9.0 and download the zip file
- Go to the link with label zip: in the section labeled Core:
- The filename will be something like apache-tomcat-9.0.78.zip
- Save the file where you can access it easily
- Extract: Extract the zip file where students can access and run it easily.
- Windows OS: Common location is C:\
- Mac OS: Common location is user home directory.
- That’s all that needs to be done to install Tomcat.
Install IntelliJ IDEA Community (2023 versions)
Instructions are for Version 2023.1. Any 2023.x version should work, but if you can easily do so, use 2023.1. IntelliJ sometimes changes it's IDE interface, and if the version used differs from what the lab instructions were written to, this may be confusing to students (but not a deal breaker)
NOTE: IntelliJ IDEA Ultimate will also work fine, if you are using that, but it's not needed.
Download
Install
- Execute the installer program (named something like ideaIC-2023.1.exe)
- Take all the defaults when installing
- Nothing else needs to be done to install IntelliJ
Install SmartTomcat Plugin Into IntelliJ IDEA
- Start IntelliJ:
- Launch according to your OS and install details - e.g. for Windows it should be in the Start menu, and for Mac, execute from Applications folder.
- In the dialog that comes up, use whatever workspace location is convenient (the default or something else you choose)
- Install SmartTomcat Plugin: These are additional IntelliJ plugins that make it easy to work with Tomcat servers within IntelliJ.
- NOTE: The easiest install, continuing below, requires Internet access.
- If you DO have internet access, continue directly below.
- If you DON'T have Internet access, go to section at bottom labeled "Installing from Disk"
- Within IntelliJ, go to Menu Item File | Settings | Plugins
- Make sure Marketplace is selected in the right hand pane
- In the Search text box in the right hand pane, type Smart Tomcat
- You should see only one result
- If you don't see it, install from disk instead, following instructions at bottom labeled "Installing from Disk"
- Click the Install button next to it - accept any license or other dialogs.
- Click OK
- Test SmartTomcat plugin install (whether you installed from the Marketplace or from Disk)
- Go to Menu Item File | Settings
- Make sure there is a Tomcat Server entry in the list on the left hand side (probably the last item).
- Go to Menu Item Run | Edit Configurations
- Select the + (plus) sign in the upper left hand corner to add a configuration
- Make sure the list that comes up contains a Smart Tomcat entry
- If both the entries above are present, then your install succeeded
Install from Disk (only if you don't have internet access to the IntelliJ Marketplace)
- This requires that you have downloaded and unzipped the lab setup file for the course
- Within IntelliJ, go to Menu Item File | Settings | Plugins
- Click the Settings Icon (to the right of the Installed tab)
- Select Install Plugin From Disk
- Browse to StudentWork/xxx-Course-Name/Software/SmartTomcat
- Select the zip file there