public ServiceLocatorException(String msg,Throwable cause){ super(msg,cause);//Exception确实没有这个构造方法呀! }
是的 Exception中只有(String msg) 这种构造方法你可以改一下
Exception public Exception(String message, Throwable cause)Constructs a new exception with the specified detail message and cause. Note that the detail message associated with cause is not automatically incorporated in this exception's detail message.我看错了么,而且我在eclipse中也写了这个啊
Exception() Constructs a new exception with null as its detail message.Exception(String message) Constructs a new exception with the specified detail message.Exception(String message, Throwable cause) Constructs a new exception with the specified detail message and cause.Exception(Throwable cause) Constructs a new exception with the specified cause and a detail message of (cause==null ? null : cause.toString()) (which typically contains the class and detail message of cause).以上是我查到的JAVA2 Version 1.4.2中的四个构造方法
我也不清楚 是不是JDK版本问题?
没用过jbuilder,看看应该是可以的呀
to ZeroC(笨小孩) 再Eclipse中,您用的是jdk1.4编译模式还是1。3那?
1.3.1的api Exception public Exception()Constructs an Exception with no specified detail message.--------------------------------------------------------------------------------Exception public Exception(String s)Constructs an Exception with the specified detail message确实是版本的问题,那个构造方法是jdk1.4.1的
super(msg,cause);//Exception确实没有这个构造方法呀!
}
Exception中只有(String msg) 这种构造方法你可以改一下
public Exception(String message,
Throwable cause)Constructs a new exception with the specified detail message and cause.
Note that the detail message associated with cause is not automatically incorporated in this exception's detail message.我看错了么,而且我在eclipse中也写了这个啊
Constructs a new exception with null as its detail message.Exception(String message)
Constructs a new exception with the specified detail message.Exception(String message, Throwable cause)
Constructs a new exception with the specified detail message and cause.Exception(Throwable cause)
Constructs a new exception with the specified cause and a detail message of (cause==null ? null : cause.toString()) (which typically contains the class and detail message of cause).以上是我查到的JAVA2 Version 1.4.2中的四个构造方法
是不是JDK版本问题?
再Eclipse中,您用的是jdk1.4编译模式还是1。3那?
Exception
public Exception()Constructs an Exception with no specified detail message.--------------------------------------------------------------------------------Exception
public Exception(String s)Constructs an Exception with the specified detail message确实是版本的问题,那个构造方法是jdk1.4.1的