|
|
JCreator external class development environment
Last modified:
12/06/2011 12:49 PM
Installing the JCreator external class development environment
To develop external classes, if you do not already have a Java development environment and if you work in Windows, you can use a freeware application called JCreator. Developed by Xinox Software, JCreator can be downloaded from http://www.jcreator.com/ .
With JCreator, you can write your classes in Java, and compile and test their integration in Thermoptim. To make things easier, a start-up workspace is provided. It is called Thopt15_JCreatorDemo.zip and makes use of the demo version.
Files Needed
To install the development environment, the following files, provided on the website or downloaded from the Internet, are necessary:
Presentation of the workspace
The workspace consists of the following:
Installing JCreator
In the following section, we are assuming that the reader is familiar with the basics of Java. Otherwise, we suggest reading a beginner's manual before trying to use the development environment. It is also best to install the documentation of the JDK (jdk118-doc.zip) as well as the documentation for Swing classes (SWING103.ZIP), which we consult regularly when developing in Java.
Before installing JCreator, you have to install the Java development environment distributed by Oracle, called the Java Development Kit, or JDK, which it uses to perform the compilations and execute the code that you develop. Java has evolved considerably in recent years, and it exists in several versions. There are three versions with major differences: version 1.0, which is hardly used anymore, version 1.1, supported by almost all systems and web browsers, and versions 1.2 to 1.5, also called Java 2, the most recent and most powerful, but also the most resource-consuming. For each of these versions, there are variants, indicated by a third digit (the latest version 1.1 is referenced 1.1.8). Because versions 1.0 and 1.1 are relatively rudimentary in terms of interfaces, Sun has developed a series of libraries called Swing or JFC (Java Foundation Classes), which are totally integrated into version 2, and of which several versions exist as well. Several versions of the JFC also exist. Thermoptim 1.5 to 1.7 use versions 1.1.6 or above JDK and Swing 1.0.3 classes.
To save system resources, Thermoptim versions 1.3 to 1.7 use JDK version 1.1.8, as well as the Swing classes 1.0.3. Consequently, you must install this version of the JDK. As indicated above, you should also install the JDK documentation. This will enable you to consult the API of the Java classes from JCreator.
Start by installing the JDK and its documentation, then JCreator. When you run JCreator for the first time, the software gives you the option of linking the extensions of certain files. Click OK unless you have a good reason not to. Then choose the file paths to the directories containing the JDK and its documentation.
Unpack the file JCreatorWorkspaceEdu.ZIP (or Thopt15_JCreatorDemo.zip), and place the generated folder in the folder named “myProjects” of the JCreator installation directory. This is a workspace containing all the files you need to work with Thermoptim. Add the archive ThoptEdu.jar or Thopt.jar of Thermoptim and inth.zip (version 1.5 or higher), as well as your license files (all of these files are located in the Thermoptim installation directory). Launch JCreator, select “File/Open Workspace” and choose choose "ThoptExterneEdu. Jws" or "ThoptDemo15.jcw".
The application cannot run correctly because it is not fully configured. Open the menu Projects/Project settings. You will see a screen like the one below. Verify which JDKs appear and which one is checked. If only JDK 1.1.8 is installed on your machine, go on to the next step. Otherwise, if JDK 1.1.8 appears but another JDK is checked, check JDK 1.1.8. If it is not listed, click “New” then select the installation directory of JDK 1.1.8 and click “OK”, then make sure it is checked.
Next you have to indicate the libraries required by your application, in this case all of the libraries Thermoptim needs to work, plus Thermoptim itself. Click on the tab “Required Libraries” then on “New” then “Add” and select from the “ThoptExterneEdu” directory the files that appear on the screen below: ThoptEdu.jar or Thopt.jar, extUser.zip, im.zip, inth.zip, extThopt.zip, gef060.jar, swingall.jar. Once the archives are selected, click “OK”. You can now start developing your external classes.
Documentation, API and source code of external classes
To guide you in your early work, Thermoptim documentation contains several examples treated and a third volume of the reference manual dedicated to external classes.
The API (Application Programming Interface) for the Thermoptim methods accessible from external classes is defined in the JavaDoc located in the folder "api_Thermoptim" of the development environment.
The source code of the base classes of the package extThopt is given in the form of a JCreator Workspace called ClassesExternes . These classes are already contained in the archive extThopt.zip and should not be loaded in the development environment. You can modify them, but they may no longer be compatible with the “official” versions of the Thermoptim external classes.
Appendix 1 of the third volume of the reference manual describes how they are used and gives a number of examples. Appendix 2 gives the code for the Thermoptim methods that return Vectors whose details it is useful to know for programming external classes. Appendix 3 contains a brief description of the methods in the Util class.
Finally, it is recommended to browse the code of basic classes of extThopt package that contain various methods that have been written to simplify the development work of external classes, and whose use is illustrated in the examples of classes that are provided. Their API is available in the "api_extThopt" folder of the Workspace.
Examples of external classes are provided and documented in the model library .
The Thermoptim external classes are governed by the CeCILL license under French law and abiding by the rules of distribution of free software. You can use, modify and/ or redistribute the software under the terms of the CeCILL license as circulatedby CEA, CNRS and INRIA.
As a counterpart to the access to the source code and rights to copy, modify and redistribute granted by the license, users are provided only with a limited warranty and the software's author, the holder of the economic rights, and the successive licensors have only limited liability.
In this respect, the user's attention is drawn to the risks associated with loading, using, modifying and/or developing or reproducing the software by the user in light of its specific status of free software, that may mean that it is complicated to manipulate, and that also therefore means that it is reserved for developers and experienced professionals having in-depth computer knowledge. Users are therefore encouraged to load and test the software's suitability as regards their requirements in conditions enabling the security of their systems and/or data to be ensured and, more generally, to use and operate it in the same conditions as regards security.
CRC_pa_7 |
|
Hosted by Center for Energy and Processes of Ecole des Mines de Paris -This site is powered by Zope,CPS, which includes CPSSkins. |