Java Question How do this lib finish?

Theera

Expert
Licensed User
Longtime User
Hi all,
I'm still stupid in programming. I try to do this,but it's not finish. What do I have mistake. I used jSLC for compile this.
 

Attachments

  • error.png
    error.png
    9.3 KB · Views: 345
  • ThaiDate.zip
    1.8 KB · Views: 295

Daestrum

Expert
Licensed User
Longtime User
There appears to be 3 characters before 'package' on the first line. I would try deleting them. (I see them as i??package)
 

Theera

Expert
Licensed User
Longtime User
I use notepad++,I don't know how they come from. Thank you.
 

Theera

Expert
Licensed User
Longtime User
Hi Erel,
I've just tested as your guide. The first step,I try save my code by UTF-8 without BOM ,it's shown as result1.png ,and the second step,I try save my code by UTF-8,it's shown as result2.png.

P.S. I'm sorry that I stoped coding 2 days.
 

Attachments

  • result1.png
    result1.png
    12.9 KB · Views: 317
  • result2.png
    result2.png
    10.1 KB · Views: 302

Theera

Expert
Licensed User
Longtime User
The source code is the post #1

1.) When I save my code by UTF-8 without BOM (I've haircut a part of the too long messages )
Starting step: Compiling Java code.
Completed successfully.
Starting step: Creating jar file.
Completed successfully.
Starting step: Creating XML file.
C:\Users\ธีระ\Desktop\ThaiDate\src\app\thaidate\jThaiDate.java:14: error: unmappable character for encoding MS874
case 1:return "เน€เธ?เธ?เน€เธ?เธ‘เน€เธ?ย?เน€เธ?เธ?เน€เธ?เธ’เน€เธ?โ€”เน€เธ?เธ”เน€เธ?โ€ขเน€เธ?เธ?เน€เธ?ย?เน€เธ?โ€”เน€เธ?เธ•เน€เธ?ย?";
^
C:\Users\ธีระ\Desktop\ThaiDate\src\app\thaidate\jThaiDate.java:14: error: unmappable character for encoding MS874
case 1:return "เน€เธ?เธ?เน€เธ?เธ‘เน€เธ?ย?เน€เธ?เธ?เน€เธ?เธ’เน€เธ?โ€”เน€เธ?เธ”เน€เธ?โ€ขเน€เธ?เธ?เน€เธ?ย?เน€เธ?โ€”เน€เธ?เธ•เน€เธ?ย?";
^
C:\Users\ธีระ\Desktop\ThaiDate\src\app\thaidate\jThaiDate.java:14: error: unmappable character for encoding MS874
case 1:return "เน€เธ?เธ?เน€เธ?เธ‘เน€เธ?ย?เน€เธ?เธ?เน€เธ?เธ’เน€เธ?โ€”เน€เธ?เธ”เน€เธ?โ€ขเน€เธ?เธ?เน€เธ?ย?เน€เธ?โ€”เน€เธ?เธ•เน€เธ?ย?";

---------HAIRCUT IS HERE-----------
^
C:\Users\ธีระ\Desktop\ThaiDate\src\app\thaidate\jThaiDate.java:55: error: unmappable character for encoding MS874
case 12:return "เน€เธ?ย?เน€เธ?เธ‘เน€เธ?ย?เน€เธ?เธ?เน€เธ?เธ’เน€เธ?ย?เน€เธ?เธ?";
^

Error.


2.) When I save my code by UTF-8
Starting step: Compiling Java code.
javac 1.7.0_45
C:\Users\ธีระ\Desktop\ThaiDate\src\app\thaidate\jThaiDate.java:1: error: illegal character: \65279
?package app.thaidate;
^
1 error


Error.
 

Theera

Expert
Licensed User
Longtime User
However,I will use Eclipse compiled instead. (I will back to see my website) This library used to compiled by Eclipse.
 

Theera

Expert
Licensed User
Longtime User
Is possible that about jdk1.6 and jdk1.7?
 
Top