Skip to Main Content

Hardware

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Oracle Server X5-4 - Operating Systems

jimmy638-OracleMay 26 2015 — edited Jun 2 2015
Oracle Operating Systems

(All Operating Systems are 64-bit, unless specified)


Operating Systems

Minimum Version Supported

Oracle Solaris

Oracle Solaris 11.2 SRU9

Oracle Linux

Oracle Linux 6.6 (UEK R3 qu5 )

Oracle VM

Oracle VM Server 3.3.2



3rd Party Operating Systems

(All Operating Systems are 64-bit, unless specified. All Windows Server certifications include the Hyper V related certifications)

Operating Systems

Minimum Version Supported

Microsoft Windows Server

Microsoft Windows Server 2012 and Microsoft Windows Server 2012 R2 (Post Release)

VMware

VMware ESXi 6.0 (Post Release)

Red Hat Enterprise Linux

Red Hat Enterprise Linux 6.6 (Post Release)

Oracle Linux combined with Oracle's Unbreakable Enterprise Kernel brings the latest Linux innovations to market, delivering extreme performance, advanced scalability, and reliability for enterprise applications.

Comments

A RMI client talks to a RMI server.

Did you write the C++ program to be a RMI server or client? Since writing a C++ program as a RMI server would be a fairly difficult undertaking and one would really understand RMI when done with it, I would guess that your exe is not a RMI server.

What you could do is write a RMI server in java. Then every time your client called a method on your RMI object it would cause the server to run the C++ exe by using Runtime.exec(). The server would collect the result and return it.
843829
Hi,

I have write a RMI server in java and use it to run my C++ exe. Same as you said. But it still can't return anything to me. I have checked the return stream from this process. Nothing inside.

Any idea??

Thx. a lot

Francis
You would have to provide more information before I could possibly have any ideas. Such as what 'nothing inside' means.

I suggest you seperate out the RMI code from the exec code. Get one piece to work and then the other and then combine them back together.

And use lots of System.out.println().
843829
Dear,

I have used the function available( ) to check the stream. But it return 0. So I said it is nothing inside.

And would you mind give me some examples about this. As I am a newbie in JAVA programming.

Thx.

Francis
You used available() to check which stream?

Presumably you mean the output from the Runtime.exec()? How many times did you check it? Did you wait for the process to terminate?

Reduce the code to the exec() code only and then post it.
843829
Dear,

Here is my code to run the Runtime.exec()

Process tmp = Runtime.getRuntime().exec( cmd )
OutputStream a = Runtime.getOutputStream
int ok = a.available();

And I want to ask how to wait process terminate?

Thx. a lot

Francis
Waiting...

int exitResult = tmp.waitFor();
if (exitResult != 0) {* probably not good*/}
843829
have you tried using exitValue() ? it returns 0 if the subprocess termintated normally
843829
have you tried using exitValue() ? it returns 0 if the
subprocess termintated normally
i should add that 0 is the usual return value. your app could return another value for normal termintation
843829
Dear,

It has returned 0. But I still can't get back the value from C program.

Thx. a lot

Francis
If waitFor returned zero then that is the exit value of the application that is being run. If you expect another value I would suggest looking at how the application is run (for instance if it is being run in a script/batch file that has nothing to do with java.) Or that you reexamine why you think it should be returning something besides zero.

1 - 11

Post Details