• Post Reply Bookmark Topic Watch Topic
  • New Topic

system problems(RMI)

 
Sophie Jo
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am trying to run a RMI program. Before calling the main method, i think the server properties need to be loaded. It's called from a file called 'system.properties'. From what i understand this holds the number of threads needed and the port.
I was wondering, do i need to create that file or is it automatically in the computer somewhere? I know applets have a way to view systems properties, but do applications?
Also, my rmi programs(i have tried several) do not seem to recognise "localhost". Would anyone know of a particular reason for this?
Thanks in advance.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Generally speaking, Java applications can only see a few properties - see the java.lang.System getProperties JavaDocs for a list and note that there can be security manager permissions involved.
Not recognizing localhost can result if your hosts file does not provide the name. In my WinXP system, hosts is located in \Windows\system32\drivers\etc and includes the line:
127.0.0.1 localhost
Bill
 
Chris Shepherd
Ranch Hand
Posts: 286
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What happens if you substitute 127.0.0.1 in place of localhost? You need to find out from whoever wrote the program exactly what needs to be in the properties file. RMI servers don't need to use one, so it must be something added by the programmer to allow for different setups. The programmer should also be able to tell you what structure/location the file needs to have.
If, on the other hand, you are trying to write it yourself, you don't need a properties file to run an RMI server. To be more help, I'd have to have more info.
Chris
 
Sophie Jo
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot.
I did away with it.
Thanks again.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!