het volgende script heb ik gebruikt:
nu geeft ie de fout bij het compileren:
StringTagImpl.java:4:cannot resolve symbol
symbol: class StringTag
location: class rmitest.StringTagImpl
public class StringTagImpl extends UnicastRemoteObject implements StringTag {
bij de s van stringtag geeft ie de fout,
ik snap niet wat er verkeerd aan is, want het script is overgenomen uit een cursusboek.
de interface waarnaar die verwijst is:
_____________________
deze is al gecompileerd zonder fouten
op internet is hier weinig over te vinden
Java:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
| package rmitest; import java.rmi.*; import java.rmi.server.UnicastRemoteObject; public class StringTagImpl extends UnicastRemoteObject implements StringTag { public StringTagImpl() throws RemoteException { super(); } public String appendX(String s) throws RemoteException { return(s + "XXX"); } public static void main(String[] arg) { System.setSecurityManager(new RMISecurityManager()); try { StringTagImpl sm=new StringTagImpl(); Naming.rebind("StringTag", sm); System.out.println("StringTag bound in registry"); } catch(Exception e) { System.out.println("StringTagImpl: " + e); } } } |
nu geeft ie de fout bij het compileren:
StringTagImpl.java:4:cannot resolve symbol
symbol: class StringTag
location: class rmitest.StringTagImpl
public class StringTagImpl extends UnicastRemoteObject implements StringTag {
bij de s van stringtag geeft ie de fout,
ik snap niet wat er verkeerd aan is, want het script is overgenomen uit een cursusboek.
de interface waarnaar die verwijst is:
_____________________
Java:
1
2
3
4
5
| package rmitest; public interface StringTag extends java.rmi.Remote { public String appendX(String instring) throws java.rmi.RemoteException; } |
deze is al gecompileerd zonder fouten
op internet is hier weinig over te vinden
[ Voor 7% gewijzigd door drm op 22-03-2004 11:48 . Reden: codetags added ]