kenkin you

Greenhorn
+ Follow
since Jul 22, 2002
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by kenkin you

how can i visit an ejb which is in a j2ee Server from tomcat ???

thank you!!!
you can get registry by yourself,not use the registry tool.
so modify the server class:
///////////////////////
import java.rmi.Naming;
import java.net.*;
import java.rmi.registry.LocateRegistry;
public class CalculatorServer {
public CalculatorServer() {
try {
LocateRegistry.createRegistry(8808) ;///////////here modify!!!
CalculatorImpl c = new CalculatorImpl();
Naming.rebind("rmi://localhost:8808/CalculatorService",c);
System.out.println("sdfsdfsd");
} catch (Exception e) {
System.out.println("Trouble: " + e.getMessage());
}
}
public static void main(String args[]) {
new CalculatorServer();
}
}
///////////
and modify the client's port
//////////////
import java.rmi.Naming;
import java.rmi.RemoteException;
import java.net.MalformedURLException;
import java.rmi.NotBoundException;
public class CalculatorClient {
public static void main(String[] args) {
try {
Calculator c = (Calculator)
Naming.lookup("rmi://localhost:8808/CalculatorService");///////the port is 8808
System.out.println( c.sub(4, 3) );
System.out.println( c.add(4, 5) );
System.out.println( c.mul(3, 6) );
System.out.println( c.div(9, 3) );
}
catch (MalformedURLException murle) {
System.out.println();
System.out.println(
"MalformedURLException");
System.out.println(murle);
}
catch (RemoteException re) {
System.out.println();
System.out.println(
"RemoteException");
System.out.println(re);
}
catch (NotBoundException nbe) {
System.out.println();
System.out.println(
"NotBoundException");
System.out.println(nbe);
}
catch (
java.lang.ArithmeticException
ae) {
System.out.println();
System.out.println(
"java.lang.ArithmeticException");
System.out.println(ae);
}
}
}
17 years ago
i meet the same problem.
hope help!

but how can set the classpath when run rmiregistry??it not use the classpath of os??
17 years ago
what is more:
if i load the aImp_stub in a classLoader,it can find it and load,no error occurs!
17 years ago
when i run an rmi example:
my current directory is xx\jj.
and the remote interface file ,the implemation file of it are also at the directory(xx\jj)
in a console windows:
xx\jj>rmic -v1.2 aImp ,so get the Stub class file named aImp_Stub.class.
then,in another console windows to run the rmiregistry
xx\jj>rmiregistry
it is ok printing the bellow information :
security properties not found. using defaults.
then in another console window to run rumServer to try to bind the remote object
xx\jj>java aImpServer
but get the bellow information and fail to bind:

Server RemoteException; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested excep
tion is:
java.lang.ClassNotFoundException: aImpl_Stub
//////////////////////
why ?? who can help me?thank you!!
17 years ago
thank you !
but can i buy the voucher at the local country?
now, i am in japan!
and when i asked the local country Test Center
and they said that they did not sell the voucher!
i indeed do not know what can i do!
now, i pass the part I!
and how can i download the assignment?
now i downloaded the mock exam
but how can i apply it?
for example:
knowlegde tips and what i should especially
pay attention to.
i want to take the exam of scea one step by one
the first is the partI
welcome your advice!
hi ,everyone!
now,i want to take the exam of SCJD,but i
have little about the information of the exam!
so , who can give me a little information.
for example:
reference book
by the way:
it is said that there must take a article in
this exam?
the exam-report can be taken as soon as the
exam is over!
i am sorry that i am poor in english!
thank you!