Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problems showing my server RMI

2 views
Skip to first unread message

Anton

unread,
Jun 29, 2005, 6:53:58 AM6/29/05
to
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) {

}
}
}


Paul Nichols[TeamB]

unread,
Dec 12, 2005, 10:38:00 PM12/12/05
to

"Anton" <an...@anton.com> wrote in message
news:42c2...@newsgroups.borland.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?


faiz

unread,
Jan 29, 2006, 9:44:51 AM1/29/06
to
0 new messages