-4

I am able to run this on the eclipse but I can't run it using sublime3, how's it that?

       public class TestStdDraw {
   public static void main(String[] args) {
       StdDraw.setPenRadius(0.05);
       StdDraw.setPenColor(StdDraw.BLUE);
       StdDraw.point(0.5, 0.5);
       StdDraw.setPenColor(StdDraw.MAGENTA);
       StdDraw.line(0.2, 0.2, 0.8, 0.2);
   }

}

and following the not that Note: ".\StdDraw.java uses or overrides a deprecated API." and "Recompile with -Xlint:deprecation for details.", it still comes up with the same error.

Justin
  • 1
  • 1
    Show your entire file, not just the Java parts that seem relevant. The unmappable character error normally happens with files that contain non-ASCII characters that aren't compatible with the platform's default encoding. – kumesana Jul 12 '18 at 10:09
  • Also note that neither errors are supposed to be blocking. They're warnings and it should still run fine. – kumesana Jul 12 '18 at 10:10

1 Answers1

0

The issue when using the StdDraw is caused by your system locale, try to change your system locale to US English, or compile with the encoding flag:

javac -encoding UTF8 TestStdDraw.java

wrenhh
  • 1