Now this is interesting!........I think???!

I have a class called Main.java. This class works perfect if i delete one line, which is: commandTokens = command.split("\\s+") ;
i use the same code at uni and it works, but as usual it doesn't work on my home computer. I am using jcreator on jdk 1.2.2 Thanx
Here is just a sample omy code:
while ((command = in.readLine()) != null)
          command = command.trim() ;
          if ("".equals(command))
          continue ;
          // Split the command string into tokens. Tokens are
          // defined, in this case, as a sequence of whitespace
          // characters.
          <code>commandTokens = command.split("\\s+") ;<code/>
          if ("n".equals(commandTokens[0]) && commandTokens.length == 1)
          response = game.moveNorth() ;
          System.out.println(response) ;
          }

Sorry i forgot to add the error message oops:
Main.java:40: Method split(java.lang.String) not found in class java.lang.String.
          commandTokens = command.split("\\s+") ;

Similar Messages

Maybe you are looking for

  • Switch to mac cable

    i just bought a macbook and it is the first mac i have owned. so far i love it anyway i purchased a Belkin switch to mac cable to transfer all of my data from my dell to my mac anyway it was not working at first so i decided to delete the software an

  • Error in Installation 4.6b - error ORA-01918

    Hello all! I'm installing SAP R/3 4.6B in Windows 2000 and database Oracle 8.1.7. I am following the installation guide 4.6C because the document indicates to me that I must follow this guide when is Windows 2000 and Oracle 8.1.6. The progress of ins

  • Data files free space calculation

    Hi, I have a query that calculates the Max Size (MB), Allocated (MB), Used (MB) and Used (%) for each data file in a 10.2 database. The results from this query are similar to what I see in dbconsole or EMconsole except for the undo datafile, my scrip

  • Illustrator pictures appear/disappear in InDesign CC?

    I'm importing two Illustrator CC pictures into an InDesign CC file (Running Adobe CC on Mac OS X 10.8.5). If I set my display preferences to "Normal", they show up correctly (although an imported Photoshop JPEG appears in low-res). If I put the displ

  • Mity Mouse right click

    Hi, I have just started experiencing a strange problem. When I right click on a single file (document, movie, pic, etc.) to change the color, the finder quits. This does not happen when right clicking a folder. I wonder if someone has experienced the