Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 4720957
Votes 5
Synopsis -link and -linkoffline creates wrong link to ../../../http://
Category doclet:tbd
Reported Against 1.4.1 , hopper-beta
Release Fixed 1.4.2(mantis)
State 10-Fix Delivered, bug
Priority: 4-Low
Related Bugs 4762913 , 4786972 , 4754376
Submit Date 25-JUL-2002
Description
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.

 xxxxx@xxxxx  2002-07-26




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) 
======================================================================
Work Around
N/A
Evaluation
Once fixed, this needs a regression test.
 xxxxx@xxxxx  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.

 xxxxx@xxxxx  2002-07-26
Comments
  
  Include a link with my name & email   

Submitted On 05-SEP-2002
brendanryan59
I used linkoffline mainly because javadoc could not pass
through the company firewall. After some research I found
that using the javadoc parameter -J, I could pass the http
proxy info successfully to javadoc so that (online) link
also works. Call format is 
javadoc -J-Dhttp.proxyHost=xxxx -J-Dhttp.proxyPort=nnnn  ...


Submitted On 12-DEC-2002
chdaller
linkoffline also works, if the <url2> is really an url, so file:/whatever does the trick, where /whatever does not work (shows the buggy behaviour).



PLEASE NOTE: JDK6 is formerly known as Project Mustang