• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

policy file and jar file problem

 
Devu Shah
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi everybody,
I have the following doubts:
1.In rmi, I am not dynamically downloading the class , but copying the class files.Do i still have to use the policy files.because it is working absolutely fine for me without it.But going through the books and some sites, it told me that since the security policy of java2 is restrictive,i have to provide the security policy file for granting the permissions.
So is it the must to implement it.
I made policy file... i made it most restrictive I tried from one machine to Other NT server ...
BUT BUT BUT my program still worked !!! WHY WHY.
I think my policy file implementation is wrong. no effect at all. Even in most restrictive policy file it is working?!?! I have placed policy file at the root of my package from where i run my program ...
Even tried keeping policy in many other possible directory .. BUT no effect.
where am i doing big mistake ?
please guide me.
( by the way I have not implemented Security manager as from proper book, i read that there is no need of security manager if you are not downloading/uploading dynamically. So i did not. While policy file is requiered to get socket connection in restruitive situation)
Hope some senior developer will have perfect answer...
2.
I have successfully created executable jar file it is working but it does not access the internal html pages and database file. when we see trough winzip, it shows that all files are present.BUT it is not able to read database file even though it is there!!!
so event thouh executable jar file is having database inside it i have to keep extra copy out side!!!
what is wrong ??
please guide me.
 
Rick Fortier
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For RMI - I put a copy of the stub in the client.jar file
For policy - Most people just grant all rights and dont restrict anything.
For jar - I required that the tester extract everything
As long as you explain these choices to the tester, and give reasons, you should have no problems.
 
Luna Bora
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rick,
I am also not dynamically downloading the stub. In this case, do I need to specify codebase in the server command line? My program is working even though I did not specify the codebase.
I am running my server in the directory where all the class files are located in their respective directories. Even though I did not specify classpath for both the consoles where server and client are running, it is working fine. Do I need the tester to set the classpath?
Do I have to specify which commands are to be used in both unix and windows in Readme.txt? I am working in windows, I do not have access to unix, don't know what commands are there in unix.
Is it sufficient if I test my program on windows?
Thanks in advance.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic