Corporate Info | News | Solutions | Products | Partners | Services | Events | Download | How To Buy
Installing and Setting up WebLogic Server 5.1: Previous topic | Next topic | Contents | Index

Setting up and Starting WebLogic Server 5.1

This section guides you through setting up your computer to run a single WebLogic Server. The steps listed here will prepare your computer to run WebLogic Server in a minimal, basic configuration. As you begin developing and deploying applications using WebLogic Server, you will define additional properties that set up the WebLogic services or Application Program Interfaces (API) that you use in your code. Additional information is available in the WebLogic Server Developers Guides for each API.

There are several ways you can start WebLogic Server. Window NT users can start WebLogic Server immediately after running the Install Shield by using the Windows Start Menu. The InstallShield distribution also allows Windows users to use Windows Convenience Programs to start WebLogic Server.

Additional ways of starting WebLogic Server, including Starting WebLogic Server from the command line, and Starting WebLogic Server using scripts are also described in this document. Follow the tasks listed below to correctly set your environment before using the command line or scripts to start WebLogic Server.

For information on setting up a WebLogic Cluster, please see Setting up a WebLogic Cluster, in the WebLogic Server documentation.

Tasks to set up and start WebLogic Server

1. Install a JDK

2. Setting the environment

   Setting the system PATH
   Setting the classpath
   Setting up the Java security manager for Java 2
   Installing a WebLogic license

3. Starting WebLogic Server

   Important note regarding WebLogic RMI over IIOP
   Starting WebLogic Server from the command line
   Starting WebLogic Server from the WebLogic Console
   Starting WebLogic Server using scripts

   Starting WebLogic Server on Windows NT

     Start Menu
     NT Service
     Windows Convenience Programs
     Starting WebLogic Server from the command line

4. Next steps

   Install JDBC drivers for use with WebLogic Server

   Other Documentation

Install a JDK

WebLogic Server requires that you have a Java Development Kit (JDK) installed on your computer. A JDK provides a Java runtime environment (the Java Virtual Machine or JVM) and tools for compiling and debugging your Java applications. There are versions of the JDK for Windows NT and Solaris available free from JavaSoft and SunSoft. JDKs for other platforms are available from the platforms' manufacturers.

These Java environments are constantly under revision and are frequently updated with new releases and bug fixes. For more information on the latest JDKs supported for running WebLogic Server, check the WebLogic Platform support page.

If you installed WebLogic Server on Windows NT using InstallShield, a Java Runtime Environment (JRE) is automatically installed and configured to run WebLogic Server. A JRE provides only a runtime environment, and does not include development tools such as compilers and debuggers. Many Java applications developed for deployment with WebLogic Server require that a compiler be available while an application is running. For these applications, you will need to install a JDK.

Native vs. Green Threads

Most JDKs include an option to run the JVM using native or green threads. Always run WebLogic Server using native threads. Some JVMs, such as the JDK 1.2.2 for Solaris default to green threads. Usually passing the -native option on the java command line will force the JVM to use native threads. However, this implementation is not consistent across JDKs. Consult the documentation for you JDK to make sure that you correctly specify the use of native threads.

Hot Spot

Hot Spot is an enhancement to the standard JVM that uses a Just-in-time compiler and other features designed to improve performance. If you want to use a Hot Spot JVM, check the WebLogic Server platforms page to make sure that its use is supported for your platform.

Under most JDKs you can specify that the Hot Spot JVM not be used by adding the -classic option to the java command line. This can be useful if you require thread dumps while debugging an application. Because Hot Spot uses a JIT, thread dumps are not available.

Setting the environment

If you wish to run WebLogic Server from the command line or with scripts, follow the procedures in this section to set up your system PATH, Java system classpath, WebLogic classpath, weblogic.properties file, weblogic.policy file, and licenses.

Setting the system PATH

Set your system PATH to include the java\bin directory of your JDK and the weblogic\bin directory. If you are using the type-2 WebLogic jDriver for Oracle, you must also include the path to both the Oracle-supplied and the BEA-supplied client libraries for your driver. See Installing WebLogic jDriver for Oracle for more information. On Windows NT, you would use the following command to set your path in a command window:

    $set path=c:\java\bin;c:\weblogic\bin;%path%

