[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

App

Posted on 2001-08-10
6
Medium Priority
?
244 Views
Last Modified: 2012-08-13
How could I open an application (notepad.exe) on a clients machine using a web browser. Is it possible to do this using an applet?
Thanks,
KMurphy
0
Comment
Question by:kmurphy7
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
6 Comments
 
LVL 1

Expert Comment

by:dviji
ID: 6373190
   If you want to show the txt file and the file is in the Server use
   AppletContext appletContext = getAppletContext();
   appletContext.showDocument("url","_blank");
It will open and shows that text file in the new window.

   If you want to open the notepad use Runtime.exec("notepad.exe"); Make your applet as trusted one.
Notepad is only in Windows... So before that Check the OS  by using System.getProperty("os.name") and open that default text editor of that OS.

Best of luck...

...dviji

0
 

Author Comment

by:kmurphy7
ID: 6373277
So the following should open notepad:

import java.io.*;
import java.util.*;

public class testExeApplet extends java.applet.Applet
{
     Runtime rt = Runtime.getRuntime();
     public void openApp()
     {
          try
          {
               rt.exec("notepad.exe");
          }
          catch( Exception e )
          {
               System.out.println(e);
        }
     }
}
0
 
LVL 4

Expert Comment

by:omry_y
ID: 6376124
it will not work.
to run native programs, your applet must be signed.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 1

Accepted Solution

by:
dviji earned 400 total points
ID: 6376157
Hi kmurphy7
          If you use Runtime make it as trusted. i.e sign that applet. If you use jdk1.1 use javakey if  your jdk1.2 use keytool and jarsigner. There are set of steps you have to follow.

for surther information goto http://java.sun.com/products/jdk/1.2/docs/tooldocs/solaris/keytool.html

...dviji
0
 

Author Comment

by:kmurphy7
ID: 6385883
When I try to run it with appletviewer I get access denied. I have a .keystore file. It is in my c:\windows directory. I have a .java.policy file. It is in my c:\windows directory. I have a JAVAEXE.class, signedJAVAEXE.jar, ExeApplet.class, and a ExeApplet.html all in a folder. Are any of these files in the wrong place? Do I need to import anything to get to the signed jar file?
0
 
LVL 4

Expert Comment

by:omry_y
ID: 6386005
post another question.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying 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

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses

656 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