Without RMI?

Posted on 2000-01-06
Medium Priority
Last Modified: 2013-12-29


      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.

Question by:vishone
  • 5
  • 2
  • 2
  • +2

Expert Comment

ID: 2331608

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
LVL 16

Expert Comment

ID: 2331923
'... 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 ?

Author Comment

ID: 2331936

 Hi ravindra76,

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

 Thank you,
      - Vish
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.


Author Comment

ID: 2331996

 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

Expert Comment

ID: 2332172
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 !

Author Comment

ID: 2332364

 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

Expert Comment

ID: 2332799
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

Accepted Solution

meming earned 600 total points
ID: 2333549
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. >-(

Expert Comment

ID: 2337667
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.

Author Comment

ID: 2370661


      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

Author Comment

ID: 2488529

 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

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Suggested Courses
Course of the Month6 days, 18 hours left to enroll

592 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question