Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Unable to read Tokens

807606May 14 2007 — edited May 14 2007
Help~! Once again, my program can work on IDE but not on DOS

I wanted to read the data as token.... like this
while (recordTk.hasMoreTokens()){
                 System.out.println("Any more token?");
                processStr = recordTk.nextToken();
                StringTokenizer tk = new StringTokenizer(processStr, "|");
                sequence = Integer.parseInt(tk.nextToken());
                bidAsk = tk.nextToken();
                timeStamp = tk.nextToken();
                updateTime = getUpdateString(timeStamp);
                tradeSize = Integer.parseInt(tk.nextToken());
                tk.nextToken();
                priceStr = tk.nextToken();
                price = Float.parseFloat(priceStr);  
                DecimalFormat df = new DecimalFormat("#.000");
                String priceString = df.format(price);
                amtStr = tk.nextToken();
                amountFloat = Float.parseFloat(amtStr);
                amountFloat = price * tradeSize;
                DecimalFormat df2 = new DecimalFormat("#.");
                String amount = df2.format(amountFloat);
but it seems to skip the while loop. I have check the value of the token, it is '4f1d0d'. After this, i have written some codes that insert the data str to the DB but this is being skipped by DOS conveniently as well.

Pls help. hmm i also don't know why DOS and ide can work so differently.... Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 11 2007
Added on May 14 2007
5 comments
97 views