Where java is the directory containing your JDK and weblogic is the directory containing your WebLogic Server installation.

Setting the classpath

In the Java environment, the Java virtual machine uses the classpath to locate the classes it needs to run an application. Setting your classpath correctly is essential for running WebLogic Server or any Java application. WebLogic Server uses a process called dynamic class loading and therefore requires a combination of two settings for classpath:

- The command line -classpath option, which sets the Java system classpath. These are the classes WebLogic Server requires to start.

- A system property called weblogic.class.path, which sets the WebLogic classpath and specifies classes used while running WebLogic Server.

Although it is common practice for Java users to set the Java system classpath with the CLASSPATH environment variable, BEA recommends, when starting WebLogic Server, that you set your Java system classpath from the command line, using the -classpath option of the java command, which overrides any environment CLASSPATH setting. Using this procedure ensures that only the correct classes are loaded and that conflicting classes are not loaded.

Note: If you are using Microsoft SDK for Java (Jview) as your JDK, you must set the Java system classpath with the environment variable CLASSPATH. Using the /cp command line option to specify the Java system classpath will not allow WebLogic Server to start. For more information, see Microsoft SDK for Java (JView).

These instructions apply only to running WebLogic Server. If you will be running any WebLogic examples, Java utilities, WebLogic clients, or other Java applications, you will need to set the classpath appropriately for those applications. For more information see Setting classpath. You can also find instructions for setting the classpath in the documentation for the examples and utilities.

Upgrading from a previous release

If you are upgrading from any earlier release of WebLogic Server, you should pay special attention to classpath issues because the requirements have changed. WebLogic Server now uses a new class loader to load classes. The class loader requires that you specify the classpath differently and also requires you to update any scripts or shortcuts you use to run WebLogic Server.

If you have Enterprise Java Beans compiled under an earlier release, you must perform several steps, including re-compiling, to update them for use with this release. For more information, see Upgrading EJBs to WebLogic Server Version 5.1.

If you have any user-written or third party server-side classes, copy them to:

    c:\weblogic\myserver\serverclasses

If you have any user-written or third party client-side classes, copy them to

    c:\weblogic\myserver\clientclasses

Where c:\weblogic is the path to the directory where you installed WebLogic Server.

Setting your Java system classpath

The following must be included as arguments to the -classpath option on the java command line:

- /java/lib/classes.zip
  Omit if you are using Java 2 (JDK 1.2.x)

- /weblogic/classes/boot

- /weblogic/eval/cloudscape/lib/cloudscape.jar (This entry is necessary only if you will be using the Cloudscape DBMS.)

- /weblogic/lib/poolorb.jar (This entry is necessary only if you will be using WebLogic Enterprise Connectivity and JDK 1.2.x.)

  Where /weblogic is the path to the directory where you installed WebLogic Server and /java is the path to the JDK directory.

Setting your WebLogic classpath

The following must be included as values for the -Dweblogic.class.path property. These classes will be loaded using the Weblogic classloader:

- /weblogic/classes

- /weblogic/license

- /weblogic/lib/weblogicaux.jar

- /weblogic/myserver/serverclasses

- The path to any other third-party or user-written classes.
  Occasionally, you may encounter classes that cannot be placed in the WebLogic classpath. If you receive any unexplained "Class not found" errors, the problem may be that the class was written in such a way that it cannot be loaded with the class loader used by WebLogic Server. Such a class should be included in the Java system classpath as an additional argument to the -classpath option.

Example of setting classpath to run WebLogic Server under JDK 1.1.x (should be entered all on one line):

    $java -ms64m -mx64m -classpath
      c:/java/lib/classes.zip;
      c:/weblogic/classes/boot
      -Dweblogic.class.path=c:/weblogic/classes;
      c:/weblogic/license;
      c:/weblogic/lib/weblogicaux.jar;
      c:/weblogic/myserver/serverclasses weblogic.Server

