Hello i reciently started to take a java class in school so i taught what would be more fun then making a chat program that i could message between mine and my friends computer in class so i found a basic program online and just kinda copyed it
This is the ServerApp
and this is the ClientApp
now theirs 2 little problems
when i try to run the program through javac through the command prompt it gives me a error saying im not authorised, but i can run the program just fine through Jcreator
my second question is i dont know how to take this messenger program and put it in my friends computer and have the other in my computer. and have the program send messages back and forth.
I am still new to java programing and i know it was kinda cheap of me to take some ones codes but i really wana build into this and make this program nice especialy since this is my senior year i want to leave behind this program for the underclassmen.
Please cite the source where you got this code from. 1) It is polite to give the actual author credit. 2) It allows us to check and make sure you copied it correctly, and 3) By not giving the original author credit, you may be committing a copyright violation.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Joined: Oct 06, 2011
John Jai wrote:What version of Java have you installed and do you have the JAVA_HOME variable set. On typing javac on the cmd prompt what is the error you receive.
The code uses the port number 100 to establish the Socket connection. Use something > 1024 for custom sockets. The code also uses deprecated methods.
To connect to the server you have to change the IP address and port number in the ClientApp.java class.
my java is version 188.8.131.52 and i dont think i have JAVA_HOME set and i get error when i try to enter this on the comand promp
then i get this error
ClientApp.java:5: error: error while writing ClientApp: ClientApp.class <acess is denied>
public class ClentApp implements ActionListener,Runnable
Note: ClientApp.java uses or overrides a deprecated API
Note Recompile with -Clint:deprecation for details
(i get the same error when i run the ServerApp)
Joined: May 31, 2011
Did you change the server socket numbers to something greater than 1024..?
What is the output you see when you type javac and java commands on the cmd prompt as such?