26 October 2004 - java_dev (original) (raw)

Java developers

October 26th, 2004

| | 01:05 am - battie42 - Reading in files using StringTokenizer Hi again.I'm trying to get Java to read in a text file I created. I can't figure out what sort of encoding it needs to be read properly. At first I used Notepad's default ANSI encoding, but the tokenizer kept giving me a null pointer exception (even though my test print statement revealed that the line was being read in correctly). I switched it to Unicode, and the file reader was able to read the first few string tokens. However, it can't parse integers from it.I finally modified the code so that the program would just create the file itself, and it did so just fine. It also saved it as the default ANSI. And then it couldn't read the stupid thing back in.I was going include a screenshot of the error message for the Unicode, but my image server is down. I'll see if I can get it up later if someone needs it.What format should I be using? I'd like to try ASCII but I can't find anything that will save it with that encoding.Thanks. | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

02:13 pm - siyue - HTTP 500 Internal Server Error We've been trying to work on this JSP login page, and our verifylogin page kept giving us a HTTP 500 Internal Server Error problem and we have been checking it over and over again but can't spot the error. Can anyone else give us a hand here? Thanks!( The codes are here...Collapse )
10:59 pm - sevensoft - Eclipse (3.1M2) with Java 5 Anyone tried using Eclipse with any of the new Java 5 features?I have 3.1M2 installed and turned on the 1.5 compiler settings for eclipse.That got rid of a few errors, like complaining about the import static java.lang.Math.*; However, when i try to use any of the methods or fields from the Math class it still complains sayingthat it can't be resolved. For example. xVelocity = cos(direction) * speed; will say that method cos cannot be resolved.i'm not sure i really ever care to use static imports, but i'm just testing to see if its working and its sort of doesn'tappear to be. i guess my biggest problem is that i see no clear documentation or forums for eclipse on the current status.. or a roadmap.i'm sure there is one hidden on eclipse.org, but that place is a confusing mess if you ask me.any luck?-k