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.

Bug 12138 - JPDA debugger uses wrong path
Summary: JPDA debugger uses wrong path
Status: CLOSED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Java (show other bugs)
Version: 3.x
Hardware: PC OS/2
: P3 blocker (vote)
Assignee: Daniel Prusa
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-05-12 00:47 UTC by _ gtzabari
Modified: 2001-06-07 10:55 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ gtzabari 2001-05-12 00:47:57 UTC
dev build 181
(see issue #11154 -- as it seems to have caused the problem)

using the JPDA debugger fails to execute:

d:\java13\jre\..\bin\java.exe

    The correct path would be d:\java13\jre\bin\java.exe ... I don't know 
where those ".." came from..

As a result, the debugger won't work at all under OS/2.
Comment 1 _ gtzabari 2001-05-12 00:53:48 UTC
The odd thing I just noticed is that the JPDA configuration reads:

{jdk.home}{/}bin{/}java {classic}{debuggerOptions} -Djava.compiler=NONE 
{q}{bootclasspathSwitch}{bootclasspath}{q} -classpath {q}{filesystems}{q} 
{main}

   ... so the only way this could be happening is if Netbeans thinks 
{jdk.home} is "d:\java13\jre\.." which it is (if I understand correctly, 
jdk.home points to the base of the java directory, in my case d:\java13) 
but then how does one ever expect {jdk.home}{/}bin{/}java to work on a 
system making use of a \jre directory?
Comment 2 Tomas Hurka 2001-05-22 12:56:39 UTC
Your assumption about {jdk.home} is correct. When discussed issue #11154 you
told be that OS/2 has the same structure as Windows only with exception of
dt_socket.dll. {jdk.home}{/}bin{/}java works on Windows, Linux and Solaris
without any problems. I had no change to test it I trusted what you said me.
Also I don't understand, why it P1 bug? You can change the settings manually to
reflect your java.exe placement.
Comment 3 _ gtzabari 2001-05-22 13:24:52 UTC
Sorry. My logic was simple:

The user can't compile due to this error, thereby making it > P3

   I guess I didn't think much of the fact that the setting was 
configurable. <shrug> Sorry..

Is there any information you need to fix this issue or is the above 
information detailed enough?

Furthermore, do you consider this a bug IBM's JDK, or is the 
implementation open to interpretation of this issue?

Lastly, have you tried this on IBM's Windows JDK? It might experience the 
same issue, as a result perhaps you should auto-detect IBM's JDK and 
decide on the path accordingly.
Comment 4 Tomas Hurka 2001-05-22 14:06:35 UTC
It is a pity that I asked you about this problem in email with 'Netbeans OS/2
path for external programs' subject and you had no objection. To fix the problem
we can go back to the previous version and return back the following code:
    public static String getDefaultProcessName () {
         if (Utilities.getOperatingSystem () == Utilities.OS_OS2)
             return "{java.home}{/}bin{/}java"; // NOI18N
         return "{java.home}{/}..{/}bin{/}java"; // NOI18N
     }

to ProcessDebuggerType.java. I definitely consider it IBM's JDK bug, please ask
them about their opinion. It would be great if they can fix it and be compatible
with other JDK installations. If they are unwilling to fix it we probably can
put the OS/2 specific patch mentioned above back to Netbeans. I just looked at
Linux JDK from IBM and there is java executable in both {jdk.home}/bin and
{jdk.home}/jre/bin directory. See:
$ ls -l /usr/java/IBMJava2-13/bin/java
-rwxr-xr-x    1 root     root         1166 May  2  2000
/usr/java/IBMJava2-13/bin/java
$ ls -l /usr/java/IBMJava2-13/jre/bin/java
-rwxr-xr-x    1 root     root         1166 May  2  2000
/usr/java/IBMJava2-13/jre/bin/java
Comment 5 Daniel Prusa 2001-05-29 08:41:54 UTC
fixed in main trunk; the following code is used to obtain path now:

public static String getDefaultProcessName () {
    if (Utilities.getOperatingSystem () == Utilities.OS_OS2)
        return "{jdk.home}{/}jre{/}bin{/}java"; // NOI18N
    return "{jdk.home}{/}bin{/}java"; // NOI18N
}