The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.

infinite maze issue

So I'm trying to make an infinite maze for my beginner Java class, where the while loop will keep the user stuck until the 'secret word' is entered.
The only issue I am having is that it is procession with exit code 1.

Not sure what to do. I will post my code and the output, hopefully to get some help. I've tried mixing up the operator in the while loop and nothing seems to work. Please help. Thank you.

Code:

import javax.swing.JOptionPane;

public class infinite
{
public static void main(String[] args)
{
int number = 0;
String north = "You're in an abandoned warehouse. Choose a new direction.";
String south = "You're in a burning building! Choose a new direction.";
String east = "You fell in a pit of snakes! Choose a new direction.";
String west = "You're in a sticky, smelly swamp. Choose a new direction.";
String escape = "escape";
String choose = "Choose a direction: North, South, East or West.";
String wrong = "Thats not a correct direction.";
String input;