Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.
Hi all, please see this major site announcement: https://www.boards.ie/discussion/2058427594/boards-ie-2026

Launching a local application using java?

  • 17-09-2008 12:34PM
    #1
    Registered Users, Registered Users 2 Posts: 345 ✭✭


    Hey Guys,

    I got this working a couple of weeks ago and for the love of god I can figure out how to do it again.

    Basically i'm trying to launch a local program from a webpage.
    To make things easy i'll pretend i'm trying to launch notepad (as this is a standalone document).

    The code i have so far is:

    <html>
    <head>
    <title>test</title>
    <script type="text/JScript">
    var v = new ActiveXObject("Shell.Application");
    </script>

    </head>
    <body>
    <p>
    <a href="javascript:v.ShellExecute('notepad', '', 'C:\\system32');">LinkA</a>
    </p>
    <p>
    <a href="javascript:v.ShellExecute('notepad');">LinkB>
    </p>
    <a href="javascript:v.ShellExecute('notepad.exe');">LinkC</a>
    </body>
    </html>


    Any ideas where i'm going wrong?


Comments

  • Registered Users, Registered Users 2 Posts: 569 ✭✭✭none


    It's JavaScript rather than Java. The HTML is poorly formatted but your real problem might be in the security settings on your machine.


Advertisement