Where c:/weblogic is the path to the directory where you installed WebLogic Server and c:/java is the path to your JDK directory.

Verbose output of classloader

To see the location of classes loaded by the WebLogic classloader, you can set the following property in the command line or script used to start WebLogic Server:

-Dweblogic.classloader.verbose=true.

When this property is set, the location of loaded classes will be displayed as WebLogic Server starts up.

Microsoft SDK for Java (JView)

The command line syntax for jview is different from the java command. To run WebLogic Server under jview, make the following substitutions:

- jview for java

- /d: for the -D option (to set properties)

Note that jview does not support the class loader used by WebLogic Server. A WebLogic Server started under jview will not be able to use the class loader to load classes from the WebLogic classpath (the classes normally specified with the weblogic.class.path property). Since the class loader is not used, you will not be able to use the Hot Deploy feature for deploying EJBs or servlets in a running WebLogic Server without having to restart the server.

Specify the following special property when starting the server under jview. This property prevents WebLogic Server from using the weblogic.class.path property to load classes:

    /d:weblogic.system.disableWeblogicClassPath=true

To run WebLogic Server under jview, do not specify the weblogic.class.path property on the command line. Instead, specify those classes that would otherwise go in the WebLogic classpath in the Java system classpath, with the environment variable CLASSPATH, along with the classes which normally belong in the Java system classpath.

    jview /d:weblogic.system.disableWeblogicClassPath=true
     weblogic.Server

Where c:\weblogic is the path to the directory where you installed WebLogic Server.

Using jview with WebLogic COM

If you are using WebLogic COM, also set your trusted classpath. See Using WebLogic COM for more information.

The WebLogic Frequently Asked Questions also has a section on jview.

Using jview with RMI

If you will be using RMI with jview, you must add the following zip file to your Java system classpath (by adding it to the CLASSPATH environment variable) when starting WebLogic Server:

    weblogic/lib/rmiForMs.zip

Where weblogic is the directory where you installed WebLogic Server

Starting WebLogic Server Statically

You can start WebLogic Server statically, without using the weblogic.class.path to specify its classes. This can be useful when using some Integrated Development Environments (IDE) or when running a debugger. However, when you start WebLogic Server statically, you can not deploy EJBs or servlets in a running WebLogic Server (re-starting WebLogic Server is required).

To start WebLogic Server statically:

1. Do not use the weblogic.class.path property on the command line. Instead, specify all of the classes required to start WebLogic Server and run your applications using the environment variable CLASSPATH. This includes the classes described in this document as belonging in the Java system classpath and those belonging in the WebLogic classpath.

2. Add the following property on the Java command line you use to start WebLogic Server:

       -Dweblogic.system.disableWeblogicClassPath=true

This property prevents WebLogic Server from using the weblogic.class.path property to load classes.

Cloudscape DBMS

WebLogic Server comes with a trial version of an all-Java database management system (DBMS) called Cloudscape. The WebLogic Tour and some of the example code shipped with WebLogic Server use this DBMS. You can also use it for testing if you do not have another DBMS available. If you will be using Cloudscape, you must include it in your Java system classpath. Normally third-party classes such as these should be included in the WebLogic classpath (with the weblogic.class.path property). However, due to some differences in the Cloudscape product, this jar file should be included in the Java system classpath (using the -classpath option). For additional information, see Using the Cloudscape database with WebLogic.

Setting up the Java security manager for Java 2

When you run WebLogic Server under Java 2 (JDK 1.2.x), the server uses a Java Security Manager to control access to system resources. Java Security Manager requires a security policy file to set up the permissions. The WebLogic distribution contains a security policy file (called weblogic.policy) that contains a set of default permissions that allows you to start WebLogic Server without creating your own security policy.

Modifying the weblogic.policy file for general use

Windows NT InstallShield users may skip the remainder of this section. InstallShield modifies the weblogic.policy file automatically.

To modify the weblogic.policy file included with your distribution:

