how to debug the following error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sindhu sweet
    New Member
    • Aug 2007
    • 18

    #1

    how to debug the following error

    while compiling a java code...
    i get the following error....
    prj.java:424: Ilegal Escape character..
    String s1="C:\WINDOWS\ Desktop\Swing help\a1.htm";


    please can anyone tel me how to correct this error....

    Thankx in advance.....
  • madhoriya22
    Contributor
    • Jul 2007
    • 251

    #2
    Originally posted by sindhu sweet
    while compiling a java code...
    i get the following error....
    prj.java:424: Ilegal Escape character..
    String s1="C:\WINDOWS\ Desktop\Swing help\a1.htm";


    please can anyone tel me how to correct this error....

    Thankx in advance.....
    Hi,
    Change the backward slash(\) to forward slash(/) and you problem will be solved.

    Comment

    • sindhu sweet
      New Member
      • Aug 2007
      • 18

      #3
      thanks a lot......friend ....

      Comment

      • sateesht
        New Member
        • Apr 2007
        • 41

        #4
        Originally posted by sindhu sweet
        while compiling a java code...
        i get the following error....
        prj.java:424: Ilegal Escape character..
        String s1="C:\WINDOWS\ Desktop\Swing help\a1.htm";


        please can anyone tel me how to correct this error....

        Thankx in advance.....

        Hi Sindhu Sweet,

        Obviuosly you will get the compilation Error, to resolve this you need to give the path as String s1="C:\\WINDOWS \\Desktop\\Swin g help\\a1.htm"; or else you have to give the path as String s1="C:/WINDOWS/Desktop/Swing help/a1.htm";

        Cheers,
        Sateesh.

        Comment

        • madhoriya22
          Contributor
          • Jul 2007
          • 251

          #5
          Originally posted by sindhu sweet
          thanks a lot......friend ....
          Hi,
          You're welcome ofcourse.

          Comment

          Working...