|SDK and IDE FAQs||Java Methods Home Page||Skylight Publishing|
Downloading and Installing
JCreator TM is a trademark of Xinox Software. JCreator LE is a simple Java IDE for Windows. You can download this freeware version of JCreator from jcreator.com. JCreator runs on Windows machines and requires Oracle's Java JDK (a.k.a. SDK) installed. Install the JDK and documentation first, then JCreator.
Configuring Default Properties
Make sure there is no workspace open (choose
Set the tab size to 2 and select the
Click on the
Click on the
Setting up Workspaces and ProjectsJCreator organizes your programs into workspaces and projects. A workspace contains one or several projects. A project contains one or several programs. For example, you can have a workspace for all the labs and exercises in one chapter of a textbook, and a project for a particular lab or set of exercises. You give names to your workspaces and projects.
Workspaces and projects are akin to folders and subfolders. In fact, it is customary to keep all the files for a given project in the same folder. The name of the project folder is usually the same as the name of the project. When you create a project, JCreator creates a folder for it, unless you choose an existing folder.
JCreator keeps the descriprion of a
workspace in a file with the extension
Here the folder
To create an empty workspace, first create a folder for
your workspace using Windows Explorer (for example,
In the dialog box that pops up, navigate to the desired
location for the workspace files (for example,
You can open an existing workspace by going to
JCreator keeps track of recently opened
workspaces and allows you to
quickly open one of them and load all its projects.
To do this, choose
To add a new project to the currently open workspace,
In the dialog box that pops up, enter the project
name (for example,
JCreator automatically adds the project
name to the location lines.
To delete a file from a project, click on that file in the file list and
Entering and Running a Simple Program
Set up a workspace with a project in it, as described above.
If the workspace has several projects,
right-click on the project you want to work on and choose
You can add an existing Java source file to your project
or create a new Java class (source file) from scratch.
To add an existing file, go to
Adding files is a common operation, so you might want to put
To create a new Java file, go to
Edit the text of your class. For example:
To edit a file, double-click on its name in the file list on the left. Several files from the same or different projects may be open at the same time. You can choose one of them for editing by clicking on the corresponding tab below the edit window.
To compile all the classes in the project, go to
To run the program, from the
Note: you must successfully compile the classes before you can run the program.
To redirect program's output from Command Prompt to JCreator's general output window:
Select "JDK Tools" in the left column and "Run Application" in the pulldown list
Click "<Default>", click the "Edit..." button
Check the "Capture output" checkbox
JCreator provides Java API help.
To access API press
Choosing Which Program to RunJCreator runs the program from the active project. If the workspace has several projects, right-click on the project you want to work on and choose
Your project can hold several executable programs. You can choose which one to run in several ways:
Setting Up Command-Line Arguments
JCreator allows you to change the
default run-time configuration for
your program; in particular, it lets you set
the command-line arguments.
Click on the pulldown arrow next to the
Another dialog box pops up. Enter the desired command-line arguments in the "Main(...)" field. For example:
Click OK twice.
You can create and name a number of configurations with different run-time arguments. You can copy configurations and edit them.
JCreator also allows you to define a number of "global" configurations.
To do that, go to
If your project contains an HTML file with an
Adding jar Files to Projects
In Java, it is common to combine several
classes in one
In JCreator you can simply add a jar file to the project.
The procedure is the same as adding a Java file, except
when you navigate to the folder where the jar file resides,
The above method, however, copies the jar file into the project folder. This is wasteful if the same jar file is used with many projects. There is a more economical way. JCreator allows you to define a set of jar files under a single name of your choice. Once a set is defined, you can add the whole set to any project.
Open a workspace with a project.
To define a set of
jar files, go to
Repeat as necessary, then click
Click on the checkbox next to the jar set to add these jars to the current project. For example:
Once a set of jars has been defined, JCreator remembers it and makes it available to any project in any workspace. Check the checkbox next to a set's name to add that set to the project.