What is the .\classes directory used for?

From Support
Jump to: navigation, search
What is the .classes directory used for?

The classes subdirectory of install_dir is automatically added to your classpath. Thus any classes, but not jars, in this directory are put in the server's classpath.

Configuring the full Server

In general, the Inprise Application Server is configured by server- and service-level properties. These properties can be managed using the Web Administration Tool and the Console. Please refer to the Inprise documentation for complete coverage, but here are a few facts.

If you wish to modify the VisiBroker properties of any of the services started by the Inprise Application Server, simply modify the Server's VisiBroker properties. In order to achieve this, simple right click on the server icon in the Console and select the "Edit Properties" menu option.

If you want the Inprise Application Server to find and access additional classes (for example, ones you've written), you can do this in any of the following ways:

  • Start the server with its classpath pointing to the directory or jar containing your classes: The server can have its classpath persistently supplemented by specifying a -classpath my_class_path in the file install_dir/properties/server/server_name/java.options. This is the recommended technique for loading additional classes.
  • Use the ias command's -classpath argument to supplement the server's classpath. (Also see the -cploc argument for controlling the position of user-specified classpaths.).
  • Use the ias command's -use:env argument to supplement the server's class path with your CLASSPATH environment variable.
  • Put the classes in the directory install_dir/classes. The classes subdirectory of install_dir is automatically added to your classpath. Note that with this method, classes cannot be in jar format.

Notes:

For Servlets and EJB jars (with an out-of-process container), the Inprise Application Server uses a custom class loader. This means that you can run Servlets and EJBs without first adding them to the classpath. It also means that Servlets and EJBs can be loaded and unloaded without restarting the server. This is a much more flexible way to use the Inprise Application Server, especially in a development environment where changes are frequent. Please refer to the Inprise documentation for information about how to configure servlets and deploy EJBs. You must restart the Application Server before changes to the classpath will take effect. By default, the server ignores the CLASSPATH environment variable. In order to modify the classpath, use one of the preceding techniques. There may be specific Java system properties that you wish to provide to the EJB Container (and other services), such as jdbc.drivers. These needs can be addressed in one of several ways depending on the requirements:

  • Persistently by: editing the file install_dir/properties/server/server_name/ejbcontainer/javaservice.propert ies and specifying these as arguments in the javaservice.jvm.arguments property. For example, javaservice.jvm.arguments=-Djdbc.drivers=oracle.jdbc.driver.OracleDriver specifying these as arguments in the install_dir/properties/server/server_name/java.options file.
  • Per invocation of the server, by passing in a Java system property as a -Dname=value argument to the ias command. The server will propagate the Java system property to the EJB Container.

 



Article originally contributed by Borland Developer Support