aspose file tools*
The moose likes Other Java Products and Servers and the fly likes Error in Sun One Studio Mobile Edition Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Java Products and Servers
Bookmark "Error in Sun One Studio Mobile Edition" Watch "Error in Sun One Studio Mobile Edition" New topic
Author

Error in Sun One Studio Mobile Edition

pallavi utukuri
Ranch Hand

Joined: Feb 10, 2004
Posts: 182
Hi
I am using Sun one studio for ME. To my surprise the follwing code is giving error.


StringTokenizer st=new StringTokenizer("buf","%");

i have imported java.util

still its gives the error saying
cannot resolve symbol
symbol : class StringTokenizer
StringTokenizer st=new StringTokenizer("buf","%");

i am totally failing to understand y


Thanks,<br />Pallavi
Bhopal Singh
Greenhorn

Joined: Jul 21, 2005
Posts: 11
I believe if you provide more information about the IDE/Editor you are using and the mode of compiling the source, it would help other to answer your query.

~Bhopal
pallavi utukuri
Ranch Hand

Joined: Feb 10, 2004
Posts: 182
I am using sun one studio 4 update 4 mobile edition. The following simple example quotes the problem:


import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
import java.util.*;

public class HelloMIDlet extends MIDlet implements CommandListener {

private Command exitCommand; // The exit command
private Display display; // The display for this MIDlet

public HelloMIDlet() {
display = Display.getDisplay(this);
exitCommand = new Command("Exit", Command.SCREEN, 2);
}

public void startApp() {
StringTokenizer st=new StringTokenizer("buf","%");

TextBox t = new TextBox("Hello MIDlet", "Test string", 256, 0);

t.addCommand(exitCommand);
t.setCommandListener(this);

display.setCurrent(t);
}

public void pauseApp() {
}

public void destroyApp(boolean unconditional) {
}

public void commandAction(Command c, Displayable s) {
if (c == exitCommand) {
destroyApp(false);
notifyDestroyed();
}
}

}

This is the output:

HelloMIDlet.java [17:7] cannot resolve symbol
symbol : class StringTokenizer
location: class HelloMIDlet
StringTokenizer st=new StringTokenizer("buf","%");
HelloMIDlet.java [17:30] cannot resolve symbol
symbol : class StringTokenizer
location: class HelloMIDlet
StringTokenizer st=new StringTokenizer("buf","%");
2 errors
Errors compiling HelloMIDlet.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error in Sun One Studio Mobile Edition
 
Similar Threads
how to print in capital of each frist word
Facing Problem with String replaceAll method
StringBuffers and Tokenizers
StringTokenizer errors
Need help with read method