• Post Reply Bookmark Topic Watch Topic
  • New Topic

Java Compilation return graphic characters instead of readable error messages  RSS feed

 
raymond hsu
Greenhorn
Posts: 23
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for letting me post my 1st java question.

As I am still using a laptop with CPU 1.6ghz, and window XP OS.
I have downloaded Java1.5 to pickup Java basic programming.

However, whenever I type " javac javaproram.java"
the results of the compilation (if there is error in compilation), always returns many non readable characters , instead of proper english compilation error messages that is readable.

I have attached a grab screen of the compilation in jpg picture attached

Can anyone help change the javac to return readable english error messages ?
 
Tim Cooke
Marshal
Posts: 3873
233
Clojure IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you paste the message you are getting straight into your post so we can see what you see?

Also, why Java 5? The current version is Java 8 so that would be the natural choice to learn.
 
K. Tsang
Bartender
Posts: 3648
16
Firefox Browser Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Windows XP doesn't support Java 8 but do support Java 7.

Honestly I hope XP isn't your primary OS.
 
raymond hsu
Greenhorn
Posts: 23
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for your reply.

I tried install Java 8, it warns me of only working with window 7, window vista, but not window XP.

So I chose a version that was released in 2005, thinking that it should support my old PC and window XP.

I tried to copy and paste the contents of the funny graphics characters from the javac in the DOS window output, but with no success, that's why I screen grab that that portion as jpg picture file as an attachment file to this post.

In this reply, I again attach the grab screen as I don't know how to cut and paste the graphics characters to this post, hope this is ok with you
-_2016_05_07_17_16_07_781.jpg
[Thumbnail for -_2016_05_07_17_16_07_781.jpg]
 
K. Tsang
Bartender
Posts: 3648
16
Firefox Browser Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What locale are you using? Also are you using a Chinese OS?
 
Campbell Ritchie
Marshal
Posts: 55772
163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch
We usually prefer copy‑and‑paste, which you can find out about here and here, but there is enough on the screenshot to suggest (as K Tsang said) that you have picked up a non‑english‑speaking computer, or even a non‑english‑speaking Java® installation.
 
raymond hsu
Greenhorn
Posts: 23
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I look up at the system characteristics from Control panel
i am attaching the screen grab of my palm top in jpg attachment
-_2016_05_07_20_22_28_453.jpg
[Thumbnail for -_2016_05_07_20_22_28_453.jpg]
 
raymond hsu
Greenhorn
Posts: 23
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Campbell, now I learn how to do simple cut and paste from command window

C:\JAVAPR>javac PrintTest.java
┤φ╬≤ú║╬▐╖¿╢┴╚íú║ PrintTest.java
1 ┤φ╬≤

C:\JAVAPR>dir
Volume in drive C is ??
Volume Serial Number is 784E-7FE3

Directory of C:\JAVAPR

2016-05-07 16:57 <DIR> .
2016-05-07 16:57 <DIR> ..
2016-05-07 16:49 416 hello.class
2016-05-07 16:47 105 Hello.java
2016-05-07 16:59 233 PrintTest.java.java
3 File(s) 754 bytes
2 Dir(s) 122,547,605,504 bytes free

C:\JAVAPR>javac PrintTest.java
┤φ╬≤ú║╬▐╖¿╢┴╚íú║ PrintTest.java
1 ┤φ╬≤
 
K. Tsang
Bartender
Posts: 3648
16
Firefox Browser Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It looks like your so-called java filename has an extra "java" at the end. Rename it to just "PrintTest.java"

Also whatever that error is, it should able to display correctly. Since you are using company's notebook, ask your company's technician.

 
raymond hsu
Greenhorn
Posts: 23
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much Tsang,
it is indeed a silly mistake to have .java.java created as filename.
It works now, but I will have to search google as to how to reconfigure Window XP with primary language to be english.

Thank you all, with such fast response and useful suggestion and help.
I am so glad to be able to join this forum with no java programming experience.
 
K. Tsang
Bartender
Posts: 3648
16
Firefox Browser Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
raymond hsu wrote:
It works now, but I will have to search google as to how to reconfigure Window XP with primary language to be english.


No problem. You should check the language locale first. Or simply those chinese fonts (input methods) not installed.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!