Problem in Compiling Client program
1 posts in topic
Flat View  Flat View

Posted By:   jovie_chen
Posted On:   Sunday, May 27, 2001 11:41 PM

Dear All,

I am now using JDK1.3 to run corba application. Now I am using Stringified Object References in Java.

But I have error in compiling the the client file.

The error is as below:-
Reference to DataInputStream is ambiguos, both class java.io.DataInputStream in java.io and class org.omg.Corba.DataInputStream in org.omg.Corba match

DataInputStream dataInputStream= new DataInputStream(fileInputStream);

Please kindly assist me on this. I am new in Corba and Java.
Please and thank you a lot.

Jovie (Ms)

Re: Problem in Compiling Client program

Posted By:   Dermot_Hennessy  
Posted On:   Monday, May 28, 2001 01:53 AM

Hi Jovie,

The problem that you are experiencing may result from the fact that you are importing both java.io.DataInputStream and org.omg.Corba.DataInputStream in your application.

I can't tell from the context which one you require, but the way to get around the problem is to fully scope your declaring code as follows:

dataInputStream = new java.io.DataInputStream(fileInputStream)
dataInputStream = new org.omg.DataInputStream(fileInputStream); 

Hope this helps,

About | Sitemap | Contact