JDK-4720957 : -link and -linkoffline creates wrong link to ../../../http://
  • Type: Bug
  • Status: Resolved
  • Resolution: Fixed
  • Component: tools
  • Sub-Component: javadoc(tool)
  • Priority: P4
  • Affected Version: 1.4.1
  • OS: windows_nt,windows_2000
  • CPU: x86
  • Submit Date: 2002-07-25
  • Updated Date: 2014-05-05
  • Resolved Date: 2002-10-25
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availabitlity Release.

To download the current JDK release, click here.
Other
1.4.2 mantisResolved
Related Reports
Duplicate :  
Duplicate :  
Duplicate :  
Description

Name: nt126004			Date: 07/25/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 : Microsoft Windows 2000
[Version 5.00.2195]


A DESCRIPTION OF THE PROBLEM :
When using the -link or the -linkoffline option of the
javadoc tool distributed with SDK 1.4.1 beta the href links
are created wrong.

EXAMPLE:
---------
USING 1.4.1 BETA:
------------------------
at command line I type:
c:\java\j2sdk1.4.1\bin\javadoc.exe -linkoffline
http://java.sun.com/j2se/1.4/docs/api/ .\tmp -d doc\api -
sourcepath .\src -package com.spm.anttry

And the resulting javadocs contains the link to
java.lang.Object as:
<A
HREF="../../../http://java.sun.com/j2se/1.4/docs/api/java/la
ng/Object.html">java.lang.Object</A>

USING 1.4.0
------------
When i do EXACTLY the same using SDK v 1.4.0 i.e.
At cmd line I type:
c:\java\j2sdk1.4.0\bin\javadoc.exe -linkoffline
http://java.sun.com/j2se/1.4/docs/api/ .\tmp -d doc\api -
sourcepath .\src -package com.spm.anttry

the resulting link to java.lang.Object is:
<A
HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object
.html">java.lang.Object</A>

REGRESSION.  Last worked in version 1.4

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Use the -link or -linkoffline option of the javadoc tool
2. Steps I used is described in the "DESCRIPTION"
3.

EXPECTED VERSUS ACTUAL BEHAVIOR :
the links are created as if it is linking to a file located
at the root of my current drive. Should link to the url.

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
//The following is the single java class i used when i got the error
//FileName: HelloWorld.java

package com.spm.anttry;
/*
 *  HelloWorld.java
 *  My first java program
 */

public class HelloWorld {
    /**
     * Print "Hello World"
     */
    public void sayHello() {
          System.out.println("Hello World");
      }

    /**
     * Test
     */
    public static void main( String[] args ) {
        HelloWorld world = new HelloWorld();
        world.sayHello();
    }
}

---------- END SOURCE ----------

CUSTOMER WORKAROUND :
use JDK v. 1.4.0
(Review ID: 159740) 
======================================================================

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: mantis FIXED IN: mantis INTEGRATED IN: mantis mantis-b05
2004-06-14

EVALUATION Once fixed, this needs a regression test. ###@###.### 2002-07-25 The -linkoffline option broke when this bug was fixed for merlin 4492579 (-linkoffline broken when first arg is relative). The -linkoffline option now checks if the first arg is a file path or URL. Then, it links to external classes the appropriate way. ###@###.### 2002-07-26
2002-07-26

PUBLIC COMMENTS The -linkoffline option broke when this bug was fixed for merlin 4492579 (-linkoffline broken when first arg is relative). The -linkoffline option now checks if the first arg is a file path or URL. Then, it links to external classes the appropriate way. ###@###.### 2002-07-26
2002-07-26