Using JCreator

 

When JCreator starts up, there may be a workspace which is open, from the last use of the software.  If this is not the project you wish to work on, select FILE/CLOSE WORKSPACE.

 

Creating a new Project

 A project is just a ‘container’ for a group of classes which work together.

 

The simplest way to begin a new project is to:

    

1.)  Select Project/New Project/Empty Project

             

   You will be prompted for a location (folder) where this project will be stored.  

   Additionally, you must name the project. A  new folder will be created in the   

   location you specified , this folder will contain  project files.

 

  For example, if you specified your project location as c:\temp, and your  

  project name as FOO, your file would be created in the folder c:\temp\FOO.

 

2.) You may now create all the classes that you need for this project.

   

       To add a new class, select  Project/New Class.

 

       Enter a name for your class (be sure it matches the name which will appear  

       in the code), specify any code you would like auto-created for you by

       clicking the appropriate boxes, then select OK. 

 

       If your project icon, which you see  in the  window on the upper left, is 

       not open then open it by clicking on the ‘+’ next to the project name.

 

       Double click on the icon for the new class file.  The file will open and you  

       can now complete the class.

 

3.) If you have existing files which you wish to add to the class, you may add them at any time 

      by selecting Project/Add File.  This will ADD the file to the project configuration, but DOES  

      NOT move the physical file.  

 

      If you wish for added file  to be in the physical project folder, place the file in the actual

      project folder first, THEN use JCreator to add the file to the project.

 

 

    ** You can remove any class from the project by right clicking on it’s icon in the upper left 

         window, and selecting REMOVE.

Workspaces

 

A workspace is a ‘folder’ for one or more projects, which contains a file that keeps track of your work environment in addition to the project file.   You may specify an empty workspace, and then add projects to it.  If you only wish to have one project in your workspace you do NOT need to create one explicitly  --- the project folder will be used to contain the workspace (.jcw) file. 

 

Opening an Existing Project

 

   If you only wish to be working with one project, first close any workspace that may be open. 

 

   Select File/Open Workspace and browse to your workspace folder (or project folder if the are 

       the same – see above). Double click on your workspace file and your project will open.

 

   You may open a workspace when another is open, you will just need to use the Project /Set   

   Active Workspace to switch between the open workspaces.

 

Saving your work

 

    Be sure that you save your workspace occasionally (File/Save Workspace), to insure that you

    don’t lose any work.  And of course, save the workspace before exiting.

 

Running you Project

 

   Icons exist at the top of the screen for compilation, and execution.  You can best identify   

   these by working with the menus first.  CTRL key options also exist.

 

   To run the project, select BUILD/Compile Project.  

 

   If compile errors appear in the lower portion of the screen, you can click on an error to see   

   what code actually causes the error.

 

   If no errors occur,  BUILD/Execute Project will then run your project.

 

   **You can just compile the open file by selecting BUILD/Compile File.

 

Templates

 

If you plan to create a project which uses the AWT library for a frame application or an applet, you can select the  New JAVA APPLICATION option or New Java Applet.  This will allow you to give one name for both project and ‘primary’ class, and provide some started code for that class.  It is also possible to add a template for code for  you use frequently in your ‘home’ version of JCreator.

 

 

Submitting Program Files

 

As you are only asked to hand in .java files for your class programming assignments, you must copy these files from your project directory onto a disk (or attached to an email) when handing in your project.  Remember, these files are project  folder at the location you specified when creating the project.

 

If you have created your project in the lab and wish to bring it ‘home’, you have a couple of options:

 

1.)   The simplest way is to just copy the entire project folder onto a disk.  Check its size first, to make sure it will fit.

 

2.)   If the project folder will not fit, you can try deleting the .class files .  This may help.

 

3.)   If #1 and #2 still leave you with too much stuff, the .java files can be copied only.  Then you can create a new empty project on your home machine and add the files to it.