Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > some complex java help

Thread Tools

some complex java help

Game_Tester_1993 Game_Tester_1993 is offline
Junior Member
Join Date: Apr 2011
Posts: 1
hi im not sure if anyone on this site can help me, im realtively new, and only just getting back into java and realising how hard it is to work with at times without and proper guides easily found.

What im trying to do is create a Java program that will Execute AHK Executable files let them run and then continue with it self. now i have found and been given many references and code to use but none it makes sense because of lacking explanation on what to do with the code exactly etc

what i want to do is this.

start/run/execute(whatever u want to call it) a file
wait for that file to close
continue on with script
rinse repeat
examples to do this i have been given are :

Runtime.getRuntime().exec(<Name of file>).wait();
try {
                 String line;
                 Process Login = Runtime.getRuntime().exec(command);
      BufferedReader input =new BufferedReader(new InputStreamReader(Login.getInputStream()));
      while ((line = input.readLine()) != null) {
    }catch (Exception err) {

private static final String TASKLIST = "tasklist";
public static boolean isProcessRunging(String serviceName) throws Exception {
 Process p = Runtime.getRuntime().exec(TASKLIST);
 BufferedReader reader = new BufferedReader(new InputStreamReader(
 String line;
 while ((line = reader.readLine()) != null) {
  if (line.contains(serviceName)) {
   return true;
 return false;
any help in this would be greatly appreciated
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How complex is complex? Kottiyath Python 22 03-28-2009 10:11 PM
wsdl2java: method parameter a complex type that extends another complex type Robert Mark Bram Java 0 02-04-2007 10:06 AM
[XML Schema] Content type of complex type definition with complex content Stanimir Stamenkov XML 2 10-25-2005 10:16 AM
Some complex function prototypes like signal() lovecreatesbeauty C Programming 2 01-28-2005 07:53 PM
For expert on complex loops (reposted) - complex looping problem Java 1 04-13-2004 07:10 AM