Interstage Shunsaku Data Manager Application Development Guide - Microsoft(R) Windows(R) 2000/ Microsoft(R) Windows Server(TM) 2003 - - UNIX -
Contents Index PreviousNext

Part 2 Developing Applications by APIs> Chapter 9 Developing Java Applications> 9.3 How to Use Java APIs> 9.3.1 Establishing a Connection

9.3.1.2 Establishing a Connection by Setting Java Properties

This section explains how to establish a connection by setting Java Properties.

mark1Entry Format for the Java Properties Object

connection.host= host name or IP address
connection.port= port number

mark2Entry Items

connection.host

Specify either the host name or the IP address of the connection destination.

connection.port

Specify the port number of the connection destination.

mark2Specification Example

When the host name is 'DirSvr1' and the port number is '33101'

connection.host=DirSvr1
connection.port=33101

mark1Sample Code

// Specify the file name
String sFileName = "Property.txt";

// Load the host name and port number from the file
Properties property = new Properties();
property.load(new FileInputStream(sFileName));

// Create a ShunConnection object
ShunConnection con = new ShunConnection(property);

mark1Sample Codes for Studio

When using Studio, specify code in the business class similar to that shown in the example above .


Contents Index PreviousNext

All Rights Reserved, Copyright(C) FUJITSU LIMITED 2006