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.
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
Created attachment 1323 [details] .jarContent file with Japanese package name.
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?
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.
The problem was converting the file to a URL and back. This doesn't work correctly with non-ASCII characters.
verified ken.frank@sun.com 2000-06028
Consistent use of the I18N keyword.
Resolved for 3.4 or earlier, no new info since then -> closing.