Results 1 to 7 of 7

Thread: define open

  1. #1
    Crowdy199 is offline Member
    Join Date
    Jun 2012
    Posts
    8
    Rep Power
    0

    Question define open

    i am farly new to java and i am doing a if statment i no how to do a if statment but how do i tell java if a program is open i need to now how to define a open program and the program i want to say if it is open is a .bat file so it is run with java.exe not javaw.exe
    Last edited by Fubarable; 06-09-2012 at 03:50 PM. Reason: removed the boldface tags.

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,728
    Blog Entries
    7
    Rep Power
    21

    Default Re: define open

    I did the best I could but I don't understand the question. Care to rephrase?

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  3. #3
    Crowdy199 is offline Member
    Join Date
    Jun 2012
    Posts
    8
    Rep Power
    0

    Default Re: define open

    what i mean is i want to make an if statment where if a program is closed do this... but i don t no how to tell java if a program is closed

  4. #4
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default Re: define open

    Please do not re-bold face your post. This makes for a very annoying post. This is the 2nd time a moderator has edited it.


    Quote Originally Posted by Crowdy199 View Post
    what i mean is i want to make an if statment where if a program is closed do this... but i don t no how to tell java if a program is closed
    This still doesn't make sense to me. Consider taking the time to write out several sentences outlining your problem.

  5. #5
    Crowdy199 is offline Member
    Join Date
    Jun 2012
    Posts
    8
    Rep Power
    0

    Default Re: define open

    look this is all i want i have a bat file on my desktop called run.bat and i want to make a java program where as long as the java program is open if the run.bat is closed it will open up agin

  6. #6
    Crowdy199 is offline Member
    Join Date
    Jun 2012
    Posts
    8
    Rep Power
    0

    Default Re: define open

    and very sorry about bold post

  7. #7
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,728
    Blog Entries
    7
    Rep Power
    21

    Default Re: define open

    Your run.bat file (or whatever that file runs) should cooperate; normally it is done by your run.bat file opening a socket and the other process should connect to it; if it succeeds your run.bat file is still running.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

Similar Threads

  1. how do you actually define a method?
    By edelric666 in forum New To Java
    Replies: 3
    Last Post: 10-30-2010, 11:26 PM
  2. define a variable
    By jperson in forum New To Java
    Replies: 2
    Last Post: 01-29-2010, 03:33 AM
  3. Define this error.
    By jaicea in forum New To Java
    Replies: 3
    Last Post: 12-02-2009, 02:07 AM
  4. How to define constants in Java
    By Java Tip in forum java.lang
    Replies: 0
    Last Post: 04-17-2008, 08:39 PM
  5. How to define Bean Scope
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 03-30-2008, 11:14 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •