ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzaha_5.4.0.1/interpro.htm

85 lines
6.3 KiB
HTML
Raw Normal View History

2024-04-02 14:02:31 +00:00
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="security" content="public" />
<meta name="Robots" content="index,follow" />
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
<meta name="DC.Type" content="concept" />
<meta name="DC.Title" content="Interprocess communications" />
<meta name="abstract" content="When communicating with programs that are running in another process, there are a number of options." />
<meta name="description" content="When communicating with programs that are running in another process, there are a number of options." />
<meta name="DC.Relation" scheme="URI" content="othlang.htm" />
<meta name="DC.Relation" scheme="URI" content="jni.htm" />
<meta name="DC.Relation" scheme="URI" content="rzahapaseexmplsmain.htm" />
<meta name="DC.Relation" scheme="URI" content="rzahateraspacemain.htm" />
<meta name="DC.Relation" scheme="URI" content="ilejava.htm" />
<meta name="DC.Relation" scheme="URI" content="javalang.htm" />
<meta name="DC.Relation" scheme="URI" content="sockets.htm" />
<meta name="DC.Relation" scheme="URI" content="iostream.htm" />
<meta name="DC.Relation" scheme="URI" content="callcex.htm" />
<meta name="DC.Relation" scheme="URI" content="calrpgex.htm" />
<meta name="copyright" content="(C) Copyright IBM Corporation 2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="interpro" />
<meta name="DC.Language" content="en-us" />
<!-- All rights reserved. Licensed Materials Property of IBM -->
<!-- US Government Users Restricted Rights -->
<!-- Use, duplication or disclosure restricted by -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
<link rel="stylesheet" type="text/css" href="./ic.css" />
<title>Interprocess communications</title>
</head>
<body id="interpro"><a name="interpro"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Interprocess communications</h1>
<div><p>When communicating with programs that are running in another process,
there are a number of options.</p>
<p>One option is to use <a href="sockets.htm">sockets</a> for interprocess
communication. One program can act as the server program that listens on a
socket connection for input from the client program. The client program connects
to the server with a socket. Once the socket connection is established, either
program can send or receive information.</p>
<p>Another option is to use <a href="iostream.htm">stream files</a> for
communication between programs. To do this, use the System.in, System.out,
and System.err classes.</p>
<p>A third option is to use the <a href="../rzahh/page1.htm" target="_blank">IBM<sup>®</sup> Toolbox for Java™</a> which provides data queues and iSeries™ message
objects.</p>
<p>You can also call Java from other languages. See <a href="callcex.htm">Example:
Call Java from
C</a> and <a href="calrpgex.htm">Example: Call Java from
RPG</a> for more information.</p>
</div>
<div>
<ul class="ullinks">
<li class="ulchildlink"><strong><a href="sockets.htm">Use sockets for interprocess communication</a></strong><br />
Sockets streams communicate between programs that are running in separate processes.</li>
<li class="ulchildlink"><strong><a href="iostream.htm">Use input and output streams for interprocess communication</a></strong><br />
Input and output streams communicate between programs that are running in separate processes.</li>
<li class="ulchildlink"><strong><a href="callcex.htm">Example: Call Java from C</a></strong><br />
This is an example of a C program that uses the system() function
to call the Java Hello program.</li>
<li class="ulchildlink"><strong><a href="calrpgex.htm">Example: Call Java from RPG</a></strong><br />
This is an example of an RPG program that uses the QCMDEXC API
to call the Java Hello program.</li>
</ul>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="othlang.htm" title="With Java, you have multiple ways to call code that was written in languages other than Java.">Java with other programming languages</a></div>
</div>
<div class="relconcepts"><strong>Related concepts</strong><br />
<div><a href="rzahapaseexmplsmain.htm" title="The iSeries Java virtual machine (JVM) supports the use of native methods running in the i5/OS PASE environment. Prior to V5R2, the native iSeries JVM used only ILE native methods.">IBM i5/OS PASE native methods for Java</a></div>
<div><a href="rzahateraspacemain.htm" title="The iSeries Java virtual machine (JVM) now supports the use of teraspace storage model native methods. The teraspace storage model provides a large process-local address environment for ILE programs. Using teraspace allows you to port native method code from other operating systems to i5/OS with little or no source code changes.">Teraspace storage model native methods for Java</a></div>
<div><a href="ilejava.htm" title="The Java environment on an iSeries server is separate from the integrated language environment (ILE). Java is not an ILE language, and it cannot bind to ILE object modules to create programs or service programs on an iSeries server.">Comparison of Integrated Language Environment and Java</a></div>
<div><a href="javalang.htm" title="Use the java.lang.Runtime.exec method to call programs or commands from within your Java program. Using java.lang.Runtime.exec() method creates one or more additional thread-enabled jobs. The additional jobs process the command string that you pass on the method.">Use java.lang.Runtime.exec()</a></div>
</div>
<div class="reltasks"><strong>Related tasks</strong><br />
<div><a href="jni.htm" title="You should only use native methods in cases where pure Java cannot meet your programming needs.">Use the Java Native Interface for native methods</a></div>
</div>
</div>
</body>
</html>