Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how do I stop recursion in this example?

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Okay, so what this program is supposed to do is to cycle through my whole system to find where minecraft.exe is. It finds the program and then launches it. This part works perfectly however because the loop is being executed by calling the method, the program doesn't stop executing once the program has been found and the loop continues to loop through the files. How do I stop this?

 
lowercase baba
Posts: 13089
67
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Which loop are you talking about? I see three. what loop do you want to break out of, and when exactly do you want to break out of it?
 
Adamz Preston
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator

fred rosenberger wrote:Which loop are you talking about? I see three. what loop do you want to break out of, and when exactly do you want to break out of it?





and I want to break out of it as soon as the minecraft application has been launched..
 
Sheriff
Posts: 3063
12
Mac IntelliJ IDE Python VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
You're re-asking a question that was answered here: https://coderanch.com/t/606437//java/isn-program-working

Any further discussion can go there, so I'll lock this thread.

    Bookmark Topic Watch Topic
  • New Topic