• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

JBuilder(Personal)-Run-Configurations... always deactivated, how come???

 
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
According to JBuilder samples RMI project note, I need to configure the client file by using the "configurations..." menu item from Run, but it is always deactivated. Now i need to run SCJD's FBN, with "configurations..."deactivated, how should i configure (grant permission)to the Client.java? Could anyone please give me some guidance? I am using Win98SE. Thanks in advance.
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My guess is that you are trying to specify the policy file as one of the parameters for the call to start your project. While you can't get to the configurations menu, which would allow you to set up new configurations (runtime parameter configurations), you can still change the parameters by going to the Project Menu, selecting Project Properties, selecting the Run tab, and adding the appropriate parameters for the command.
For example, if my project is set to run my client class by default, and the client needs a policy file, the VM parameters I would specify would be -Djava.security.policy=client.policy (changing the name of the client.policy file depending on the name of the file you use).
Hope that helps.
 
Daniel Wu
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, Thank you!
i am still facing problem. When i tried to start my server program which compiled without problem, the "Runtime Properties" window pops up which show my VM parameters:java.security.policy=C:/WINDOWS/jbproject/certify/Remote.policy""java.rmi.server.codebase=C:/WINDOWS/jbproject/certify/classes"
Then i click OK, then a Message window pops up saying: "unable to start runtime due to imcomplete configuration."
What more do i need? Thanks.
 
James McGee
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am guessing a bit here, so bear with me. The configuration of the VM parameters is basically providing the parameters for the call to java.exe that JBuilder makes. You can see the JVM parameters by going to your command propmt and typing java -?. You'll see an option -D<name>=<value>, which is the one you are trying to set with the CM parameters in JBuilder.
To make a long story short, I think you are missing the -D in front of your parameters.
Hopefully that will get it.
 
Daniel Wu
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you very much for your guidance, James! Constructing server implementations has succeeded now. I have a new question.

java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: certify.RemoteDataImpl_Stub
My question is:
I got the RemoteDataImpl_Stub which is not under certify but under the file RemoteDataImpl which is under certify, so certify.RemoteDataImpl_Stub is not correct expression.
Thinking that i need to put the file RemoteDataImpl_Stub directly under certify; but the question is RemoteDataImpl_Stub is created by VM and thus is automatically put under its parent RemoteDataImpl. How can i do about it?
Can anyone help me resolve the confusion. Thanks in advance!
 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try specifying a protocol (i.e. file or http if you have a web server)
-Djava.rmi.server.codebase="file:/C:/WINDOWS/jbproject/certify/classes"
 
James McGee
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When you say that the RemoteDataImpl_Stub class is put under the RemoteDataImpl class, I am assuming that you mean in the tree structure that JBuilder builds in the project window. While it may look like it is under (and in the tree it is), the file is actually put at the same package level as the RemoteDataImpl class.
By default JBuilder creates a classes directory in your project folder. If you go to that folder you will find that the RemoteDataImpl and the RemoteDataImpl_Stub classes are in the same folder (certify). So you don't need to put anything to put the RemoteDataImpl_Stub class under that.
The problem I think you are running into was one that bugged me like no other...
When you start up the rmiregistry, it uses the classpath of your system, or the classpath of the current terminal window that you are running it from. Which means that if you don't have the appropriate directory specified in your classpath, you'll get the "class not found" error. If you search any of the many discussion groups out there you'll see that you aren't the only one to have run into this problem either.
The appropriate fix is to set the classpath with an entry that points to your certify folder. For example, if you had your project stored in c:\Jbuilder5\myproject\, you'd want to put C:\Jbuilder5\myproject\classes\certify; into your classpath system environment variable. I don't remember if you have to re-start JBuilder or not to have it pick up the change, but you might try it.
I think you can also start the rmiregistry from the directory that your package starts in and it will work as well. In this case that would be the classes directory.
Good luck, and post back if that doesn't fix it.
 
Daniel Wu
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Doug Melzer:
Try specifying a protocol (i.e. file or http if you have a web server)-Djava.rmi.server.codebase="file:/C:/WINDOWS/jbproject/certify/classes"


Hi Doug, when i tried like ""...codebase=file://C:/.../classes/certify/", i got the erro :
java.security.AccessControlException: access denied (java.io.FilePermission \\C\WINDOWS\jbproject\certify read). Could you help with this exception?
I am right now trying to register the server implementations to the RMIRegistry, and i haven't dealt with client access so far. But i just can't get server program registered...
Daniel
 
Daniel Wu
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by James McGee:
The appropriate fix is to set the classpath with an entry that points to your certify folder. For example, if you had your project stored in c:\Jbuilder5\myproject\, you'd want to put C:\Jbuilder5\myproject\classes\certify; into your classpath system environment variable.


I am using Win98, i tried to place a line like the following at the end of the AUTOEXEC.BAT file:
SET PATH=C:\windows\jbproject\certify\classes\certify; %PATH%
When i click the .BAT file, it ran, and there is no prompt for input. How should i add them into my classpath system environment variable?


I think you can also start the rmiregistry from the directory that your package starts in and it will work as well. In this case that would be the classes directory.


James, could you tell me how to start the RMIRegistry from the directory my package is located? For i am using JBuilder 5 Personal, all i need to do to configure the RMIRegistry is to specify "parameters"which, i think, refers to port number and i leave it blank(default port). How can the configuration you recommended help register the server implementation object to RMIRegistry, which i am working on before i move to client side at next step?
I tried to make it but it's hard, so i post back and seek your further advice. Thanks!
Daniel

 
So it takes a day for light to pass through this glass? So this was yesterday's tiny ad?
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic