• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Applet Error  RSS feed

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I made this simple chatclient chat server gui using applet. I have set the run config such as the port number and the localhost thingy. but when I run the server no problem. It's is the chat client that seems to cause the problem, but when i look at the line I don't know whats wrong with it and therefore don't know what to change. Any help would be fantastic. Sorry for posting a lot of code.

ChatClient:



ChatClientThread:



ChatServerThread:



ChatServer:



 
Saloon Keeper
Posts: 5476
143
Android Firefox Browser Mac OS X Safari Tomcat Server VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is "the problem"? Which is "the line"?
 
Oscar Tsang
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is all the problems when i run the chatclient:

java.lang.NumberFormatException: null
at java.lang.Integer.parseInt(Integer.java:542)
at java.lang.Integer.parseInt(Integer.java:615)
at chat.ChatClient.getParameters(ChatClient.java:129)
at chat.ChatClient.init(ChatClient.java:42)
at sun.applet.AppletPanel.run(AppletPanel.java:434)
at java.lang.Thread.run(Thread.java:748)
 
Rancher
Posts: 1170
18
Firefox Browser Hibernate IntelliJ IDE Java MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
At line 113 from your ChatClientClass, you're trying to parse the port to an integer. Where does the port come from? I can't see a getParameter method in your code, my gues is the value retrieved from that method contains a or multiple letter(s) or someother non-digit characters that can't be parsed
 
Don't count your weasels before they've popped. And now for a mulberry bush related tiny ad:
ScroogeXHTML - small and flexible RTF to HTML converter library
https://coderanch.com/t/710903/ScroogeXHTML-RTF-HTML-XHTML-converter
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!