Skip to Content
author's profile photo Former Member
Former Member

Need Help in opening a Link or URL

Hi,

I need help in opening a URL (on the same server where CLM application is deployed). I have added a Button on ToolBar and added the code. but it's not working. the same java program is working on my local system. below is the code.

import java.io.*;

import java.util.*;

public class FileOpen

{

public static void main(String[] args)

{

FileOpen deleteList = new FileOpen();

String url="http://www.google.com/";

try {

String[] cmd = new String[4];

cmd[0] = "cmd.exe";

cmd[1] = "/C";

cmd[2] = "start";

cmd[3] = "c:
amd_SCCMLog.txt";

System.out.println(" cmd"+cmd);

Process p = Runtime.getRuntime().exec(cmd);

System.out.println(" cmd1"+cmd);

Process process = Runtime.getRuntime().exec("notepad");

System.out.println(" cmd2"+cmd);

} catch (IOException ioe)

{

ioe.printStackTrace();

}

//System.out.println("Memberfarm: " + memberFarm);

}

}

Regards,

Puneet Aggarwal

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Aug 24, 2011 at 12:41 PM

    Hi Puneet,

    What exactly are you trying to do? Can you describe where in the system you are doing it? There are different options....

    What about a document report with a link to the Web site URL you want to open?

    What about a read-only URL field on the document, populated with the URL you want to open?

    What about the desktop links channel?

    Lots of different ways to skin that cat (sorry cat lovers) ..your code looks like it might be the most difficult approach.

    -Howie Wexler

    www.craftysystems.com

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 24, 2011 at 12:52 PM

    Hi Howie,

    I created a Button on toolbar and when i will click on that it should open a file or you can say URL.

    Regards,

    Puneet Aggarwal

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.