0

I am making an app similar to the CMD in windows, or Terminal in Linux. My problem is, after calling the method the user has selected, I want them to be able to select another. Instead, it closes.

Main class (jDOS.class)

package jdos;
/**
 *jDOS Cross-Platform Java Console
 *Luke Pattinson 2011
 */
public class JDOS {

    public static void main(String[] args) {
        System.out.println("\n\n\njDos Cross-Platform Java Console\nLuke Pattinson 2011");
        comInput commI = new comInput();
        String comm = commI.getComm();
        
        if (comm.equals ("quit")) {
            System.exit(0);
        } 
        if (comm.equals ("internet")) {
            deskFunc browse = new deskFunc();
            browse.browse();
        }
        if (comm.equals ("help")) {
            System.out.println("quit - exits the system (does not exit the console)\nhelp - displays this message\ninternet - navigates to a webpage");
        }
    }
}

Can anyone help me?
:confused:

-EDIT-
Solved, sorry :3

Edited by shade399: Solved

4
Contributors
3
Replies
4
Views
5 Years
Discussion Span
Last Post by DavidKroukamp
Featured Replies
  • 1

    [QUOTE]after calling the method the user has selected, I want them to be able to select another[/QUOTE] Wrap the code in a while or do while loop that requires input from the user to exit. Read More

  • 1

    [QUOTE=NormR1;1743321]Wrap the code in a while or do while loop that requires input from the user to exit.[/QUOTE] thought of posting this as well, but he already stated that he solved it. @OP: a better way to let the community know that your problem is solved, is to mark the … Read More

1

after calling the method the user has selected, I want them to be able to select another

Wrap the code in a while or do while loop that requires input from the user to exit.

1

Wrap the code in a while or do while loop that requires input from the user to exit.

thought of posting this as well, but he already stated that he solved it.

@OP: a better way to let the community know that your problem is solved, is to mark the thread as solved.
also, you could post how you solved it, so that people can refer to your solution when someone else is facing the same problem.

0

thought of posting this as well, but he already stated that he solved it.

@OP: a better way to let the community know that your problem is solved, is to mark the thread as solved.
also, you could post how you solved it, so that people can refer to your solution when someone else is facing the same problem.

On what stultuske said, i commend you for solving this by yourself, but also please to all those that solve it themselves, post your solved code, so that the next person to google the problem you had might pick up your thread and find your answer after all thats what daniweb is about.

Edited by DavidKroukamp: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.