Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Exporting java runnable jar file problem(the exported jar file runs incorrectly.)
Exporting java runnable jar file problem [message #677072] Tue, 07 June 2011 09:43
freetochoose is currently offline freetochoose
Messages: 19
Registered: May 2011
Junior Member
Hi:

I am new to Eclipse and have been using it for a month or two.
This is the first time I have this strange problem.
My program reads a file which contains Chinese characters and process it.
If I run it inside Eclipse, everything is fine.
Now if I export the program to a jar file and run it, it reads the Chinese characters
wrong. Because I don't know a way to debug this problem since it runs fine inside
Eclipse, all I did is to print out every line as it is read into a window JTextArea.
Inside Eclipse, everything looks fine since every line just contains two chinese
characters. But when I run it outside Eclipse as an exported jar file,
the Chinese characters do not look right. Sometimes two characters become three
and one of them is not displayed. I figure it might have something to do with
the unicode. But java is all unicode driven and the same program should run exactly
the same inside or outside Eclipse.
What might the problem be? Does anyone have any idea?
Much thanks in advance.

ftc
Previous Topic:How to disable JDT's RunAs launch shortcut?
Next Topic:Reading files encoded in ANSI and UTF-8
Goto Forum:
  


Current Time: Sat Aug 30 00:32:36 EDT 2014

Powered by FUDForum. Page generated in 0.03971 seconds