1. Edit the following two lines in the weblogic.policy file, changing the items in bold to match the location of the directory where you installed WebLogic Server:

       grant codeBase "file:/c:/weblogic/-" {

       permission java.io.FilePermission "c:${/}weblogic${/}-", ...

2. Set these two properties on the Java command line when you start WebLogic Server:

   - java.security.manager tells the JVM to use a security policy. You do not need to specify any arguments to this property.

   - java.security.policy tells the JVM the location of the security policy file to use. The argument is the fully qualified file name of the security policy file, in this case, weblogic.policy.

     For example,

         $ java ... -Djava.security.manager
          -Djava.security.policy==c:/weblogic/weblogic.policy

     Be sure to use "==" instead of "=" when specifying java.security.policy, so that only the weblogic.policy file is used by Java security manager. The == causes the weblogic.policy file to override any default security policy. A single equal sign causes the weblogic.policy file to be appended to an existing security policy. For more information on setting up a security policy, see the article Default Policy Implementation and Policy File Syntax on the JavaSoft website.

Modifying the weblogic.policy file for third party or user-written classes

The best location for your server-side user code is the weblogic/myserver/serverclasses directory. If you have third party or user-written classes that are not in that directory, also:

1. Copy the entire block of code in the weblogic.policy file from "grant codebase ..." to the closing bracket and semicolon.

2. Paste the selection back into the weblogic.policy file below the section you just copied.

3. Edit the grant codeBase and the permission java.io.FilePermission statements so that the directories point to the location of your third party or user-written code.

   This procedure creates a security policy for your code that contains exactly the same permissions as those for the WebLogic Server. You should examine these permissions closely to make sure that this is the security policy you want to use for those directories. For more information on setting up a security policy, see the article Default Policy Implementation and Policy File Syntax on the JavaSoft website.

   Caution: Using JavaSoft JDK version 1.2.1 on UNIX systems applies security policy improperly if your WebLogic software is not installed in the root directory of the file system or disk drive. Policy is only applied correctly if the path in a grant codeBase URL has just one component. For example, if you install WebLogic Server in c:\test\weblogic, (or even /home/weblogic on Solaris), you will see AccessControlExceptions even though you use the correct URL in your policy file.

   To work around this limitation, you can either install WebLogic in the root directory (recommended) or modify the URL so that it contains only the first component of the path to your WebLogic installation, for example:

   grant codeBase "file:/c:/test/" {

   Problems occur when using "/-" in the specified URL. This has been acknowledged by Sun Microsystems as bug # 4261298, but they have determined that this is not a bug in their JDK. They state, "when a path is trailed with "/-" it means that the element preceding it is a directory and that grant functions for all elements below it. It does not mean that you can read the directory itself." The workaround for this nuance is to add an additional FilePermission entry that consists of just the directory itself (with no trailing "/-").

Installing a WebLogic license

Your WebLogic distribution requires a valid license to run. This section tells you how to install and update WebLogic licenses.

Evaluation licenses

An evaluation copy of WebLogic Server is enabled for 30 days so you can start using WebLogic Server immediately. To use WebLogic Server beyond the 30-day evaluation period or to use clustering features, you will need to contact your salesperson about further evaluation or purchasing a license for each IP address on which you intend to use WebLogic Server. All WebLogic Server evaluation products are licensed for use on a single server with access allowed from up to 3 unique client IP addresses.

If you downloaded WebLogic Server from the BEA website, your evaluation license is included with the distribution. InstallShield users will also receive a password by email. The InstallShield program will prompt you for this password during the installation process.

If you obtained WebLogic Server from an evaluation CD, follow the instructions on the CD for obtaining an evaluation license.

Other licenses

When you purchase a license for WebLogic Server you will receive a set of license keys by email. To use these keys, follow the instructions below, under Updating a license.

Updating a license

You need to add new keys to your existing license file if you have purchased more software, if you have applied for and received an extension to your 30-day evaluation, or if you get a new distribution that includes new products. You will receive a set of permanent, non-expiring license keys by email as an attachment after purchase. If you are evaluating WebLogic Server's clustering feature, you may receive a set of evaluation keys for clustering.

To add new license keys to your existing license file:

1. Open the message containing the keys you received by email when you purchased a license from BEA Systems, Inc.

2. Open the WebLogicLicense.xml file in a text editor. (Make sure you don't edit this file in Microsoft Word, or any other word-processing program that will save the file as a binary.)

3. Copy the keys from the email and paste them at the top of the XML file, after the <WEBLOGIC-LICENSES> tag.

   For example, a key for clustering looks something like this:

       <WEBLOGIC-LICENSES>

       <LICENSE PRODUCT="WebLogic/ClusterII"
        IP="000.000.900.900"
        UNITS="5"
        EXPIRATION="31-Mar-2001"
        KEY="w20f8s08480v0adpup3485paprtnp8ac"
       />

       ... </WEBLOGIC-LICENSES>

4. Save the WebLogicLicense.xml file into your WebLogic license directory. If you have installed with defaults, that will be /weblogic/license.

5. Save your license key information and a copy of your WebLogicLicense.xml file in a safe place outside the WebLogic distribution. Although no one else will be able to use your license keys, you should probably save this information in a place protected from either malicious or innocent tampering by others. When you upgrade WebLogic Server, keep your original WebLogicLicense.xml and add new keys to it for any new services you purchase.

Upgrading licenses from a previous release

Prior to release 4.0 of WebLogic Server, licenses were distributed in a compiled Java .class format. WebLogic licenses are now distributed in an XML format. If you are upgrading from an earlier release of WebLogic Server, please copy your license files, called either WeblogicLicense.XML or WebLogicLicense.class to your weblogic/license directory. (Where weblogic is the directory containing your WebLogic Server installation.)

If you purchase more than one product from WebLogic, you will have more than one entry in your license file. If you have purchased licenses for versions previous to 4.0, you may also have a .class format license file. All of your license files can be used together. When the WebLogic Server starts up, it looks for multiple license files in both formats in the following order:

1. .class files in the weblogic/license directory

2. .XML files in the directory specified with the weblogic.system.home property

3. .XML files in the WebLogic Server classpath.

If WebLogic Server encounters an expired license, it will not continue to look for additional licenses. For this reason you should remove expired license keys from your license files. (If you are using a .class license file, you must recompile the WeblogicLicense.java file after removing the expired license.)

Always restart WebLogic Server after making any changes to your license files.

For users who have .class license files, BEA recommends that you use the convertLicense utility to convert your license file to an XML format license. You can then combine your XML licenses into a single file by cutting and pasting between the two files. For information on editing an XML style license, see Installing a WebLogic License.

If you need to add license keys to an older class-style license, please see Installing a WebLogic License.

Starting WebLogic Server on Windows NT

Start Menu

If you installed WebLogic Server on Windows with the InstallShield kit, you can use the WebLogic Server shortcut on the Windows start menu to start the WebLogic Server. Click on:

Start->Programs->WebLogic 5.1->WebLogic Server.

You can use the wlconfig utility to select the various defaults used when starting WebLogic Server from the Start menu. See Windows Convenience Programs for more information about this utility.

NT Service

You can also run WebLogic Server as a Windows NT service. When installed as an NT service, WebLogic Server will start automatically when you boot the Windows NT computer. A WebLogic Server started in this way will use the same start up parameters (stored in the Windows Registry) that are used when starting a WebLogic Server using the Windows start menu or the Windows convenience program wlserver.exe. These parameters may be changed by using the wlconfig.exe program, described under Windows Convenience Programs.

For additional information, see Using WebLogic Server as an NT 4.0 service.

You must have administrator-level privileges to either install or uninstall an application as an NT service.

To install WebLogic Server as a Windows NT service:

1. Switch to the weblogic\bin directory.

2. Run install.exe. For example,

       c:\weblogic\bin> install.exe

3. If you wish to run multiple instances of WebLogic Server as NT services, name the instances by adding an additional parameter specifying the name for each server instance. For example:

       c:\weblogic\bin> install -name thisWebLogicServer

   Multiple instances of WebLogic Server can be useful when testing WebLogic Clusters on a single computer. There is additional information available on Installing and removing multiple WebLogic NT services.

Windows Convenience Programs

The following programs (Windows NT only) may be run from the weblogic/bin directory:

Note: The names of these programs changed as of Version 5.0 of WebLogic Server:

t3config is now wlconfig
t3server is now wlserver
t3console is now wlconsole

dbping.exe
  Tests your connection to a database.
  Arguments:

DBMS
  Can be one of the following:
  ORACLE
  MSSQLSERVER4
  INFORMIX4
user
  Valid username for database login. Use the same values and format that you use with isql for SQL Server, sqlplus for Oracle, or DBACCESS for Informix.
password
  Valid password for the user. Use the same values and format that you use with isql, sqlplus, or DBACCESS.
DB
  Name of the database. The format varies depending on the database and version. Use the same values and format that you use with isql, sqlplus, or DBACCESS. Type 4 drivers, such as MSSQLServer4 and Informix4, need additional information to locate the server since they cannot access the environment.
  For example:
  $ dbping ORACLE scott tiger demo

install.exe
  Installs WebLogic Server to run as a Windows NT service.

remove.exe
  Removes WebLogic Server as a Windows NT service.

wlconfig.exe
  Makes changes to your installation configuration. Note that wlconfig.exe changes settings in the Windows NT registry and therefore these settings will remain the defaults until you run wlconfig.exe again. These settings are used when running the wlserver.exe convenience program (see below), when running WebLogic Server as an NT service, and when running WebLogic Server from the start menu.
  The following options are available for wlconfig.exe. If no options are specified, wlconfig.exe prints a list of the current settings.

-help
  Prints a list of optional arguments for the wlconfig.exe command.
-ms SizeInMb
  Sets the initial Java heap size (in megabytes).
  See WebLogic Server Performance Tuning Guide for information on setting heap size.
-mxSizeInMb
  Sets the maximum Java heap size (in megabytes).
  See WebLogic Server Performance Tuning Guide for information on setting heap size.
-JAVA_HOME path
  Changes the JDK/JRE runtime directory on which the WebLogic Server installation depends. The default points to the directory where you installed the WebLogic distribution (for example, c:\weblogic), which is packaged with its own JRE.
-classpath path
  Changes the system classpath on which the WebLogic Server installation depends. The default is unset; that is there are no directories in the classpath.
-Dproperty=value
  Use the -D command to change other properties. These properties are stored in the Windows Registry and are used as command line arguments when starting the server using wlserver.exe, the Start menu, and when starting as an NT service.

wlconsole.exe
  Runs the WebLogic Console, an administrative tool.

wlserver.exe
  Runs WebLogic Server with the defaults defined by running wlconfig.exe (see above).

version.exe
  Displays the current version of your WebLogic Server.

Starting WebLogic Server from the command line

The WebLogic Server is a Java class file, and like any Java application, you can start it with the java command. These instructions describe the options you need to include when starting WebLogic Server from the command line. The startup options described here will start WebLogic Server in a minimal configuration. To use any of the APIs or services of WebLogic Server, you should consult the Developers Guides, API Reference, and Deployment Guides included with the WebLogic Server documentation.

You will notice that the command lines required to start WebLogic Server can be quite lengthy and tedious to type. To make sure that your start-up commands are accurate, BEA recommends that you incorporate these command lines into scripts that you can then use to start WebLogic Server. For more information, see Starting WebLogic Server using scripts

Important note regarding WebLogic RMI over IIOP

If you are using WebLogic RMI over IIOP, see Using WebLogic RMI over IIOP.

Requirements for Starting WebLogic Server

The following are required when starting WebLogic Server:

- Start WebLogic Server with the Java -ms64m and -mx64m options. These options allocate a minimum and maximum of 64 megabytes of Java heap memory to the WebLogic Server. These values assigned to these parameters can dramatically effect the performance of your WebLogic Server and are provided here only as general defaults. In a production environment you should carefully consider the correct memory heap size to use for your applications and environment. For more information on setting heap size, See WebLogic Server Performance Tuning Guide.

- Set your -classpath option and weblogic.class.path as shown in Setting your WebLogic classpath. These are the minimum requirements for classpath:

  - -classpath c:/java/lib/classes.zip;c:/weblogic/classes/boot

    If you are using Java 2, omit c:/java/lib/classes.zip from the -classpath option.

  - -Dweblogic.class.path=c:/weblogic/classes;
    c:/weblogic/license;c:/weblogic/lib/weblogicaux.jar;
    c:/weblogic/myserver/serverclasses

    Where c:/weblogic is the directory where you installed WebLogic Server and c:/java is the path to your JDK.

- If you are using Java 2, set the java.security.manager property and the java.security.policy property to point to the location of the weblogic.policy file. (See Setting up the Java security manager for Java 2 for information on setting up your weblogic.policy file).

- If you are not starting WebLogic Server from the installation directory, add

      -Dweblogic.system.home=c:/weblogic

  Where c:/weblogic is the directory containing your weblogic.properties file. (This is usually the same as the directory where you installed WebLogic Server.)

- If you are using third-party container managed persistence, add the following property to the command line:

      -Dweblogic.home=weblogic

  Where weblogic is the path to the directory where you installed WebLogic Server. Note that this property is different than the weblogic.system.home property.

Command line examples

Here are some sample command lines you can use to start WebLogic Server. These examples assume that you installed WebLogic Server in the c:/weblogic directory and that your JDK 1.1 is located in the c:/java directory. Modify these commands, substituting the correct directories for your installation.

The samples also assume that you are starting WebLogic Server from the installed directory. If you are starting from a different directory, add the following property to the command line, substituting the directory containing your WebLogic Server installation:

    -Dweblogic.system.home=c:/weblogic

Where c:/weblogic is the directory containing your weblogic.properties file. (This is usually the same as the directory where you installed WebLogic Server.)

Although these examples are broken into multiple lines for readability, the commands should be entered as one line.

JDK 1.1.x example

     $ java -ms64m -mx64m -classpath
      c:/java/lib/classes.zip;
      c:/weblogic/classes/boot
      -Dweblogic.class.path=c:/weblogic/classes;
      c:/weblogic/license;c:/weblogic/lib/weblogicaux.jar;
      c:/weblogic/myserver/serverclasses weblogic.Server

JDK 1.2 (Java 2) example

     $ java -ms64m -mx64m -classpath c:/weblogic/classes/boot
      -Dweblogic.class.path=c:/weblogic/classes;
      c:/weblogic/license;c:/weblogic/lib/weblogicaux.jar;
      c:/weblogic/myserver/serverclasses
      -Djava.security.manager
      -Djava.security.policy==c:/weblogic/weblogic.policy
      weblogic.Server

Jview example

    $ jview /d:weblogic.system.disableWeblogicClassPath=true
       weblogic.Server

There is important information you should be aware of when using Jview. Please read the section Microsoft SDK for Java (JView).

Additional options:

- If you are not starting WebLogic Server from its installed directory, add:

  -Dweblogic.system.home=c:/weblogic (or the directory containing your weblogic.properties file)

- If you will be using the Cloudscape DBMS, add:

  c:\weblogic\eval\cloudscape\lib\cloudscape.jar to the -classpath option.

- Add the location of any third-party or user-written classes to the weblogic.class.path property. (When running under jview, place these in the Java system classpath, with the /cp option.)

Starting WebLogic Enterprise Connectivity

To start WebLogic Enterprise Connectivity with JDK 1.2 (Java 2), add the following to the Java system classpath:

     c:/weblogic/lib/poolorb.jar

For more information, see the Developers Guide Using WebLogic Enterprise Connectivity.

Starting WebLogic Server from the WebLogic Console

The WebLogic Console is a pure-Java GUI management console where you can monitor WebLogic Server performance and other aspects of the WebLogic Server's environment. You can also use the console to start WebLogic Server. For more information, see Running the WebLogic Console.

To start WebLogic Server from the console:

1. Start the console from the Windows NT start menu by selecting
   Start->Programs->WebLogic->WebLogic Console, or use the following command:

       $ java -mx32m -classpath c:/java/lib/classes.zip;
        c:/weblogic/classes;
        c:/weblogic/lib/weblogicaux.jar weblogic.Console

   Where c:/java is the path to your JDK (this may be omitted when running under Java 2) and c:/weblogic is the path to your WebLogic Server installation.

   You can also start the WebLogic Console with the supplied scripts, startConsole.sh (UNIX) and startConsole.cmd (Windows NT), and startConsoleJview.cmd (Windows NT running under Microsoft SDK for Java). These scripts are located in the root directory of your WebLogic distribution.

   You will need to modify these scripts for your environment. See Starting WebLogic Server using scripts.

2. From the console menu bar, click on:

   File ->Start a new WebLogic Server or Cluster.
   A dialog box will appear. Fill in the following information:

   Name of the server
     The name of the WebLogic Server you are starting. This parameter is used when identifying WebLogic Servers within a WebLogic Cluster. The default name for starting a single WebLogic Server is myserver.
   WebLogic home
     The directory where you installed WebLogic Server.
   Enable cluster
     Check this box if you are starting a WebLogic Server as part of a WebLogic Cluster.
   Cluster name
     The name of the WebLogic Cluster that this WebLogic Server will join.
   Advanced
     The Advanced button opens a dialog box where you can set the Listen port, SSL listen port, Java heap size, Multicast address, and bind address.

3. A dialog box will pop up saying that WebLogic Server has started successfully. Click OK.

4. Another dialog box labeled "Attach to WebLogic running WebLogic server" will appear. Fill in the following information:
   User
     For privileged, administration-level access the user is always system.
   Password
     This is the password you entered when installing WebLogic Server. It is stored in the weblogic.properties file under the property weblogic.password.system.
   DNS host name
     The host name of the machine running WebLogic Server. The default is localhost.

Starting WebLogic Server using scripts

Sample scripts are provided with the WebLogic distribution that you can use to start WebLogic Server. You will need to modify these scripts to fit your environment and applications: The scripts are called startWebLogic.sh (UNIX) and startWeblogic.cmd (Windows NT). These scripts are located in the root directory of your WebLogic distribution.

To use the supplied scripts:

- Pay close attention to classpath settings and directory names.

- Change the value of the variable JAVA_HOME to the location of your JDK.

- UNIX users must change the permissions of the sample UNIX script to make the file executable. For example:

      chmod +x startWebLogic.sh

Next steps

Set up your development environment

Scripts called setEnv.cmd (Windows NT) or setEnv.sh (UNIX) are included in the root directory of your WebLogic Server installation. These scripts will set up the appropriate environment for development and running the code examples included with WebLogic Server. You will need to modify these scripts somewhat for your environment. For more information, see Setting your development environment.

Install JDBC drivers for use with WebLogic Server

If you will be using a JDBC driver for database access, see the following links:

Oracle

Installing WebLogic jDriver for Oracle. Users upgrading from an earlier release of WebLogic Server should pay special attention to their Oracle configuration. There are now several versions of this driver available and these additions require that you set your PATH (Windows NT) or shared library path (Unix) differently.

Using the Oracle thin driver with WebLogic Server contains information on using Oracle's thin driver (available from Oracle).

Informix

Installing WebLogic jDriver for Informix.

Microsoft SQL Server

Installing WebLogic jDriver for Microsoft SQL Server.

Sybase

The jConnect JDBC driver from Sybase is now bundled with WebLogic Server. For information on using this driver with WebLogic Server, see Using the Sybase jConnect driver.

Other Documentation

- Using WebLogic Clusters.

- WebLogic Developer Center

- WebLogic Administrators Guides

- WebLogic Developers Guides

- WebLogic API Reference

- WebLogic Server comes with many code examples to help you get started. See the Guide to the WebLogic code examples.

Copyright © 2000 BEA Systems, Inc. All rights reserved. Required browser: Netscape 4.0 or higher, or Microsoft Internet Explorer 4.0 or higher.