JCreator CS 21 a Introduction to Computing I

  • Slides: 10
Download presentation
JCreator CS 21 a: Introduction to Computing I Department of Information Systems and Computer

JCreator CS 21 a: Introduction to Computing I Department of Information Systems and Computer Science Ateneo de Manila University 6/19/2005

Copyright 2008, by the authors of these slides, and Ateneo de Manila University. All

Copyright 2008, by the authors of these slides, and Ateneo de Manila University. All rights reserved. 2

JCreator n n A small, lightweight IDE developed by the Xinox Software. Two licenses

JCreator n n A small, lightweight IDE developed by the Xinox Software. Two licenses available: n n n Lite edition - Freeware (limited features) Pro edition - Shareware (requires payment, but with full features) Download from http: //www. jcreator. com Copyright 2008, by the authors of these slides, and Ateneo de Manila University. All rights reserved. 3

Compiling and executing java classes n Double-click on the java source file to open

Compiling and executing java classes n Double-click on the java source file to open the file using JCreator Or, open from within JCreator Compile using the “Compile File”button Run using the “Execute”button Copyright 2008, by the authors of these slides, and Ateneo de Manila University. All rights reserved. 4

JCreator projects n n Just like with Blue. J and other IDEs, there is

JCreator projects n n Just like with Blue. J and other IDEs, there is an organized way to group Java files into projects First, set the default project directory so that you know where your files will land n n Configure -> Options -> Directories Change the “Default Project Directory” to a folder you are familiar with Copyright 2008, by the authors of these slides, and Ateneo de Manila University. All rights reserved. 5

Creating a project n n File -> New -> Project Indicate the name of

Creating a project n n File -> New -> Project Indicate the name of the project (select “Empty Project” as the project type, for now) Notice that a folder with the name you provided will be created under the default project directory specified in the previous slide All files under the project will be placed inside this folder Copyright 2008, by the authors of these slides, and Ateneo de Manila University. All rights reserved. 6

Adding files to the project n n After a project has been created (or

Adding files to the project n n After a project has been created (or selected) File -> New File to add a new file to the project Project -> Add Files… to add an existing file to the project Try it! n Create a two-file project (a class and a tester program, for example) Copyright 2008, by the authors of these slides, and Ateneo de Manila University. All rights reserved. 7

Compiling and executing a project n To compile the entire project (all Java files

Compiling and executing a project n To compile the entire project (all Java files within the project folder), click on the “Compile Project” button, or, n n n To execute, click on the play or “Execute” button, or n n n Build -> Compile Project Press the F 7 key Build -> Execute Project Press the F 5 key There are buttons to compile/execute individual files Copyright 2008, by the authors of these slides, and Ateneo de Manila University. All rights reserved. 8

Specifying the Run File n JCreator automatically selects the Java program source with a

Specifying the Run File n JCreator automatically selects the Java program source with a main() method as the run file n n This is what executes when the play button is or F 5 pressed If there are multiple files with a main() method: n Project -> Project Properties … then select the right File under “Run: ” Copyright 2008, by the authors of these slides, and Ateneo de Manila University. All rights reserved. 9

About JCreator projects n Double-clicking on. jcp or. jcw files inside the project folder

About JCreator projects n Double-clicking on. jcp or. jcw files inside the project folder automatically opens the project within JCreator n n n . jcw specifies a workspace; there may be several projects in a workspace (but you will often have oneproject workspaces) There are other project types (e. g. , Basic Applet) that automatically produce standard files/code You may archive your project (e. g. , when submitting) by zipping (using winzip or winrar) the project folder Copyright 2008, by the authors of these slides, and Ateneo de Manila University. All rights reserved. 10