File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Console app on the web Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Console app on the web" Watch "Console app on the web" New topic

Console app on the web

Aaron Wilt
Ranch Hand

Joined: Sep 26, 2001
Posts: 49
I was wondering if there is an easy way to have a console type application (one just run through a dos prompt) to be able to put on the web somehow so when the user clicks a link, it automatically opens up a dos window on their machine and runs the .class file.
My goal is to make it work so that the user would not have to have any jdk tools on their PC, and have the JVM of the browser handle running the code.
Is this possible? Thanks in advance!
Aaron Wilt
Rob Ross

Joined: Jan 07, 2002
Posts: 2205
Well, if the user has a default security policy file for your applet (I assume you're talking about an applet, otherwise you wouldn't be asking this question in this forum, right?) then there is really no way to launch a console application. Java is secure, so it prevents your code from doing a lot of things that could compromise the security of your environment.
If you can control the user's policy file , then you could allow your applet to execute Runtime.exec(), and launch console apps that way.
[ April 02, 2002: Message edited by: Rob Ross ]

SCJP 1.4
I agree. Here's the link:
subject: Console app on the web
It's not a secret anymore!