| Summary: | [jar exporter] DBCS3.5: Runnable JAR file can not find class names wiith non-ascii characters | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Masaihko Maedera <maedera> | ||||||||
| Component: | UI | Assignee: | Dani Megert <daniel_megert> | ||||||||
| Status: | CLOSED FIXED | QA Contact: | |||||||||
| Severity: | normal | ||||||||||
| Priority: | P3 | CC: | camle, daniel_megert, darin.eclipse, ferenc.hechler, kitlo, Olivier_Thomann, pwebster | ||||||||
| Version: | 3.5 | ||||||||||
| Target Milestone: | 3.5 M7 | ||||||||||
| Hardware: | PC | ||||||||||
| OS: | Windows XP | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
Moving to JDT/Debug Jar export is owned by JUI. >1.Import DBCSRunnableJAR_Test.zip attached to this report.
>2.Verify DBCS\u3042.class can run correctly.
Masaihko, when I import the attached project I get compile errors on the file (tried UTF-8).
Sorry for my late response. Could you change the file encoding into MS932? This is the default encoding by Eclipse under Japanese Windows XP/2008. Most of the developers will use it without customization. This is the same case for the other DBCS languages, such as Chinese, Korean. OK, I switched to MS and it compiles. However, when I try this step:
>2.Verify DBCS\u3042.class can run correctly.
Unfortunately I cannot reproduce this step because on my machine the DOS cmd does not support MS932 code page, however, I can create a Runnable (or normal) JAR and it works like a charm (see attached JAR file).
- please try the JAR file I attached - does it work?
(make sure to use: java -Dfile.encoding=MS932 -jar run3.jar)
- please try with your example again and don't forget to pass the encoding as
shown in previous step
- if it still doesn't work please attach your example workspace and the created
JAR here
Created attachment 132605 [details]
create JAR file
Created attachment 132908 [details]
java -jar dbcsRun.jar
Hi Dani,
I attached the problematic JAR file.
I forgot the most important information.
When you export a Runnable JAR file ( > Export > Java > Runnable JAR file), please check "Package required libraries into generated JAR" in the dialog.
This option may not be necessary for such a simple JAR.
But I found this problem, when I tested the more complex JAR file which includes many JAR files as the dependent libraries.
Fixed in HEAD. Available in builds > N20090422-2000. Note that this was not just a DBCS issue: any main class with a non-ASCII character (e.g. รถ) didn't work. I verified this bug had been fixed on the following builds. - Eclipse-SDK-3.5M7-win32.zip (I20090430-2300) - Eclipse-SDK-3.5M7-linux-gkt.tar.tz (I20090430-2300) Thank you for you fix. I will close this bug report. I close this bug report. Thank you. |
Created attachment 132058 [details] Eclipse Project Archive(DBCSRunnable_JAR_Test.zip) Build ID: I20090313-0100 Steps To Reproduce: 1.Import DBCSRunnableJAR_Test.zip attached to this report. 2.Verify DBCS\u3042.class can run correctly. 3.Create Runnable JAR file, for example, ascii.jar in the dialog through [Export] > [Java] > [Runnable JAR file] to choose DBCS\u3024.class as the launch entry. 4.Open a system console, then type "java -jar ascii.jar". 5.The following messages are shown in the console. Exception in thread "main" java.lang.ClassNotFoundException: dbcs.DBCS\u3042 at java.lang.Class.forName(Class.java:169) at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:54) More information: OS: Microsoft Windows XP, SP2 OS: SUSE Linux 11 JRE: IBM JRE 1.6.0