• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Himai Minh

Compilation in java

 
Comal Rajagopalaratnam Muthukumar
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Hello all

The follwing Jchat software is having too many errors
Can any one makes it free of errors



My text editor informs too many errors.
Can any one fix it
Thanks
AS
CRMK




 
Norm Radder
Master Rancher
Posts: 4461
38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

too many errors.


Please copy and paste here the text of the error messages.

What code did you change/add after your previous clean compile?  The latest added/changed code would be where to look for the errors.

Note: The ending ] for the ending code tag is missing.  Please fix the ending code tag.
 
Campbell Ritchie
Marshal
Posts: 73766
332
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have corrected the missing ].
Please look at the first error in the list and see if you can correct it. Then repeat the compilation attempt and see whether other errors have disappeared. Keep repeating the process.

In future, run a compilation attempt after wrriting every single method/constructor/new class. You will then be able to see where the errors occur, because new errors will occur because of the new code.
 
Norm Radder
Master Rancher
Posts: 4461
38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The code has lost all its indentations making it hard to read.
Do you have a version of the code with the proper indentations?

One error I see is too many static variables.
Another possible error is  missing ending }s
 
Rob Spoor
Marshal
Posts: 22409
121
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The provided code is such a mess that my Eclipse can't even automatically format it. IntelliJ does it a bit better.

Some errors that you should have immediately found:
* Missing implements between Frame and Runnable.
* Menurtem is mistyped (r instead of I).
* Menultem and CheckboxMenultem are mistyped (l instead of I).
* string with lowercase.
* Invalid quote characters ( instead of ").
* There is an » in there. That character is never allowed apart from inside a String or char.
* The sendMessage doesn't even use curly braces to start and end it.

That's when I gave up. Hundreds of compiler errors are more than I'm willing to go through.
 
Comal Rajagopalaratnam Muthukumar
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Rob Spoor wrote:The provided code is such a mess that my Eclipse can't even automatically format it. IntelliJ does it a bit better.



Hello the foloowing errors obtained MSDos
mighyt help you to send me the errorfree code Thanks
CRMK

 
Norm Radder
Master Rancher
Posts: 4461
38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

unmappable character (0x9D) for encoding windows-1252


Looks like the text of the source is not readable by the javac program because of encoding.  How are you entering the text?  Can you use a different editor with a compatible encoding?

ServerFrame.java:500


Have you posted the code that is creating the posted error messages?
That part of the error message says the error was on line 500 in the ServerFrame class.  The posted code does not have 500 lines for the ServerFrame class.
 
Comal Rajagopalaratnam Muthukumar
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Norm Radder wrote:

unmappable character (0x9D) for encoding windows-1252


Looks like the text of the source is not readable by the javac program because of encoding.  How are you entering the text?  Can you use a different editor with a compatible encoding?

ServerFrame.java:500


Have you posted the code that is creating the posted error messages?
That part of the error message says the error was on line 500 in the ServerFrame class.  The posted code does not have 500 lines for the ServerFrame class.



Hello
The whole lot of code has been sintaxed in java and that class bracketing has
been checked they are also ok
the output sheet of the code says 205 or so.The javac.exe was able to read the codes
and gave  error report. it means only minor type of error perhaps in spelling curlbrace usage etc
I really appreciate Your idea of class by class compilation method is marveloous
though that will in this casel amount to the same type of erros,since already compiled
Different people have different notions
Neverthless  the erro must be made free probably with immennse one by one Thanks
as
CRMK
 
Norm Radder
Master Rancher
Posts: 4461
38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you making progress going through the errors and fixing them one  by one?  I see that there are many simple errors that need to be fixed.

If you need more help, Be sure to post the new, updated code and any error messages you are having problems with.

idea of class by class compilation


Yes, that is a good idea.  Move all the classes to their own, separate files and compile separately.
 
Rob Spoor
Marshal
Posts: 22409
121
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Rob Spoor wrote:* Invalid quote characters ( instead of ").


Those are all those 0x9D characters that are giving so many compiler errors. Fix those first.

However, considering there are so many errors, I suggest that you first fix the obvious simple errors that you can using find-and-replace: quotes, Menultem, etc. Then, go through the code line by line and fix the error that the compiler mentions. Use an IDE like Eclipse or IntelliJ and they will tell you immediately where the errors are (although they may stop reporting after the first few hundred errors...).
 
Comal Rajagopalaratnam Muthukumar
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Rob Spoor wrote:

Rob Spoor wrote:* Invalid quote characters ( instead of ").


Those are all those 0x9D characters that are giving so many compiler errors. Fix those first.

However, considering there are so many errors, I suggest that you first fix the obvious simple errors that you can using find-and-replace: quotes, Menultem, etc. Then, go through the code line by line and fix the error that the compiler mentions. Use an IDE like Eclipse or IntelliJ and they will tell you immediately where the errors are (alt

hough they may stop reporting after the first few hundred errors...).

 

Hi
Glad to inform the errors from 2o5
to 123
by a merer one by oby one errorremoval  method

Hope this meticuluous try continues
Thanks for
esteemed suggestions
As
CRMK
 
Norm Radder
Master Rancher
Posts: 4461
38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you separated the classes into separate files?
What happens when each of them is compiled?
 
Comal Rajagopalaratnam Muthukumar
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Norm Radder wrote:Have you separated the classes into separate files?
What happens when each of them is compiled?



Hi
I t has been a good day since my since my debugging work gets completed without even being separated iinto diffeent sgregation
Really hardwork beats talent when talen fails to work hard!!
The out put is herwith attachedCompilation from jdk15 did brin in result
Thanks all for kind Co operation.
AS
CRMK
eanch2.jpg
[Thumbnail for eanch2.jpg]
 
Comal Rajagopalaratnam Muthukumar
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Comal Rajagopalaratnam Muthukumar wrote:

Norm Radder wrote:Have you separated the classes into separate files?
What happens when each of them is compiled?



Hi
I t has been a good day since my since my debugging work gets completed without even being separated iinto diffeent sgregation
Really hardwork beats talent when talen fails to work hard!!
The out put is herwith attachedCompilation from jdk15 did brin in result
Thanks all for kind Co operation.
AS
CRMK



The prg though gives output but its validty is to be tested for sending message and receiving message  from two different system in betwork
As such your suggestions  if feasible shall be tried
TThanks
As
CRMK
 
Comal Rajagopalaratnam Muthukumar
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Norm Radder wrote:Are you making progress going through the errors and fixing them one  by one?  I see that there are many simple errors that need to be fixed.

If you need more help, Be sure to post the new, updated code and any error messages you are having problems with.

idea of class by class compilation


Yes, that is a good idea.  Move all the classes to their own, separate files and compile separately.




having copil

Hi
Very splendid of you to be so generous in redering help to the needy ones
Contextually the compiled code (errorless) is to be tested for its validity provide let me know who is having networksystem using java.THis jchat software is to be tried between two different system under neetwork So write as to how bwst i do it(perhaps an mailid)

Have a good dy!!

As
CRMK
 
Norm Radder
Master Rancher
Posts: 4461
38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The first level test would be with the localhost address with the server and client being on the same PC.
If that works, then move to testing in on a LAN with two PCs connected to the same LAN.  May require settings in the PCs to allow external connections.
When that works, move to testing it between two PCs using the external IP address for the PC with the server.  That test may require firewall changes.
 
Could you hold this puppy for a sec? I need to adjust this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic