Platform: Linux/solaris/windows
JDK release: 1.4.1-rc build 17
Steps to reproduce:
1) Install j2sdk1.4.1-rc-b17 onto the test system
2) Invoke HTMLConverter (bundled with the JDK)
/j2sdk1.4.1/bin/HtmlConverter -gui
3) Use the Template File :"Extended (Standard + All Browsers/Platforms)
to convert any demo applet in the /j2sdk1.4.1/demo
The convertered demos can not be loaded using IE or NS4.x.
(error: java.lang.ClasFormatError: Bad major version number)
It can only be loaded using NS 6 which uses <Appplet> tag
All converteded applets should have been loaded using NS4.x or IE when users convert using "Extended" template
Name: gm110360 Date: 08/06/2002
FULL PRODUCT VERSION :
java version "1.4.1-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-beta-b14)
Java HotSpot(TM) Client VM (build 1.4.1-beta-b14, mixed mode)
FULL OPERATING SYSTEM VERSION :
Windows 98 [Version 4.10.2222]
ADDITIONAL OPERATING SYSTEMS :
All?
A DESCRIPTION OF THE PROBLEM :
The HTMLConverter templates contain illegal javascript
and bad html. This bug is related to bugs #4717944 and
#4638440, but the "comment" button in those bug reports
results in:
400 Bad Request
No comment data!
at URL:
http://developer.java.sun.com/servlet/BugVoteServlet
The document.writeln() methods contain a quoted string
with embedded newlines. This is an incorrect textfile
encoding for DOS/Windows. But even if you managed to
fix that, it is illegal to embed newlines in a quoted
string. The embedded newlines ("\n") should be replaced
with "'\n+'" sequence (replace one character with four).
For the Windows platform the newlines should be replaced
with "\r\n" sequences. (Since HTMLConverter is written
in Java, it should not be difficult to get and use the
value of the system property line.seperator when
generating output.
Additionally, the HTML is not legal HTML 4.01. While I
realize HTMLConverter is for backward compatibility for
old browers, the generated code should be legal on all
browsers or the tool is worthless as a single HTML file
solution for multiple broswer support. Some simple
changes are to use <script type="text/javascript>
instead of <SCRIPT LANGUAGE="JAVASCRIPT">. The LANGUAGE
attribute is deprecated, and all tags and attribute
names should be in lowercase (because case only matters
when supporting xhtml, which requires lower case). For
applet tag related purposes, the HTML 4.01 standard
seems backward compatible with HTML 3.2 (That is, the
incompatibilities such as the HR tag don't effect what
HTMLConverter needs.)
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. HTMLConverter
2. Select extended template (all browers and platforms)
3. Convert an applet tag
REPRODUCIBILITY :
This bug can be reproduced always.
CUSTOMER WORKAROUND :
Hand edit the resulting HTML files.
(Review ID: 160303)
======================================================================
###@###.### 2002-12-04
Tested with 1.4.2-b08 using template
"Extended (Standard + All Browsers/Platforms)"
on XP-Prof/RH/sparc 8
The converted applets seems to be loaded fine.