Duplicate :
|
|
Duplicate :
|
|
Relates :
|
|
Relates :
|
Name: skT88420 Date: 09/21/99 In manifest file, if you don't press enter key(in another word, new line character) at end of Class-Path line, java will not load any jar file on Class-Path line. How come they don't check EOF? I had something like following with out new line at end and I could not load image. However after i put new line character at end of class path line, it worked fine. Main-Class: Server Class-Path: image.jar (Review ID: 95553) ====================================================================== Name: skT45625 Date: 11/06/2000 java version "1.3.0" Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C) Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode) The final line of a manifest line is ignored by jar if the line is not terminated with a newline. This bug can be demonstrated by creating a manifest file and not newline terminating the final line (notepad can do this on NT). This causes a variety of severe problems like the main class of a would-be executable jarfile not being known or the classpath not being set. This is similar to bug report 4274235 except that it is still present in 1.3.0 and it doesn't really seem to be just an enhancement request anymore. The 1.3 jar documentation specifically mentions the case of files whose last line ends in an EOF instead of a newline and claims that this case is being handled: --------------------- from http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html#JAR Manifest Before parsing: If the last character of the file is an EOF character (code 26), the EOF is treated as whitespace. Two newlines are appended (one for editors that don't put a newline at the end of the last line, and one so that the grammar doesn't have to special-case the last entry, which may not have a blank line after it). --------------------- I would therefore suggest that this is not an enhancement waiting to happen but an actual bug. This bug causes quite a few problems for beginning manifest authors, and I can't imagine it would be that difficult to fix. (Review ID: 111861) ======================================================================
|