This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 12029 - i18n - Can't create Jar file with multi-byte package name.
Summary: i18n - Can't create Jar file with multi-byte package name.
Status: CLOSED FIXED
Alias: None
Product: obsolete
Classification: Unclassified
Component: jarpackager (show other bugs)
Version: 3.x
Hardware: Sun Solaris
: P2 blocker (vote)
Assignee: issues@obsolete
URL:
Keywords: I18N
Depends on:
Blocks:
 
Reported: 2001-05-09 08:30 UTC by akiko.mochizuki
Modified: 2003-07-01 10:01 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
.jarContent file with Japanese package name. (1.20 KB, application/octet-stream)
2001-07-20 20:35 UTC, akiko.mochizuki
Details

Note You need to log in before you can comment on or make changes to this bug.
Description akiko.mochizuki 2001-05-09 08:30:45 UTC
Can't compile Jar contents file created by Japanese package name. 
java.io.FileNotFoundException occurs.

How to reproduce
----------------
1. Open "New From Template Wizard".
2. In first panel, expand the JAR Packager node and choose JAR Contens.
3. In the Targe Location panel, type English name and specify Japanese 
   package for the JAR Contents file. In other words, input an ASCII 
   string in "Name:" field and input a Japanese string in "Package:" field. 
4. In the JAR Contents panel, select a file and click Add button. 
5. In the location panel, leave the default settings. Jar filename is 
   set as same as Jar contents filename (ASCII string). 
6. Genarate manifest tab. 
7. Click Finish button.
5. Compile Jar contents file of the node on Explorer.

Error Message
-------------
Wed May 09 16:03:12 JST 2001: java.io.FileNotFoundException:
/export/home/akikom/ffjuser30/sampledir/%25e6%2597%25a5%25e6%259c%25ac
%25e8%25aa%259e%25e3%2583%2586%25e3%2582%25b9%25e3%2583%2588%25ef%25bc
%2593/JapaneseTestJAR.jar (No such file or directory)
Annotation: Content of the archive cannot be updated due to some I/O error.
java.io.FileNotFoundException:
/export/home/akikom/ffjuser30/sampledir/%25e6%2597%25a5%25e6%259c%25ac
%25e8%25aa%259e%25e3%2583%2586%25e3%2582%25b9%25e3%2583%2588%25ef%25bc
%2593/JapaneseTestJAR.jar (No such file or directory)
        at java.io.FileOutputStream.open(Native Method)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:102)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:62)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:132)
        at org.netbeans.modules.jarpackager.JarCompiler
        $Group.start(JarCompiler.java:117)
[catch] at org.netbeans.core.compiler.CompilationEngineImpl
$CompilerThread$GroupCompiler.run(CompilationEngineImpl.java:257)

----- End of Error Message.

The Japanese path name of the Jar file is written to .jarContent 
file in hexadecimal notation (like %xx). Actually the package 
is created in the file system in Japanese. 
Please see the attached .jarContent file. 

If package name is set in ASCII string and Jar file name (and 
Jar contents file name) is set in Japanese, the Jar contents 
file is succeeded to compile. But Jar file name is displayed 
in hexadecimal notation on Explorer. 

It is not affected on this issue if the files packaged in Jar 
file are Japanese file names or not. 

Test Environment
----------------
Forte for Java, EE v.3.0 (Build 010504_1)
Solaris 8, u2 (ja/EUC)
JDK 1.3.0
Comment 1 akiko.mochizuki 2001-05-09 08:34:31 UTC
Created attachment 1323 [details]
.jarContent file with Japanese package name.
Comment 2 Mike Schilling 2001-05-14 18:26:33 UTC
The problem is that the jar file name is saved as a URL, and converting a file 
name to a URL is doing this conversion.

Are these hex characters (%25e6 etc.) Unicode, or another double-byte 
representation?  
Comment 3 akiko.mochizuki 2001-05-16 03:22:18 UTC
These characters are not Unicode, and are not another 
double-byte representation. 

If the Japanese package name become Unicode escapes, 
that is shown as \u65e5\u672c\u8a9e\u30c6\u30b9\u30c8\uff13.
Comment 4 Mike Schilling 2001-05-16 20:04:19 UTC
The problem was converting the file to a URL and back.  This doesn't work 
correctly with non-ASCII characters.
Comment 5 Ken Frank 2001-06-28 20:34:31 UTC
verified
ken.frank@sun.com
2000-06028
Comment 6 Jesse Glick 2002-12-23 16:35:50 UTC
Consistent use of the I18N keyword.
Comment 7 Quality Engineering 2003-07-01 10:00:23 UTC
Resolved for 3.4 or earlier, no new info since then -> closing.
Comment 8 Quality Engineering 2003-07-01 10:01:39 UTC
Resolved for 3.4 or earlier, no new info since then -> closing.