Setting Up Development Environment for CS520This guide is for setting up a development environment for CS520 under Windows [1]. PostgreSQL, Java and TomcatInstall PostgreSQL as described in PostgreSQL Database Server Installation. You may use MySQL if you want, but note that I will only cover PostgreSQL in class, so you will be on your own to figure out things like Hibernate configuration and full text search using MySQL. JDK 7 or above is required for this class [2]. You can download and install the latest Java SE JDK from Sun/Oracle - we only need the JDK, not JavaFX, NetBeans or Java EE. Set a JAVA_HOME environment variable to the directory where JDK is installed. If you have an older version of JDK on your computer, please uninstall it before installing a new one. Download the latest Tomcat 7 binary release from the Apache Project. Note that there are several packages available for download. You should download the ZIP file under the "Core" distribution. After downloading the file, unzip it to a local directory, e.g. c:\apache-tomcat-7.0.x. [3] Eclipse and Eclipse PluginsDownload the lastest Eclipse IDE for Java EE Developers from Eclipse.org. Unzip it to a local directory, e.g. c:\eclipse, then start up Eclipse by double-click on eclipse.exe under the Eclipse folder. If you are using Eclipse for the first time, you will be asked to choose a folder to be Eclipse's workspace. Eclipse will store all your projects in that folder. In Eclipse, install the Subclipse plugin as follows:
Follow the same procedure to install the following plugins: Maven Integration for Subclipse:
Also in Window -> Preferences -> Maven, check Download repository index updates on startup. Restart Eclipse to download Maven repository index. Downloading Maven repository index for the first time may take a few minutes (see a screenshot here), so make sure you have a reliable internet connection, and be patient. Notes1. If you use a non-Windows platform, the information in Notes on Setting Up CS520 Development Environment on Ubuntu Linux and Setting up a Mac for CS520 may be helpful. 2. For the first homework assignment you will be required to deploy your project on CS3 which only has JDK 1.7. If you use JDK 1.8, you must configure the project to generate JDK 1.7 compatible class files in order to deploy it on CS3. To change the compiler compliance settings, right click on the project, then select Properties -> Java Compiler. In the right panel, uncheck "Use default compliance settings", then change both "Generated .class files compatibility" and "Source compatibility" to 1.7 (see a screenshot here). Note that you only need to do this for the first homework assignment. 3. For the first homework assignment you may need to add the JSTL tag library to your project manually. You can download it from here, then extract jstl.jar and standard.jar to the WEB-INF/lib folder of your project. |