How To Use JCreator LE
How To Use JCreator LE
Downloading and Installing Configuring Default Properties <="" a="" style="text-decoration: none; ">Setting up Workspaces and Projects <="" a="" style="text-decoration: none; ">Entering and Running a Simple Program <="" a="" style="text-decoration: none; ">Choosing Which Program to Run Setting Up Command-Line Arguments Running Applets Adding jar Files to Projects
Click on the Directories node and enter C:\mywork (or a folder name of your choice) in the Default Project Directory line:
Click on the Code Insertion node and check the Start open brace on new line box. Then click OK.
Here the folder Ch02 contains the workspace file Ch02.jcw and three project folders for this workspace: Exercises, Hello, and HelloGui. To create an empty workspace, first create a folder for your workspace using Windows Explorer (for example, C:/mywork/JavaMethods/Ch03). Then open or return to JCreator, click on File/New, and choose Blank Workspace...: In the dialog box that pops up, navigate to the desired location for the workspace files (for example, C:\mywork\JavaMethods\Ch03 and enter the name for your workspace (for example, Ch03):
Click Finish. You can open an existing workspace by going to File/Open Workspace.... JCreator keeps track of recently opened workspaces and allows you to quickly open one of them and load all its projects. To do this, chooseFile/Recent Workspaces. To add a new project to the currently open workspace, go to Project/New Project... or File/New and choose Project.... Click onEmpty Project, then Next:
In the dialog box that pops up, enter the project name (for example, FirstSteps):
JCreator automatically adds the project name to the location lines. Click Finish. To delete a file from the project, click on that file in the file list and press Delete.
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 Build/Compile Project or press F7. To run the program, go to Build/Execute Project or press F5 or click on the Execute button (a triangle pointing to the right). 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: Go to Configure/Options... 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
Click OK twice. JCreator provides context-sensitive Java API help. To access API for a library class, position the cursor on the class's name in the source code and press Ctrl-F1.
Click OK twice. The chosen class becomes the default executable for F5, etc.
3. Create a new confiduration. Click on the pulldown arrow next to the Build/Execute Project button and choose Configuration.... ClickNew, enter a nickname for your program and pick the class to run from the pulldown list. For example:
Click OK twice. The nickname will be added to the list of executables under the Execute button.
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 Configure/Options menu and choose JDK Tools. The dialog box that pops up lets you copy the default configuration under a different name and edit it. In particular, you can create a configuration that prompts you for command-line arguments each time you run a program. See JCreator's help (under "Contents/How to" look for "How to set the Main function arguments"). You can choose a "global" configuration you want to use for a particular project from the Project/Project Settings... menu.
Running Applets
If your project contains an HTML file with an <applet> tag, JCreator assumes that your project is an applet and automatically dispatches Applet Viewer for that HTML file when you execute the project. If your project has several executables, you can pick the HTML file as the default or one of the executable configurations.
Click New... and in the dialog box that pops up enter a name of your choice for the set of jars, click on the Classes tab, and click on the "Add >" button. The submenu that pops-up gives you a choice of adding a "path" (a folder that contains .class files) or an "archive" (one or several jar files). Choose Add Archive..., navigate to the desired jar file(s), then click OK. The
Repeat as necessary, then click OK. Click on the checkbox next to the jar set to add these jars to the current project. For example:
Click OK. 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.
http://www.skylit.com/javamethods/faqs/javaindos.html