Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Launching a local application using java?

  • 17-09-2008 01: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