Time to apply stuff… Faculty of Mathematics and Physics Charles University in Prague 5 th October 2015 Workshop 1 – Java Wrestling.

Slides:



Advertisements
Similar presentations
Introduction to Eclipse. Start Eclipse Click and then click Eclipse from the menu: Or open a shell and type eclipse after the prompt.
Advertisements

Using Eclipse. Getting Started There are three ways to create a Java project: 1:Select File > New > Project, 2 Select the arrow of the button in the upper.
1 eclipse Tips. 2 What is eclipse? Eclipse is a popular IDE (Integrated Development Environment) that we will use to create, compile, execute, and test.
Java Integrated Development Environments: ECLIPSE Part1 Installation.
Coursework 2: getting started (4) – using PhoneGap to build mobile applications (optional) Chris Greenhalgh G54UBI /
Integrated Development Environments. Today We Will: Discuss what IDE’s are used for Go over the Eclipse IDE: –What is Eclipse? –How to install and set.
30-Jun-15 Getting Ready for CIT Labs Lab is scheduled for 1:30-3:00 Fridays in Moore 207 Lab is not in Towne 313 (Registrar has it wrong) Everyone.
13-Jul-15 Getting Ready for Java. 2 What You Need 256 MB of RAM (512 MB or more recommended) 500 MHz Pentium or better Macintosh: must run Mac OS X, preferably.
15-Jul-15 Starting Eclipse Just the basics. Getting Eclipse If you Google for “Eclipse”: The first hit is the home page, The second.
® IBM Software Group © 2003 IBM Corporation How to Download and Install RMC 7.5 David Trent RMC Product Manager.
Eclipse IDE. 2 IDE Overview An IDE is an Interactive Development Environment Different IDEs meet different needs BlueJ and DrJava are designed as teaching.
SEEM4570: XAMPP, Eclipse, Summary of Html Kangfei Zhao Room 711,ERB
IS 426: Information Systems Construction in Modern Society Downloading and exploring oracle development environments.
JSP and Servlets Lecture notes by Theodoros Anagnostopoulos.
1 eclipse Tips. 2 What is eclipse? Eclipse is a popular IDE (Integrated Development Environment) that we will use to create, compile, execute, and test.
Google Maps Android API v2 吳俊興 國立高雄大學 資訊工程學系 CSF645 – Mobile Computing 行動計算
1 Mobile Computing Set Up Copyright 2015 by Janson Industries.
Chapter 1a© copyright Janson Industries RAD ▮ Explain Eclipse, RAD, and their relationship ▮ Basic RAD concepts ▮ How to install RAD ▮ How to import.
Introduction to Android. Android as a system, is a java based operating system that runs on the Linux kernel. The system is very lightweight and full.
1 IMPORTANT NOTE  IMPORTANT NOTE not  As of this writing the default project you will download, import and use in this class is not enabled for Tomcat.
Setting up Eclipse Computer Organization I 1 August 2009 ©2009 McQuain Getting Eclipse for C/C++ Development Go to and click on Download.
Plug-in Development Environment. Session Outline Tools Installation Configuration New Project Basic Debugging Remote Debugging.
Renesas Technology America Inc. 1 SKP8CMINI Tutorial 2 Creating A New Project Using HEW.
Introduction to Eclipse CSC 216 Lecture 3 Ed Gehringer Using (with permission) slides developed by— Dwight Deugo Nesa Matic
How to Run a Java Program CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
How to Run a Java Program CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
OpenModelica Eclipse Setup
9/2/ CS171 -Math & Computer Science Department at Emory University.
Setting Up Eclipse. What is Eclipse? Eclipse is a free, downloadable software that allows us to create, compile, and run JAVA programs.
Using Microsoft Visual Studio 2005 Original by Suma Rao Revised by John G. McMahon ( 9/6/2008 )
GumTree Development Environment Setup Windows Only Compatible with Eclipse 3.2 M3 (Last update: 16/11/05)
Creating ontology Hands on! universAAL Training Day Barcelona, Spain 16 January 2014
DEVS M&S Tutorial with eclipse IDE Chungman Seo
Liferay Installation Prepared by: Do Xuan Hai 8 August 2011.
Installing Repast in the Eclipse IDE Charlie Gieseler 6/28/04.
Download and Install: 1.Java Development Kit (JDK) bin/INTERSHOP.enfinity/WFS/CDS- CDS_Developer-Site/en_US/- /USD/ViewProductDetail-Start?ProductRef=jdk-
Tool Install How to download & install Java 6 & Eclipse updated version based on Dr. G. L. Ray’s slides.
How to Install Eclipse Click hereClick here to download Eclipse.
Surya Bahadur Kathayat Outline  Ramses  Installing Ramses  Ramses Perspective (Views and Editors)  Importing/Exporting Example.
Renesas Technology America Inc. 1 SKP8CMINI Tutorial 2 Creating A New Project Using HEW.
Introduction to Eclipse Programming with an Integrated Development Environment.
© I-Logix Rhapsody C++ V /01/2004E1-1 “Essential” Tool Training Basic Rhapsody Basic Rhapsody Rhapsody in C++ V /01/04.
Open project in Microsoft Visual Studio → build program in “Release” mode.
Building the CarryDrop simulation in Eclipse Creating a new project with existing code from John Murphy’s RePast tutorial.
Loader Tutorial Set Up. Requirements Java 7 Eclipse IvyIDE plugin Git Optional: Ant Maven.
Software Design– Unit Testing SIMPLE PRIMER ON Junit Junit is a free simple library that is added to Eclipse to all automated unit tests. The first step,
Using This PowerPoint This PowerPoint presentation assumes you already have both the Java JDK and JCreator installed and all that you need is the proper.
Netbeans QuickStart. Creating a project File->New Project –For now you want General->Java Application –Then fill in the project details.
How to install JavaCV in Eclipse. Make sure to download and install all these before you proceed Eclipse for Java EE developers (current is Juno)
Java IDE Dwight Deugo Nesa Matic
CS 201 Lecture 1 (b) Using an IDE Tarik Booker CS 201: Introduction to Programming California State University, Los Angeles.
DT249-Information Systems Research Practice Programming Revision Lecture 3 Lecturer: Patrick Browne.
Day 1 Session 2. Setup & Installation
CLOUD
Getting Eclipse for C/C++ Development
Eclipse Navigation & Usage.
JCreator Setup Instructions
Instructor: Prasun Dewan (FB 150,
Setting up Eclipse Locally
Install Ruby If you are running on Mac OS X, Ruby is preinstalled.
How to Run a Java Program
JavaTeaching and Importing a github repository
JCreator Settings Only
How to Run a Java Program
Getting Eclipse for C/C++ Development
How to import CAP Library
Working with Libraries
Presentation transcript:

Time to apply stuff… Faculty of Mathematics and Physics Charles University in Prague 5 th October 2015 Workshop 1 – Java Wrestling

Slides you’ve opened contains: 1. Tools we are going to build Java projects with 2. Directions how to import Eclipse Java project into Eclipse 3. Java project build trouble shooting, concretely: 1.Setting a new JDK into Eclipse to build projects with 2.Configuring projects to use correct JDK 3.Setting build dependencies for a project 4.Setting correct Java code compliance level 4. How to run a Java application

 We are going to use Java 1.6+   We are going to use Eclipse 

 Projects are going to be stored at GitHub  Every project from GitHub can be downloaded as ZIP  MarioAI4J

 Download ZIP file and extract into some directory  We will refer to that as $PROJDIR  Open Eclipse and import all projects

> MENU > Window > Show View > Package Explorer

Right-click some empty space within Package Explorer view and choose Import…

Choose General > Existing Projects into Workspace and click Next

Click on Browse…

Choose $PROJDIR directory containing all unzipped projects, click OK

Eclipse will list all existing projects within that dir, keep them all ticked and click Finish.

All projects should appear within Package Explorer view, they should be auto-compiled (hopefully without errors).

 There are 3 common problems you may encounter after you import Java projects 1. You are building projects using wrong version of JDK (or some custom Java SDK) 2. Projects have build path messed up 3. Projects are compiled using wrong Java compatibility level  We will now address them them all…

 This problem is resolved in two steps 1. Make sure Eclipse is using correct JDK 2. Make sure that your projects are built using correct JDK

 Problem 1 – Step 1  In this step we will set Eclipse to use different JDK than the one its currently using  We assume you have JDK downloaded and unzipped somewhere

> MENU > Window > Preferences

MENU > Window > Preferences > Installed JREs Click Add.

Choose Standard VM, click Next.

Click Directory.

Find directory with JDK you want to use, click OK.

Eclipse should list many JDK JARs, click Finish.

Then “tick” a JDK you want to build your projects with, finish by clicking OK.

 Problem 1 – Step 2  Now we will check / make sure that the project is truly using JDK we have just set

Right-click a project within Package Explorer view that cannot be built and choose Properties.

Go to Java Build Path and Libraries tab, locate currently used JRE System Library.

If the JDK used is wrong, select it and click on Remove. If correct JDK is used, skip this step (click Cancel).

The JDK is removed, now click on Add Library.

Select JRE System Library and click Next.

Select a Workspace default, if there is a correct JDK in brackets. If not, choose Alternate JRE and select appropriate one. Click Finish.

Libraries will now show newly added JRE System Library with correct version. Click OK.

And do not forget to ensure your project is rebuild, choose MENU > Project > Clean.

Select Clean all projects in order to rebuild any dependencies as well. Click OK.

 Do this for every project you have imported, to ensure that all projects are built using correct JDK

 This problem happens if Eclipse does not build “Agents” project against “Framework”  E.g. in MarioAI4J, it may happen that project MarioAI4J-Agents is not built with MarioAI4J project on build path  We will resolve this by adding missing project to the build path

Right-click project within Package Explorer view that cannot be built and choose Properties.

Choose Java Build Path and Projects tab. If there are some invalid projects (red-crossed), remove them. Then click Add.

Tick MarioAI4J project (or whatever dependency is required) and click OK.

Project is now on Build Path, click OK

If Eclipse does not rebuild your project automatically, force it. > MENU > Project > Clean

Choose Clean all projects and click OK

 This should fix all compilation problems  If not, you probably have “Problem 3” to fix as well…

 This problem happens if Eclipse is trying to build your project for JDK1.5+ with code compatibility set to JDK1.4-  This problem is indicated by errors on lines annotation  We will resolve this by setting correct Java code compatibility level for a project

Right-click project within Package Explorer view that cannot be built and choose Properties.

Go to Java Compiler and set Compiler compliance level to 1.8 (if using JDK8, otherwise choose lower level that fits JDK versiou you are using), click OK.

Eclipse will require you to rebuild the project, click Yes.

 Hopefully, this fixes everything

 To run a Java Project you have to first locate a class with main(String[] args) method  Typically a project called xxx-Agents is going to have example agents containing such a method  Then, you can right-click such a class in Package Explorer view and run it as Java Application

 Contact:  Jakub Gemrot   Use subject:  AI1 – 2015 – Hxx – Project Build Trouble  xx is a number of the workshop your reporting your troubles for (01, 02, …)