Without RMI?


      I have a  requirement same as  invoking
      an application like Notepad or Calc.exe
      on the other workstation from a  caller
      workstation connected over the network.
      I do not want to use RMI as RMI require
      objects running in both machines.

      The operating system I am using is NT.
      and JDK version is 1.2
 Procedure of how to get this done is what I need.

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.


Sign your applet and call Runtime object to execute a process.

 From: vladi21
 Date: Tuesday, November 16 1999 - 08:46PM CST  

Code signing resources:

Creating Signed, Persistent Java Applets




NN: Bypass the need for a certificate
Netscape provides a way to accept a codebase as trusted (then a certificate is not needed). This can be useful during development or in a private Intranet. In the Netscape Users directory, there is a file called prefs.js. Adding the line user_pref("signed.applets.codebase_principal_support", true);

will enable JAR file without a certificate to request privileges on your machine. If you agree, it will be possible for an Applet to lauch a program, write a file on your hard disk or print on the printer. You will still have to ask for privileges in your program using the Netscape capabilites classes.
Another way is to lower general security setting to more allow more freedom when running applets locally. Add or modify the following entries in the prefs.js: user_pref("unsigned.applets.low_security_for_local_classes", true);
user_pref("signed.applets.local_classes_have_30_powers", true);
user_pref("signed.applets.low_security_for_local_classes", true);
user_pref("signed.applets.verbose_security_exception", true);

Then you don't need to asked for privileges for local classes.
When adding or modifying the file prefs.js, Netscape must not be running because your modification will be overwritten. So shut down Netscape, edit the prefs.js and then restart Netscape.
Best of luck
'... same as  invoking an application like Notepad or Calc.exe on the other workstation from a  caller workstation connected over the network.'

what about
web server
client browser
HTML page with applet ?
vishoneAuthor Commented:

 Hi ravindra76,

      What you have written is about security, which
      ofcourse is required, but it is not the complete

 Thank you,
      - Vish
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

vishoneAuthor Commented:

 Hi heyhey,

      Let me try to put it this way, consider PopUp
      * At caller machine, I will send a message
      specifying the address of the remote machine
      (Assume that I have the security privilages)
      * The message will pop up on remote machine.

      But this simple application should be versitile
      enough, for example accept the word document
      name at the caller machine and display this
      document on the remote machine, after the user
      in remote machine accepts(By clicking a button)
      to open the document.

      But no java component should be present in the
      remote machines to keep administration of this
      application simple.

      I think this is simple requirement, for which
      I dont prefer webserver.

      Since this does not seems to be moderate
      question, I have increased the points from
      100 to 200.

 Thank you,
      - Vish
you'll need any kind of application-server on all your clients. Unfortunately, Microsoft's Systems usually don't have such server, unlike Unix (rlogind, rshd, rexecd, ...) since the 70's of the last millenium.

There is NO way for you to do the task without installing  (and administering) something on the clients !

you may fetch one of the available (free or commercial) tools to operate a windows system from remote (rexecd should be availbe with open source license) but there are security drawbacks.

I would strongly suggest that you use the secured web techniques former suggested by ravindra76, too !
vishoneAuthor Commented:

 Hi Smile,

      Is it possible this way?

      Some low level program installed on remote
      machine getting invoked by the Java call
      from the caller machine, which invokes the
      required application on the remote machine

      Thank you for your valuable answer, but I
      am hesitent to accept NO as an answer.

 Thanks again,
      - Vish
Hi ,

1.First sign the applet.

2.Then call the Runtime object to execute the proper process.

For step2 execution, step 1 ( Security ) is needed.

After step 1, you can proceed as local application using applets.

Any how applet will execute on client and they are dynamically downloaed from server.

No need to install any thing on client machine.

Once you sign the applet, it will execute as a local application which will statt programs like notepad what ever with

Runtime object .

Best of luck
For a client-side program to start, something must trigger the event. Again that "something" must be running to start other processes. It's a very fundamental problem of distributed computing -- the remote machine must have a process running to receive requests from other machines.  Therefore, daemons are required to run on the client machine as the entry/start point for the subsequent processes.

Since there is no Java VM or Java daemon process required on a regular NT box, there is no java objects you can reach to start the process.

The only possible direction I can see know is that there might be a Microsoft solution somewhere that you can do remote execution using DCOM, since NT requires many services/daemons to operate. If any one of the services can be accessed remotely with proper authentication, what you asked might be possible.

Hard to believe this is all possible without installing sw on clients, for intruders wants the same type of convenience. >-(

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Hi vishone,

you got it. You'll have something (at least some simple low level  server) installed on the remote machines. Meming's idea may also be true: there may be some DCOM service running on NT boxes.

Don't forget the security aspect!
It is quite simple, to have a small C executable listening at some port and trying to make a WinExec() call with the string received. But that string may be send from anywhere in your network, not just your Java application.

So you'll need some smarter software on your remote machines which can tell friends from indruders and you'll have to configure this software on the remote machines.

A simple server listening at some TCP socket and then launching a window is available at:

hope it helps.
vishoneAuthor Commented:


      No answers still !!

      ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

      What ravindra76 mentioned, I feel is
      on PULL      technic, for that someone(or
      some program) on client side needed.
      What I need is PUSH technic.

      ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

      Hi meming,  I came  to know that one
      parameter for  "at" command in NT is
      computer name.  I tried to set up at
      command and I am still working on it.

      ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

      And smile,  for your solution I need
      Delphi. Is it not?

      ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

      I feel the program that we are write
      should be able to everything possible
      with computer.
      As meming mentioned, if Windows cant
      support my requirement, then it is a
      "incomplete" software.

      Even if WindowsNT supports, but Java
      does not support, then Java could be
      "incomplete" software.
      OR, still worse, our knowledge itself
      is "incomplete"?    :)

 - Vish
vishoneAuthor Commented:

 Hi all,

 The solution given by smile, needs
 a deamon program "running"  on the
 remote machine,  that I dont want.
 I am giving points to meming since
 he answered it as a possiblity and
 give a clue for the same.

 Meming, it is possible to start NT
 services remotely.

 Thank you all, for the comments on
 my question.

- Vish
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.