Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

re AS400's CommandCall class in Java

 
Eung maeng
Ranch Hand
Posts: 68
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am trying to use CommandCall. however,i am getting error in compiling.
please anyone can correct me. what should i import for CommandCall class?

e.g
import java.io.Serializable;
import java.lang.Object;
import com.ibm.as400.access.AS400;
import com.ibm.as400.access.CommandCall; // <-----here error

public class CommandCall extends java.lang.Object
implements java.io.Serializable {


public CommandCall() {

// Work with commands on server named "Hal."
AS400 system = new AS400("ibas4011");
CommandCall command = new CommandCall(system);

}//end of public

public static void main ( String args[]){
CommandCall commandCall = new CommandCall();
}// end of main class

}

please correct to me. thanks a lot,
 
Bupjae Lee
Ranch Hand
Posts: 107
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think the reason of this error is 'ambiguous class name'

Two class "com.ibm.as400.access.CommandCall" and (default package)"CommandCall" try to use same simple name "CommandCall", and the compiler complains about this fact.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic