Skip to main content

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 13:43
freetochoose is currently offline freetochooseFriend
Messages: 19
Registered: May 2011
Junior Member

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.

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

Current Time: Sun May 27 05:31:29 GMT 2018

Powered by FUDForum. Page generated in 0.01762 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top