Re: Bug-to-bug compatibility - first issue
On 2/22/06, Mikhail Loenko [EMAIL PROTECTED] wrote: I'd suggest splitting the issue into two different ones: The first one is interpreting the command line. I completely agree that we should do it similar to RI. The second one is as Vladimir said that behavior is caused by something in URLClassloader or kernel classes. Vladimir, if you could provide a piece of java code that shows difference in the behavoir of RI and Harmony in those classes, so we could discuss how to implement the classes the best. Looks like that it should be fixed only in kernel classes in parser of classpath string. ClassLoader invokes constructor of URLClassLoader with urls parameter length = 1, i.e it contains only the following url file:/P:/. Thanks, Vladimir. Thanks, Mikhail On 2/22/06, Paulex Yang [EMAIL PROTECTED] wrote: I agree with you that it is natural to copy RI behavior in this case, and I even don't think this is a bug, in the same reason with one of the bugs' evaluation [1], quoteAn empty path component is always (in both Unix/Posix-like and Windows systems) treated as ./quote Arzhan Kinzhalin wrote: URLClassLoader can't load this class because searchURLs parameter in findClassImpl does not contain current directory and includes only p:/. So, IMO problem is inside VM kernel classes. What do you think we should do with this issue? It actually has corresponding bug report [1] which provides some background to the story. Names and behaviour of command-line arguments is not a part of the spec. It's just that everyone follows well-established conventions. In this case it would seem natural to copy the behavior. [1] http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4515984 -- Arzhan Intel Middleware Products Division -- Paulex Yang China Software Development Lab IBM
Re: Bug-to-bug compatibility - first issue
IBM VM? If so it's probably not an issue for Harmony but for IBM :) 2006/2/21, Vladimir Strigun [EMAIL PROTECTED]: We had discussion about bug-to-bug compatibility and it was decided to solve problems at the moment when they appear. So I have the 1st problem (below you can find the steps for reproducing it): 1. Compile any java class and put it to jre/bin folder (I used Hello.class) 2. run java Hello (everything works fine) 3. run java -classpath p:; Hello Result: NoClassDefFoundError If I use same command with RI (Sun and BEA) this test passes. I've found in documentation [1] that if you want to include the current directory in the search path, you must include . in the new settings. So, it looks like that we have bug in RI, but our implementation works with strict correspondence to the documentation. URLClassLoader can't load this class because searchURLs parameter in findClassImpl does not contain current directory and includes only p:/. So, IMO problem is inside VM kernel classes. What do you think we should do with this issue? [1] http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/classpath.html Thanks, Vladimir Strigun, Intel Middleware Products Division -- Alexey A. Petrenko Intel Middleware Products Division
Re: Bug-to-bug compatibility - first issue
This issue can be fixed either in Harmony classlib or kernel classes in VM. Thanks, Vladimir Strigun, Intel Middleware Products Division On 2/21/06, Alexey Petrenko [EMAIL PROTECTED] wrote: IBM VM? If so it's probably not an issue for Harmony but for IBM :) 2006/2/21, Vladimir Strigun [EMAIL PROTECTED]: We had discussion about bug-to-bug compatibility and it was decided to solve problems at the moment when they appear. So I have the 1st problem (below you can find the steps for reproducing it): 1. Compile any java class and put it to jre/bin folder (I used Hello.class) 2. run java Hello (everything works fine) 3. run java -classpath p:; Hello Result: NoClassDefFoundError If I use same command with RI (Sun and BEA) this test passes. I've found in documentation [1] that if you want to include the current directory in the search path, you must include . in the new settings. So, it looks like that we have bug in RI, but our implementation works with strict correspondence to the documentation. URLClassLoader can't load this class because searchURLs parameter in findClassImpl does not contain current directory and includes only p:/. So, IMO problem is inside VM kernel classes. What do you think we should do with this issue? [1] http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/classpath.html Thanks, Vladimir Strigun, Intel Middleware Products Division -- Alexey A. Petrenko Intel Middleware Products Division
Re: Bug-to-bug compatibility - first issue
URLClassLoader can't load this class because searchURLs parameter in findClassImpl does not contain current directory and includes only p:/. So, IMO problem is inside VM kernel classes. What do you think we should do with this issue? It actually has corresponding bug report [1] which provides some background to the story. Names and behaviour of command-line arguments is not a part of the spec. It's just that everyone follows well-established conventions. In this case it would seem natural to copy the behavior. [1] http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4515984 -- Arzhan Intel Middleware Products Division
Re: Bug-to-bug compatibility - first issue
2006/2/21, Vladimir Strigun [EMAIL PROTECTED]: This issue can be fixed either in Harmony classlib or kernel classes in VM. Yes, you are right. -- Alexey A. Petrenko Intel Middleware Products Division
Re: Bug-to-bug compatibility - first issue
I agree with you that it is natural to copy RI behavior in this case, and I even don't think this is a bug, in the same reason with one of the bugs' evaluation [1], quoteAn empty path component is always (in both Unix/Posix-like and Windows systems) treated as ./quote Arzhan Kinzhalin wrote: URLClassLoader can't load this class because searchURLs parameter in findClassImpl does not contain current directory and includes only p:/. So, IMO problem is inside VM kernel classes. What do you think we should do with this issue? It actually has corresponding bug report [1] which provides some background to the story. Names and behaviour of command-line arguments is not a part of the spec. It's just that everyone follows well-established conventions. In this case it would seem natural to copy the behavior. [1] http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4515984 -- Arzhan Intel Middleware Products Division -- Paulex Yang China Software Development Lab IBM
Re: Bug-to-bug compatibility - first issue
I'd suggest splitting the issue into two different ones: The first one is interpreting the command line. I completely agree that we should do it similar to RI. The second one is as Vladimir said that behavior is caused by something in URLClassloader or kernel classes. Vladimir, if you could provide a piece of java code that shows difference in the behavoir of RI and Harmony in those classes, so we could discuss how to implement the classes the best. Thanks, Mikhail On 2/22/06, Paulex Yang [EMAIL PROTECTED] wrote: I agree with you that it is natural to copy RI behavior in this case, and I even don't think this is a bug, in the same reason with one of the bugs' evaluation [1], quoteAn empty path component is always (in both Unix/Posix-like and Windows systems) treated as ./quote Arzhan Kinzhalin wrote: URLClassLoader can't load this class because searchURLs parameter in findClassImpl does not contain current directory and includes only p:/. So, IMO problem is inside VM kernel classes. What do you think we should do with this issue? It actually has corresponding bug report [1] which provides some background to the story. Names and behaviour of command-line arguments is not a part of the spec. It's just that everyone follows well-established conventions. In this case it would seem natural to copy the behavior. [1] http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4515984 -- Arzhan Intel Middleware Products Division -- Paulex Yang China Software Development Lab IBM
Re: Bug-to-bug compatibility - first issue
I think this would be IBM's problem. Alexey Petrenko wrote: IBM VM? If so it's probably not an issue for Harmony but for IBM :) 2006/2/21, Vladimir Strigun [EMAIL PROTECTED]: We had discussion about bug-to-bug compatibility and it was decided to solve problems at the moment when they appear. So I have the 1st problem (below you can find the steps for reproducing it): 1. Compile any java class and put it to jre/bin folder (I used Hello.class) 2. run java Hello (everything works fine) 3. run java -classpath p:; Hello Result: NoClassDefFoundError If I use same command with RI (Sun and BEA) this test passes. I've found in documentation [1] that if you want to include the current directory in the search path, you must include . in the new settings. So, it looks like that we have bug in RI, but our implementation works with strict correspondence to the documentation. URLClassLoader can't load this class because searchURLs parameter in findClassImpl does not contain current directory and includes only p:/. So, IMO problem is inside VM kernel classes. What do you think we should do with this issue? [1] http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/classpath.html Thanks, Vladimir Strigun, Intel Middleware Products Division -- Alexey A. Petrenko Intel Middleware Products Division
Re: Bug-to-bug compatibility - first issue
There's an interesting issue - we probably need to find out under what license the source found in sun bug reports is available under :) geir Arzhan Kinzhalin wrote: URLClassLoader can't load this class because searchURLs parameter in findClassImpl does not contain current directory and includes only p:/. So, IMO problem is inside VM kernel classes. What do you think we should do with this issue? It actually has corresponding bug report [1] which provides some background to the story. Names and behaviour of command-line arguments is not a part of the spec. It's just that everyone follows well-established conventions. In this case it would seem natural to copy the behavior. [1] http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4515984 -- Arzhan Intel Middleware Products Division