Java程序辅导

C C++ Java Python Processing编程在线培训 程序编写 软件开发 视频讲解

客服在线QQ:2653320439 微信:ittutor Email:itutor@qq.com
wx: cjtutor
QQ: 2653320439
Lab 1 - Install - COMP2100/6442 Skip navigation COMP2100/6442 ANU College of Engineering & Computer Science Search query Search ANU web, staff & maps Search COMP2100/6442 Exams menu Search query Search ANU web, staff & maps Search Search COMP2100/6442 labs Overview Lab 1 - Install Lab 2 - Git / SSH Lab 3 - Trees Lab 4 - Parser Lab 5 - Android 1 Lab 6 - Android 2 Lab 7 - Persistent Data Lab 8 - PHP Lab 9 - Lab Test 1 Lab Test 2 related sites Wattle Lab 1 - Install The lab sessions will be the chance to implement the things that you learn from lectures. Some of these labs may contain some assessable items. The idea is that the lab activities should be done during your scheduled lab time. However, if you don’t get a lab completed within the schedule slot then you can still submit your work by the beginning of the next lab session. The detailed submission formatting will be provided later on. If you miss a lab for a reason outside of your control, such as you are unwell, then we will attempt to arrange an alternative lab session for you. This will either be during another lab slot. All requests for such an additional lab session must be emailed to the course convener before the lab session you miss (or as soon as it is practical after the lab). Please include in the email the scheduled lab slot you are missing, your tutors name, and the reason you will not be able to attend (or did not attend) your scheduled slot, along with any supporting documentation. During the labs we will also have some group discussion and reminders regarding assignment progress. Although these have no marks attached to them. Group Discussion Go around the group, introduce yourself and what you expect from this course. Your tutor will go over the rest of the class explaining what is expected. Task 1 - Install JDK on your personal computer If you already know how to install JDK 9/11, you can go ahead and install it by yourself. Install Java Development Kit (JDK) To develop Java program, you have to install JDK first. It is the development package for Java development including compiler, analysis tools, Java Runtime Environment (JRE) and so on. You can use both Oracle’s JDK (available from oracle) or OpenJDK (download from java.net). You can use either JDK 8 or 11 LTS for the course of this semester. The installation is pretty simple. If you are using Windows, you only have to follow the instructions of the wizard and the installation should be completed. If you are using macOS, you have to launch the .dmg file and then there should be a .pkg file inside. Launch the .pkg file and follow the instruction and the installation should be completed. If you are using Linux, you can use your package manager to simplify your installation. For example, in Ubuntu, you can install JDK 11 by apt install openjdk-11-jdk and JRE by apt install openjdk-11-jre. You may need to do apt update for updating your package list. Try to implement and compile helloworld in Java and test whether the installation is successful. Task 2 - Install Android Studio on your personal computer You can download the Android Studio from android.com. Please download the specific version for your OS. If you are using Windows, you can download the install program from the website. The recommended method is download the executable wizard for 64-bit Windows. Follow the instructiion of the wizard. You can also choose to download the .zip package and manage the installation by yourself. If you are using macOS, you need to download the .dmg package. Drag the app to /Applications directory and the installation is done. If you are using Linux, you have to download the .zip package. Extract all the files in the .zip file to the location you want to install the Android Studio. To launch the android studio, you have to launch the studio.sh file under the bin directory from terminal. For the first time launch the Android Studio, you have to select the appearance style and download the essential packages for Android development. It should only appear at the first time you launched the Android Studio. You can also change the settings later on in Settings options under File menu. Task 3 - Set-up an environment for the individual assignment. To successfully complete the individual assignment, you first need to set up a Java environment in your personal computer or lab computer (Task 1). In addtion, for the advanced development environment, you may decide to use an integrated development environment such as Eclipse and IntelliJ IDEA. The detailed installation steps of these applications can vary depending on your system (Mac, Windows, Linux). Go to the official site to get an up-to-date instruction for the installation. The key to successful development environment of the first assignment is to include JUnit4 into the Java build path. We have provided necessary JUnit4 JAR files in the assignment repository. Adding these JAR files into the build path again depends on the application and system. We listed basic steps for representative applications below: In a terminal, you can compile java files with javac -cp ".;path/to/junit/jars/*" SomeTestClass.java. Running the compiled class file with java -cp ".;path/to/junit/jars/*" org.junit.runner.JUnitCore SomeTestClass will automatically execute the test cases in SomeTestClass. If you are using Eclipse, create a project with the provided Java files first (see below if you don’t know how to do this). Then right click the project and go to Build Path → Add External Achieves.. → Add jars using dialog box Once you successfully import these libraries, you will not see any error messages from MarkCalculatorTest.java file. Run the java application to check whether the library has been linked properly. If you are using IntelliJ, create a project with the provided Java files first (see below if you don’t know how to do this). Then go to File → Project Structure → Modules → select Dependencies → Click + button → Select JARs or directories → add jars from the dialog box. Once you successfully import these libraries, you will not see any error messages from MarkCalculatorTest.java file. Run the java application to check whether the library has been linked properly. Note that how to set up a working environment properly including library (jar files) configuration is extremely important since you have to do it by yourself during the lab tests and final exam, and there will be no access to external network. How to create a project in Eclipse with given source code files? There are multiple ways to do it. One way to create a project from existing files is: Open Eclipse. Go to File → New → Java Project Uncheck user default location Click Browse... and find a root folder which contains all source files and click open. Click Next > If you can see all files under a correct package (often default package), it’s all done. Click Finish The above steps will not work if you are trying to import an existing Eclipse project. In a such case, use import existing project instead. How to create a project in IntelliJ with given source code files? Open IntelliJ. Go to File → New Project → from Existing Sources... Fild a root folder which contains all source files and click open. Select Create project from existing sources and click Next. Configure project name and click Next. IntelliJ will find source files automatically. Click Next. Review libraries automatically found. Click Next. Review Modules. Click Next. Set SDK version. Click Next. Updated:  / Responsible Officer:  / Page Contact:   Contact ANU Copyright Disclaimer Privacy Freedom of Information +61 2 6125 5111 The Australian National University, Canberra CRICOS Provider : 00120C ABN : 52 234 063 906 You appear to be using Internet Explorer 7, or have compatibility view turned on. Your browser is not supported by ANU web styles. » Learn how to fix this » Ignore this warning in future