Board index » jbuilder » Problems showing my server RMI

Problems showing my server RMI


2005-06-29 06:53:58 PM
jbuilder2
Hi,
I have created a litte application using the wizar of JBuilder
then I 've created an interface to use as remote
then I implments the main class created with JBuilder with my interface,
everything compile and I can execute but it doesn't show anything of my
program.
Here is the code
What can be wrong?
Thanks
package es.uned.dia.sd.practica.comparadorrmi;
import javax.swing.UIManager;
import java.awt.*;
import java.rmi.*;
import java.rmi.server.*;
//RemoteCompare is my Interface
public class ServidorFicheros extends UnicastRemoteObject implements
RemoteCompare {
boolean packFrame = false;
CompareResults cr = new CompareResults();
String directoryName = "";
//Construct the application
public ServidorFicheros() throws java.rmi.RemoteException {
main frame = new main();
//Validate frames that have preset sizes
//Pack frames that have useful preferred size info, e.g. from their
layout
if (packFrame) {
frame.pack();
}
else {
frame.validate();
}
//Center the window
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
Dimension frameSize = frame.getSize();
if (frameSize.height>screenSize.height) {
frameSize.height = screenSize.height;
}
if (frameSize.width>screenSize.width) {
frameSize.width = screenSize.width;
}
frame.setLocation((screenSize.width - frameSize.width) / 2,
(screenSize.height - frameSize.height) / 2);
frame.setVisible(true);
}
public CompareResults equal(String hash, String fileName, String
hashAlgorithm) throws RemoteException {
return cr;
}
public String getDirectoryName() throws RemoteException {
return directoryName;
}
//Main method
public static void main(String[] args) {
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
}
catch(Exception e) {
e.printStackTrace();
}
try {
if (System.getSecurityManager() == null){
System.setSecurityManager(new java.rmi.RMISecurityManager());
}
ServidorFicheros sf = new ServidorFicheros();
}catch(Exception e) {
}
}
}
 
 

Re:Problems showing my server RMI

"Anton" < XXXX@XXXXX.COM >wrote in message
Quote
Hi,
I have created a litte application using the wizar of JBuilder

then I 've created an interface to use as remote

then I implments the main class created with JBuilder with my interface,
everything compile and I can execute but it doesn't show anything of my
program.
Here is the code

What can be wrong?

Thanks


What kind of exceptions are being thrown (if any). I did not see you making
any calls in your main method to the server.
Also, did you register the server?
 

Re:Problems showing my server RMI

"Paul Nichols[TeamB]" < XXXX@XXXXX.COM >wrote:
Quote

"Anton" < XXXX@XXXXX.COM >wrote in message
news: XXXX@XXXXX.COM ...
>Hi,
>I have created a litte application using the wizar of JBuilder
>
>then I 've created an interface to use as remote
>
>then I implments the main class created with JBuilder with my interface,
>everything compile and I can execute but it doesn't show anything of my
>program.
>Here is the code
>
>What can be wrong?
>
>Thanks
>
>
What kind of exceptions are being thrown (if any). I did not see you making
any calls in your main method to the server.

Also, did you register the server?




 

{smallsort}