SWT window disappear while running Runtime.getRuntime().exec()

Hello,
I have create a SWT application. I am executing the folloiwng code from my SWT application.
Process process = Runtime.getRuntime().exec(param);
BufferedReader in = new BufferedReader(new InputStreamReader(process.getInputStream()));
String line = null;
while ((line = in.readLine()) != null) {
During execution of the above code when click on other icon of the window task bar and click back on SWT window Icon, The windows open but it does not show annything until the code execution finish. any help would be apprecited.

This isn't an SWT forum. In the future, please post such questions on a forum specifically for SWT issues.
But to answer your question, there's a 99.9% chance this is because you're launching the process on SWT's UI thread. Similar to performing long-running tasks on Swing's EDT, this is a no-no. The SWT UI won't be able to repaint itself until after your process has finished. To remedy this, launch your process in a separate Thread.

Similar Messages

  • Problems running Runtime.getRuntime().exec(path)

    I am trying to run the following command, so that i can execute a file on DOS
    Runtime.getRuntime().exec(path);
    where
    path = cmd /c C:\Dokumente und Einstellungen\Administrator\Lokale Einstellungen\Temp\muexec2562.bat
    (btw i think /c is german notoation used for -c). all i get is the DOS screen briefly popping up on screen and then disappearing. The .bat files contains commands to copy files.
    Thanks

    Replace your path with
    path = C:\Dokumente und Einstellungen\Administrator\Lokale Einstellungen\Temp\muexec2562.bat

  • Need help on changing directories with Runtime.getRuntime().exec() (shell)

    I want to create a perfect remote shell with Runtime.getRuntime(). I just can't get it to change directories. I want that if the remote user type "cd.." he changes the directory. At the moment, I can't get anything else than the "user.dir" directory.
    Is there anyway to send additionnal commands to cmd.exe after the Runtime.getRuntime().exec(). Because at the moment I'm running these commands:
    cmd[0] = "cmd.exe" ;
    cmd[1] = "/C" ;
    cmd[2] = commandString;
    After that I just wanna do stuff as if I really was at the computer and had a cmd.exe window open. I tried the output stream, I tried placing "&&" in front of the commandString(worked when I did it in cmd window), tried doing multiple Runtime.getRuntime().exec(). Starting to pull my hair out here.

    Because essentially I want this to be a remote shell.
    So I need it to accepts commands such as cd to change
    around the directory so the person can navigate the
    computer.
    I just managed to be able to do it in one command
    line. For example I would send "cd c:\downloads dir"
    to the server and it would work but I would really
    like to keep track of the working directory so the
    user wouldn't always have to change the directory.Then you don't Runtime.exec() once for each command the user types. You Runtime.exec() a shell once, and pass what the user types and the shell's responses via the in/out streams available from the Process class.

  • Runtime.getRuntime().exec() and waitFor on Windows

    Hi,
    I'm trying to execute a command on Windows 2000 using Runtime.getRuntime().exec(). After that I make a call to waitFor method of the returned process instance. The wait for call blocks and never releases. I'm trying to do simple things, like a call to "cmd /c dir", using commands that I know that work and do release after that. I need to wait for the command terminating to get the output just after that.
    Thanks in advance,
    Marcio Azevedo.

    It's too bad ignoring the streams couldn't be build into ProcessBuilder. Instead you could do it yourself and extend ProcessBuilder like:
    public class MyProcessBuilder extends ProcessBuilder {
      private boolean ignoreInputStream;
      public  MyProcessBuilder(List<String> command) {
         super(command);
      public  MyProcessBuilder(String... command) {
         super(command);
      public boolean ignoreInputStream() {
        return ignoreInputStream;
      public  ProcessBuilder ignoreInputStream(boolean ignoreInputStream) {
        this.ignoreInputStream= ignoreInputStream;
        return this;
      public Process start() {
        Process process = super.start();
        if (ignoreInputStream()) {
             new InputStreamIgnorer(process.getInputStream());
        return process;
      static class InputStreamIgnorer implements Runnable {
        java.io.InputStream in;
        InputStreamIgnorer(java.io.InputStream in) {
          this.in = in;
          new Thread(this,"InputStreamIgnorer Thread").start();
        public void run() {
          int ch;
          try {
            while((ch = in.read()) != -1) {
                //System.out.print(ch);
          } catch (java.io.IOException ex) {} //ignore
    }Then it could be simpled used like:
    new MyProcessBuilder("cmd","/c", "dir").redirectErrorStream(true).ignoreInputStream(true).start().waitFor();

  • Runtime.getRuntime.exec() not working when Tomcat is made a windows Sevice

    Hi,
    I am working on a web application which launches a exe file on subitting the form. I am using Apache Tomcat 4.0.6 to run the web application. Initially Tomcat was not made a windows service on my machine and when I launch an exe it is launching without any problems. I used the following command to launch the exe file:
    <code>
    Process p = Runtime.getRuntime().exec("C:\\Program Files\\Mercury Interactive\\WinRunner\\arch\\wrun.exe" + strWROptions);
    </code>
    The above command launches WinRunner on the local machine.
    without using tomcat if I just compile and run a test program with this command, the exe is launching perfectly. But, Once I made tomcat a windows service on my machine the exe is not launching.
    Also, a process is being created in the windows task bar named wrun.exe once I submit the form but WinRunner is not lauching on the desktop.
    Can any one please help and suggest me.
    Thanks,
    Ramesh

    The version of Java I am using is 1.4.2. Even without
    using the string array as you mentioned, the exe
    (wrun.exe) is launched on my desktop if I don't run
    Tomcat as a windows service. But the problem arises on
    making it a service :-(
    That is strange because going by the documentation what you have been using should never work. I can't test it though, I'm not on MSWindows at the moment..
    Now, when I use this string array convention, I am
    getting an error saying "The tool could not launch..
    some error occured".
    That's not a Java error message, it must come from WinRunner. This means that you have succesfully started WinRunner (great!) but something else is wrong; maybe the parameters you pass to it are incorrect.
    How would you run it on the command line? Like this?wrun -t "D:\L5_QE\L5A\Initial" -create_text_report on -runThat line executes the wrun program and passes it five parameters, not three. The first parameter is "-t", the second "D:\L5_QE\L5A\Initial", the third "-create_text_report", the fourth "on", and the fifth "-run". The array of strings that corresponds to that line isString[] command = {"C:\\Program Files\\Mercury Interactive\\WinRunner\\arch\\wrun.exe",
                    "-t", "D:\\L5_QE\\L5A\\Initial",
                    "-create_text_report", "on",
                    "-run"};

  • Running curl command from a java program using Runtime.getRuntime.exec

    for some reason my curl command does not run when I run it from within my java program and errors out with "https protocol not supported". This same curl command however runs fine from any directory on my red hat linux system.
    To debug the problem, I printed my curl command from the java program before calling Runtime.getRuntime.exec command and then used this o/p to run from the command line and it runs fine.
    I am not using libcurl or anything else, I am running a simple curl command as a command line utility from inside a Java program.
    Any ideas on why this might be happening?

    thanks a lot for your response. The reason why I am using curl is because I need to use certificates and keys to gain access to the internal server. So I use curl "<url> --cert <path to the certificate>" --key "<path to the key>". If you don't mid could you please tell me which version of curl you are using.
    I am using 7.15 in my system.
    Below is the code which errors out.
    public int execCurlCmd(String command)
              String s = null;
              try {
                  // run the Unix "ps -ef" command
                     Process p = Runtime.getRuntime().exec(command);
                     BufferedReader stdInput = new BufferedReader(new
                          InputStreamReader(p.getInputStream()));
                     BufferedReader stdError = new BufferedReader(new
                          InputStreamReader(p.getErrorStream()));
                     // read the output from the command
                     System.out.println("Here is the standard output of the command:\n");
                     while ((s = stdInput.readLine()) != null) {
                         System.out.println(s);
                     // read any errors from the attempted command
                     System.out.println("Here is the standard error of the command (if any):\n");
                     while ((s = stdError.readLine()) != null) {
                         System.out.println(s);
                     return(0);
                 catch (IOException e) {
                     System.out.println("exception happened - here's what I know: ");
                     e.printStackTrace();
                     return(-1);
         }

  • Opening a new browser using Runtime.getRuntime().exec(cmd); under windows

    Can Runtime.getRuntime().exec(cmd); open a URL in to a new browser in wondows OS or ...can we force it to any specific browser insted on OS's default browser...
    It does open a new bowser under MAC but not under windows..
    cmd = "'rundll32 url.dll,FileProtocolHandler"+URL (windows)
    Thanks

    public class WindowsProcess
         public static void main(String[] args)
              throws Exception
              String[] cmd = new String[3];
              cmd[0] = "cmd.exe";
              cmd[1] = "/C";
              cmd[2] = "start";
              Process process = Runtime.getRuntime().exec( cmd );
              process = Runtime.getRuntime().exec( cmd );
    }When you run the above code you should get two open dos windows.
    Now just just enter some html filename and hit enter in each window. IE should start up separately in each window.
    Thats also what should happen if you specify the html file as the fourth parameter. A new process should be created and two separate windows should open with a browser in each.

  • Problems with Runtime.getRuntime().exec in Windows 2000

    Hello,
    I have a batch file that I want to run from my java application. My code is the following:
    try {
            Runtime.getRuntime().exec("cmd.exe /c C:\\temp\\shortcut.bat");
    } catch (Exception e) {
         System.out.println(e.getMessage());
    }I was developing on windows XP and it worked just fine. But then I tested it on windows 2000 and it didn't work. The batch file is okay, because if I run the batch file myself it works just fine, even from the command line. I get no errors what so ever, it just doesn't do anything...
    Can somebody help me with this?
    thx in advance

    thank you all so much
    I figured it out... It was a combination of two things that went wrong.
    First one: in my batch file I had:
    cd C:\tempwhich worsk fine in XP, but in it doesn't in 2000. In 2000 it has to be:
    C:
    cd \temp But just changing that wasn't enough, I also needed the "start"
    Now it works just fine on 2000, hopefully it'll still work on xp as well.
    THX!

  • Runtime.getRuntime().exec works on windows failed on linux!

    Hi,
    I'm trying to execute a linux command from java 1.4.2 using Runtime.getRuntime().exec(). The linux command produces output and write to a file in my home dir. The command runs interactively in the shell and also run on windows.
    The command is actually a mozilla pk12util. My java code to run this pk12util works on windows, but not on linux (fedora). When I print out the command I'm trying to run in java, I can run it interactively in bash shell.
    Method below is where the problem seems to be:
    public void writeCert() {
    // Declaring variables
    System.out.println("Entering writeCert method");
    String command = null;
    certFile = new File(credFileName);
    // building the command for either Linux or Windows
    if (System.getProperty("os.name").equals("Linux")) {
    command = linuxPathPrefix + File.separator + "pk12util -o "
    + credFileName + " -n \"" + nickName + "\" -d "
    + dbDirectory + " -K " + slotpw + " -w " + slotpw + " -W "
    + pk12pw;
    System.out.println("System type is linux.");
    System.out.println("Command is: " + command);
    if (System.getProperty("os.name").indexOf("Windows") != -1) {
    // command = pk12utilLoc + File.separator + "pk12util -o
    // "+credFileName+" -n "\"+nickname+\"" -d \""+dbDirectory+"\" -K
    // "+pk12pw+" -w "+pk12pw+" -W "+pk12pw;
    command = pk12utilLoc + File.separator + "pk12util.exe -o "
    + credFileName + " -n \"" + nickName + "\" -d "
    + dbDirectory + " -K " + slotpw + " -w " + slotpw + " -W "
    + pk12pw;
    System.out.println("System type is windows.");
    System.out.println("Command is: " + command);
    // If the system is neither Linux or Windows, throw exception
    if (command == null) {
    System.out.println("command equals null");
    try {
    throw new Exception("Can't identify OS");
    } catch (Exception e) {
    System.out.println(e.getMessage());
    e.printStackTrace();
    // Having built the command, running it with Runtime.exec
    File f = new File(credFileName);
    // setting up process, getting readers and writers
    Process extraction = null;
    BufferedOutputStream writeCred = null;
    // executing command - note -o option does not create output
    // file, or write anything to it, for Linux
    try {
    extraction = Runtime.getRuntime().exec(command);
    } catch (IOException e) {
    System.out.println(e.getMessage());
    e.printStackTrace();
    // Dealing with the the output of the command; think -o
    // option in command should just write the credential but dealing with output anyway
    BufferedWriter CredentialOut = null;
    OutputStream line;
    try {
    CredentialOut = new BufferedWriter (
    new OutputStreamWriter(
    new FileOutputStream(credFileName)));
    catch (FileNotFoundException e) {
    System.out.println(e.getMessage());
    e.printStackTrace();
    // writing out the output; currently having problems because I am trying to run
    }

    My error is due to the nickname "-n <nickname" parameter error. I think the problem is having a double quotes around my nickname, but if I take out the double quotes around my nickname "Jana Test's ID" won't work either because there are spaces between the String. Error below:
    Command is: /usr/bin/pk12util -o jtest.p12 -n "Jana Test's Development ID" -d /home/jnguyen/.mozilla/firefox/zdpsq44v.default -K test123 -w test123 -W test123
    Read from standard outputStreamjava.io.PrintStream@19821f
    Read from error stream: "pk12util: find user certs from nickname failed: security library: bad database."
    null
    java.lang.NullPointerException
    at ExtractCert.writeCert(ExtractCert.java:260)
    at ExtractCert.main(ExtractCert.java:302)
    Code is:
    private String nickName = null;
    private void setNickname(String nicknameIn) {
    nickName = nicknameIn;
    // building the command for either Linux or Windows
    if (System.getProperty("os.name").equals("Linux")) {
    command = linuxPathPrefix + File.separator + "pk12util -o " + credFileName + " -n \"" + nickName + "\" -d " + dbDirectory + " -K " + slotpw + " -w " + slotpw + " -W " + pk12pw;
    System.out.println("System type is linux.");
    System.out.println("Command is: " + command);
    extraction = Runtime.getRuntime().exec(command);
    BufferedReader br = new BufferedReader(
    new
    InputStreamReader(extraction.getErrorStream()));
    PrintStream p = new PrintStream(extraction.getOutputStream());
    System.out.println("Read from standard outputStream" + p);

  • Runtime.getRuntime().exec() problem while getting Mozilla version.

    Hi all,
    I've trying to get the current mozilla version in Java side using
    Runtime.getRuntime().exec(). The sample code is as below.
    I've tested two cases using exec(), as case# 1 and case# 2.
    The result is after the code.
    try
    Runtime rt = Runtime.getRuntime();
    Process proc = rt.exec(new String[] {"mozilla", "-remote"}); //case# 1
    //Process proc = rt.exec(new String[] {"mozilla", "-version"}); //case# 2
    InputStream stderr = proc.getErrorStream();
    InputStreamReader isr = new InputStreamReader(stderr);
    BufferedReader br = new BufferedReader(isr);
    String line = null;
    System.out.println("<ERROR>");
    while ( (line = br.readLine()) != null)
    System.out.println(line);
    System.out.println("</ERROR>");
    int exitVal = proc.waitFor();
    System.out.println("Process exitValue: " + exitVal);
    } catch (Throwable t) {
    t.printStackTrace();
    // execute "mozilla -remote"(case# 1)
    $ java TestExec
    <ERROR>
    -remote requires an argument
    </ERROR>
    Process exitValue: 1
    // execute "mozilla -version"(case# 2)
    $ java TestExec
    <ERROR>
    </ERROR>
    Process exitValue: 0
    I'm just surprised that why case# 2 couldn't get the returned version string as case #1 ? Since there will be version string be returned from command line:
    $ mozilla -version
    Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020830, build 2002083014
    Could anybody explain the problem or give any solution ?
    Thanks.
    -George.

    Hi all,
    One more question here.
    While I use Runtime.getRuntime().exec() to execute some commands,
    the commands may fail for some reason. Generally, they will return with the exit
    value set to 1 or others. But sometime, before waitFor() exits, there is a popped up
    dialog giving some info, and only after I click the "OK" button, it dispears, and
    waitFor() returns the exit value.
    So I'm not sure that could I suppress this popped up dialog, and make it run
    just like other commands ? I mean, just get the exit value by waitFor() without user
    interferance ?
    Thanks.
    -George.

  • Using Runtime.getRuntime().exec(DOS Program) with Windows 2000.

    I am trying to spawn a DOS Program from within Java.
    On Win95/98/ME, I use
    Process     p = Runtime.getRuntime().exec("START /w command.com con /c myDOSProgram.exe");
    This works on these platforms. On Win 2000, I use
    Process     p = Runtime.getRuntime().exec("START /w cmd.exe con /c myDOSProgram.exe");
    It does not work at all.
    I have tried all combinations of using START, cmd.exe, con /c, etc.
    I can spawn a Windows App using
    Process     p = Runtime.getRuntime().exec("windows.exe");
    And it works fine.
    What does it take to spawn a DOS program from Java on the Windows 2000 op sys?

    Hi. I recently wrote a java GUI that calls a DOS program with mixed success. Here's the code I used to make the call:String osName = System.getProperty("os.name" );
    String[] cmd = new String[4];
    if( osName.equals( "Windows 2000" ) || osName.equals( "Windows NT" ) )
         cmd[0] = "cmd.exe";
         cmd[1] = "/C" ;
         cmd[2] = "VBDoc.exe";
         cmd[3] = fileName;
    else if( osName.equals( "Windows 95" ) || osName.equals( "Windows 98" ) )
         cmd[0] = "command.com" ;
         cmd[1] = "/C" ;
         cmd[2] = "VBDoc.exe";
         cmd[3] = fileName;
    else
         System.out.println(osName);
    Process proc = runtime.exec(cmd);Check out this article, it gives a good explanation of how to use the exec() call:
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html
    Hope this helps!

  • Runtime.getRuntime().exec problems running with applet

    Hi,
    I am running the command
    Process prc = Runtime.getRuntime().exec("net config workstation");
    InputStream in = prc.getInputStream();
    BufferedReader br = new BufferedReader(new InputStreamReader(in));
    line = br.readLine();
    When running from an application(/stand alone program) on Win-NT it runs fine. But when i include the same code in an Applet and try to run.
    It doesnt return any thing. I see the DOS-prompt open and close and i can also see the required output generated on the DOS prompt, but the program doesnt return any results(null) in the InputStream.
    I even tried to get the ErrorStream incase it is writing some error but it doesnt write anything.
    I tried running some other commands like (cmd.exe /c set) which were able to run on both application as well as from the applet.
    I have tried giving the "net config workstation" command in all flavors
         String[] cmd = new String[3];
         cmd[0] = "cmd.exe";
         cmd[1] = "/C";
         cmd[2] = "net config workstation";     
    And      
         String[] cmd = new String[3];
         cmd[0] = "net.exe";
         cmd[1] = "config";
         cmd[2] = "workstation";          
    AND
         String[] cmd = new String[5];
         cmd[0] = "cmd.exe";
         cmd[1] = "/C";
         cmd[2] = "net.exe";
         cmd[3] = "config";
         cmd[4] = "workstation";     
    AND giing the full path as
    C:\winnt\system32\net.exe config workstation
    But still it doesnt work.
    Can anybody please suggest what is the problem.Its Urgent.....
    Well the purpose of this is to get users system properties like the Logon Domain , server name etc.... or else can anybody suggest a better way to obtain this information.....
    Your reply will be highly appriciated...
    Thanks in Advance......

    Thanks for atleast replying.....
    Sorry, i forgot to mention.... yes OfCourse, i am using an Signed Applet..... That how i was able to run the "set" command.....
    I have made sure it is not sucha simple problem..... the thing is as i have mentioned i know that even "net config workstation" works..... cause i see the output on the DOS prompt,.... but this output is not returned to the Applet in the getInputStream()/getErrorStream().....
    Can anybody please suggest a way to get this output..... OR is there some other way to get the machine's domain, server name etc info from the machine....?????
    Thanks in Advance...!!

  • Unable to run certain commands on unix using the Runtime.getRuntime().exec(

    Hi Folks,
    I am unable to get any output if I try : Runtime.getRuntime().exec("who am i")
    however for Runtime.getRuntime().exec("pwd") I am getting the present working directory path !!!
    if I give Runtime.getRuntime().exec("echo $PATH") then instead of printing the path it prints $PATH instead !!! similarly it is unable to understand any of the special unix characters such as " or ' & is assuming it to be a literal instead.
    Any idea why this is happening ?? and any solution for the same
    regards
    Anand

    I don't think that Runtime.getRuntime().exec() spawns a shell it just executes the file that is specified in the string. ecause of this you can not use commands that are built-in in the shell directly nor use special shell characters. You must spawn your own shell, try something like this:
    Runtime.getRuntime().exec("sh");I'm sure you can add some switch to sh to execute a command by I am not using unix myself so I don't know how. Someone else have to help you with that. You can allways read the man-pages.

  • Is there any way to run without using Runtime.getRuntime().exec()

    I am looking for a way to get my program to fun files on my system without using
    Runtime.getRuntime().exec() because it's causing me nothing but problems, is there any other way to do it without using this command?

    Can't think of an easier way (JNI, etc.).
    If you have not read the following article you really should, it might clear up a lot of your problems with exec():
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html

  • How to execute an application in Solaris using Runtime.getRuntime.exec() ?

    I am currently doing a project which requires the execution of Solaris applications through the use of Java Servlet with this Runtime method - Runtime.getRuntime.exec()
    This means that if the client PC tries to access the servlet in the server PC, an application is supposed to be executed and launched on the server PC itself. Actually, the servlet part is not an issue as the main problem is the executing of applications in different platforms which is a big headache.
    When I tried running this program on a Windows 2000 machine, it works perfectly fine. However, when I tried it on a Solaris machine, nothing happens. And I mean nothing... no errors, no nothing. I really don't know what's wrong.
    Here's the code.
    public void doPost(HttpServletRequest request, HttpServletResponse response)
         throws ServletException, IOException
         response.setContentType("text/html");
         PrintWriter out = response.getWriter();
              Process process;                                                       Runtime runtime = Runtime.getRuntime();
              String com= "sh /opt/home/acrobat/";
              String program = request.getParameter("program");
              try
                        process = runtime.exec(com);
              catch (Exception e)
                   out.println(e);
    It works under Windows when com = "c:\winnt\system32\notepad.exe"
    When under Solaris, I have tried everything possible. For example, the launching of the application acrobat.
    com = "/opt/home/acrobat"
    com = "sh /opt/home/acrobat"I have also tried reading in the process and then printing it out. It doesn't work either. It only works when excuting commands like 'ls'
    BufferedReader read = new BufferedReader(new InputStreamReader(process.getInputStream()));Why is it such a breeze to execute prgrams under Windows while there are so many problems under Solaris.
    Can some experts please please PLEASE point out the errors and give me some advice and help to make this program work under Solaris! Please... I really need to do this!!
    My email address - [email protected]
    I appreciate it.
    By the way, I'm coding and compiling in a Windows 2000 machine before ftp'ing the .class file to the Solaris server machine to run.

    it is possible that you are trying to run a program that is going to display a window on an X server, but you have not specified a display. You specifiy a display by setting the DISPLAY environment variable eg.
    setenv DISPLAY 10.0.0.1:0
    To check that runtime.exec is working you should try to run a program that does not reqire access to an X Server. Try something like
    cmd = "sh -c 'ls -l > ~/testlist.lst'";
    alternatively try this
    cmd = "sh -c 'export DISPLAY=127.0.0.1:0;xterm '"
    you will also need to permit access to the X server using the xhost + command

Maybe you are looking for

  • Cancel payments for archived invoices

    Hi all, Recently we have Archived all Old Vendor Invoice (KR) Documents in production till 2009 but we realised that there are some more Payment Documents which are not cleared in 2007. i.e., the checks on those Payment documents are not encashed/cle

  • Image Gallery in a tabbed panel

    This seems to be an intermittent issue for me (comes & goes). But, when placing an image gallery in a tabbed panel if I select multiple photos to add (at once) it will expand the tab out to 70 thousand or so pixels wide but, if I add photos 1 at a ti

  • Why can't i connect to my server even though my ipad says i am connected

    i cannot connect to my server on my IPad although the settings show I am connected..

  • Query Help---DISTINCT values

    Hi.. I have the following query.. I'm getting the following o/p... Offshore     In-house     1858     616 Offshore     In-house     1858     615 Onshore      In-house     1858     611 Offshore     In-house     1858     923 Offshore     In-house     1

  • Migo saved, background I want to miro process

    Dear Experts, Could you please, tell me, where can i do the enhancement for automated MIRO from GR(delivery note). Which screen should i enhance. Thanks in advance ! Best Regards, Varatharajan.T Moderator message: please do more research before askin