|
WebLogic Server 7.0 Code Examples, BEA Systems, Inc. | |||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||
java.lang.Object | +--examples.io.HelloWorld
This example illustrates the use of WebLogic File Services. HelloWorld looks for a file on the server, writes "Hello World" to the file if it is NOT there, reads the first 11 bytes of the file, and displays them.
The following sections cover what to do:
prompt> javac -d %CLIENT_CLASSES% HelloWorld.java
Name: mySys
Path: c:\\temp
prompt> java examples.io.HelloWorld t3://hostname:port mySys myfile>where:
Example:
prompt> java examples.io.HelloWorld t3://localhost:7001 mySys myfile
- Getting the file system mySys
- Getting the file myfile
- Writing to the file
- Reading from the file
- File contents: Hello World
prompt> java examples.io.HelloWorld t3://hostname:port myfile>
When a registered file system name is not specified, the local file system is used. File names are always absolute on a remote file system, but may be relative on a local file system.
| Constructor Summary | |
HelloWorld()
|
|
| Method Summary | |
static void |
main(java.lang.String[] argv)
Runs the HelloWorld file example. |
| Methods inherited from class java.lang.Object |
|
| Constructor Detail |
public HelloWorld()
| Method Detail |
public static void main(java.lang.String[] argv)
|
Documentation is available at http://e-docs.bea.com/wls/docs70 |
|||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||