You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@river.apache.org by "Hakan Kocakulak (JIRA)" <ji...@apache.org> on 2007/11/20 17:12:43 UTC

[jira] Created: (RIVER-272) ClassDep.java relies on Sun specific Internal JDK API

ClassDep.java relies on Sun specific Internal JDK API 
------------------------------------------------------

                 Key: RIVER-272
                 URL: https://issues.apache.org/jira/browse/RIVER-272
             Project: River
          Issue Type: Improvement
          Components: com_sun_jini_tool
    Affects Versions: jtsk_2.1
         Environment: Windows XP, JDK 1.4 - JDK 1.6, Eclipse 3.3 IDE
            Reporter: Hakan Kocakulak


ClassDep.java relies on Sun specific Internal JDK API 

import sun.tools.java.BinaryClass;
> import sun.tools.java.ClassDeclaration; import 
> sun.tools.java.ClassFile; import sun.tools.java.ClassNotFound; import 
> sun.tools.java.ClassPath; import sun.tools.java.Constants; import 
> sun.tools.java.Environment; import sun.tools.java.Identifier; import 
> sun.tools.java.MemberDefinition; import sun.tools.java.Package; import 
> sun.tools.java.Type;

while building from eclipse IDE, IDE do not add these Classes to classpath and can not build project.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Re: [jira] Created: (RIVER-272) ClassDep.java relies on Sun specific Internal JDK API

Posted by Mark Brouwer <ma...@cheiron.org>.
Hakan Kocakulak (JIRA) wrote:
> ClassDep.java relies on Sun specific Internal JDK API 
> ------------------------------------------------------
> 
>                  Key: RIVER-272
>                  URL: https://issues.apache.org/jira/browse/RIVER-272
>              Project: River
>           Issue Type: Improvement
>           Components: com_sun_jini_tool
>     Affects Versions: jtsk_2.1
>          Environment: Windows XP, JDK 1.4 - JDK 1.6, Eclipse 3.3 IDE
>             Reporter: Hakan Kocakulak


Thanks Hakan, gentle of you to call it an improvement :-)

Seeing this issue and also related to the enum issue I miss a workaround
field in JIRA for our issues, I'm going to add one. If somebody objects
to that let me know, it can be removed after being added.
-- 
Mark


Re: [jira] Issue Comment Edited: (RIVER-272) ClassDep.java relies on Sun specific Internal JDK API

Posted by Peter Firmstone <ji...@zeus.net.au>.
Thanks Jonathan, better keep those beans coming in!

I'm currently working on replacing the functional internals of ClassDep 
by making calls to ClassDepend, will have it done shortly, I'll post the 
code on Jira when I do.

I've noticed that Jukka and yourself are quite busy working on River.

Cheers,

Peter.


Jonathan Costers wrote:
> Will take a look asap, my day job is keeping me pretty busy for the moment
> ...
>
>
> 2009/4/2 Peter Firmstone (JIRA) <ji...@apache.org>
>
>   
>>    [
>> https://issues.apache.org/jira/browse/RIVER-272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12694877#action_12694877]
>>
>> Peter Firmstone edited comment on RIVER-272 at 4/2/09 12:17 AM:
>> ----------------------------------------------------------------
>>
>> We need to add the ASM Libraries:
>>
>> trunk/lib/asm-2.2.3.jar
>> trunk/lib/asm-commons-2.2.3.jar
>>
>> And integrate ClassDepend into the main build file
>>
>> Cheers,
>>
>> Peter.
>>
>>
>>
>>      was (Author: pfirmst):
>>    We need to add the ASM Libraries:
>>
>> trunk/lib/asm-2.2.3.jar
>> trunk/lib/asm-commons-2.2.3.jar
>>
>> I noticed that the lib directory isn't in the build files classpath.
>>
>> Cheers,
>>
>> Peter.
>>
>>
>>
>>     
>>> ClassDep.java relies on Sun specific Internal JDK API
>>> ------------------------------------------------------
>>>
>>>                 Key: RIVER-272
>>>                 URL: https://issues.apache.org/jira/browse/RIVER-272
>>>             Project: River
>>>          Issue Type: Improvement
>>>          Components: com_sun_jini_tool
>>>    Affects Versions: jtsk_2.1
>>>         Environment: Windows XP, JDK 1.4 - JDK 1.6, Eclipse 3.3 IDE
>>>            Reporter: Hakan Kocakulak
>>>         Attachments: classdepend.zip, classdepend_backport.tgz
>>>
>>>
>>> ClassDep.java relies on Sun specific Internal JDK API
>>> import sun.tools.java.BinaryClass;
>>>       
>>>> import sun.tools.java.ClassDeclaration; import
>>>> sun.tools.java.ClassFile; import sun.tools.java.ClassNotFound; import
>>>> sun.tools.java.ClassPath; import sun.tools.java.Constants; import
>>>> sun.tools.java.Environment; import sun.tools.java.Identifier; import
>>>> sun.tools.java.MemberDefinition; import sun.tools.java.Package; import
>>>> sun.tools.java.Type;
>>>>         
>>> while building from eclipse IDE, IDE do not add these Classes to
>>>       
>> classpath and can not build project.
>>
>> --
>> This message is automatically generated by JIRA.
>> -
>> You can reply to this email to add a comment to the issue online.
>>
>>
>>     
>
>   


Re: [jira] Issue Comment Edited: (RIVER-272) ClassDep.java relies on Sun specific Internal JDK API

Posted by Jonathan Costers <jo...@googlemail.com>.
Will take a look asap, my day job is keeping me pretty busy for the moment
...


2009/4/2 Peter Firmstone (JIRA) <ji...@apache.org>

>
>    [
> https://issues.apache.org/jira/browse/RIVER-272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12694877#action_12694877]
>
> Peter Firmstone edited comment on RIVER-272 at 4/2/09 12:17 AM:
> ----------------------------------------------------------------
>
> We need to add the ASM Libraries:
>
> trunk/lib/asm-2.2.3.jar
> trunk/lib/asm-commons-2.2.3.jar
>
> And integrate ClassDepend into the main build file
>
> Cheers,
>
> Peter.
>
>
>
>      was (Author: pfirmst):
>    We need to add the ASM Libraries:
>
> trunk/lib/asm-2.2.3.jar
> trunk/lib/asm-commons-2.2.3.jar
>
> I noticed that the lib directory isn't in the build files classpath.
>
> Cheers,
>
> Peter.
>
>
>
> > ClassDep.java relies on Sun specific Internal JDK API
> > ------------------------------------------------------
> >
> >                 Key: RIVER-272
> >                 URL: https://issues.apache.org/jira/browse/RIVER-272
> >             Project: River
> >          Issue Type: Improvement
> >          Components: com_sun_jini_tool
> >    Affects Versions: jtsk_2.1
> >         Environment: Windows XP, JDK 1.4 - JDK 1.6, Eclipse 3.3 IDE
> >            Reporter: Hakan Kocakulak
> >         Attachments: classdepend.zip, classdepend_backport.tgz
> >
> >
> > ClassDep.java relies on Sun specific Internal JDK API
> > import sun.tools.java.BinaryClass;
> > > import sun.tools.java.ClassDeclaration; import
> > > sun.tools.java.ClassFile; import sun.tools.java.ClassNotFound; import
> > > sun.tools.java.ClassPath; import sun.tools.java.Constants; import
> > > sun.tools.java.Environment; import sun.tools.java.Identifier; import
> > > sun.tools.java.MemberDefinition; import sun.tools.java.Package; import
> > > sun.tools.java.Type;
> > while building from eclipse IDE, IDE do not add these Classes to
> classpath and can not build project.
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>

Re: [jira] Commented: (RIVER-272) ClassDep.java relies on Sun specific Internal JDK API

Posted by Jonathan Costers <jo...@googlemail.com>.
> Good idea, can someone create a "unit-test" directory in the main 
> trunk?  Should I raise an issue on Jira?  A bit off topic, but related, 
> I noticed there two directory trees, one called integrationtests and the 
> other called qa, if we create a "unit-test" directory, it would be nice 
> to have an "integration-test" directory for clarity.

Yes, please open an issue, and lets continue this discussion there.
The latest revision of the jtsk trunk contains:
DISCLAIMER
KEYS
LICENSE
NOTICE
build.xml
common.xml
doc/
index.html
qa/
src/
tools/

No more "integrationtests" dir there.
What I would propose is this add a "test" (I guess naming is not so
important) directory (like most standard project directory layouts store
their unit tests) and add some test targets to the main build.xml for
it.

so:

build.xml (add test targets here)
common.xml
...
src
test
 - src
qa
 - build.xml
 - src
 - ...

IMHO, the difference with the QA "subproject" would be that the latter
has its own build file and will be distributed separately. Technically
one could add unit tests to the QA harness too, they would go in
qa/test ;-)

That said, everybody is of course free to send in patches to add some
unit tests any way they feel is best!

Best
Jonathan


Re: [jira] Commented: (RIVER-272) ClassDep.java relies on Sun specific Internal JDK API

Posted by Peter Firmstone <ji...@zeus.net.au>.
Jonathan Costers wrote:
> Thank you, I will review and include your patch in the trunk as soon as I
> can.
>
> To my knowledge, there are no test cases defined anywhere for the tools
> (classdep, preferredlistgen etc.), also not in the QA suite.
>
> So this may be an opportunity to introduce JUnit? Like Jukka mentioned
> before, it should fairly straight forward to write JUnit tests for ClassDep
> for instance.
>   
Good idea, can someone create a "unit-test" directory in the main 
trunk?  Should I raise an issue on Jira?  A bit off topic, but related, 
I noticed there two directory trees, one called integrationtests and the 
other called qa, if we create a "unit-test" directory, it would be nice 
to have an "integration-test" directory for clarity.

Nice work converting all the integration tests to ant, heaps of effort, 
long hours, much appreciated.

Cheers,

Peter.
> Thanks and best regards
> Jonathan
>
> 2009/4/21 Peter Firmstone (JIRA) <ji...@apache.org>
>
>   
>>    [
>> https://issues.apache.org/jira/browse/RIVER-272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12701077#action_12701077]
>>
>> Peter Firmstone commented on RIVER-272:
>> ---------------------------------------
>>
>> The latest patch is sufficient to resolve this issue for an AR2 release.
>>
>> I suggest creating a separate issue for the -outer functionality, as this
>> behaviour is now enabled by default.  I couldn't find a test case where the
>> Containing class wasn't present in the output with the old ClassDep tool.
>>
>> It should also resolve River-163, does anyone have any test cases for
>> River-163 we can try out?
>>
>> Note the classdepend API is more powerful than ClassDep, feel free to check
>> it out.
>>
>> After AR2 I'd like to add method and field dependency analysis to assist
>> River API analysis and development, however it should be left for an
>> improvement issue.
>>
>> Cheers,
>>
>> Peter.
>>
>>     
>>> ClassDep.java relies on Sun specific Internal JDK API
>>> ------------------------------------------------------
>>>
>>>                 Key: RIVER-272
>>>                 URL: https://issues.apache.org/jira/browse/RIVER-272
>>>             Project: River
>>>          Issue Type: Improvement
>>>          Components: com_sun_jini_tool
>>>    Affects Versions: jtsk_2.1
>>>         Environment: Windows XP, JDK 1.4 - JDK 1.6, Eclipse 3.3 IDE
>>>            Reporter: Hakan Kocakulak
>>>         Attachments: ClassDep-a4.patch, ClassDep-a5.patch,
>>>       
>> ClassDep-a6.patch, classdepend.zip, classdepend_backport.tgz,
>> ClassDepReplacement.tgz, ClassDepReplacement_alpha-2.tgz,
>> ClassDepReplacement_alpha-3.tgz, ClassDepReplacement_alpha-4.tgz
>>     
>>> ClassDep.java relies on Sun specific Internal JDK API
>>> import sun.tools.java.BinaryClass;
>>>       
>>>> import sun.tools.java.ClassDeclaration; import
>>>> sun.tools.java.ClassFile; import sun.tools.java.ClassNotFound; import
>>>> sun.tools.java.ClassPath; import sun.tools.java.Constants; import
>>>> sun.tools.java.Environment; import sun.tools.java.Identifier; import
>>>> sun.tools.java.MemberDefinition; import sun.tools.java.Package; import
>>>> sun.tools.java.Type;
>>>>         
>>> while building from eclipse IDE, IDE do not add these Classes to
>>>       
>> classpath and can not build project.
>>
>> --
>> This message is automatically generated by JIRA.
>> -
>> You can reply to this email to add a comment to the issue online.
>>
>>
>>     
>
>   


Re: [jira] Commented: (RIVER-272) ClassDep.java relies on Sun specific Internal JDK API

Posted by Jonathan Costers <jo...@googlemail.com>.
Thank you, I will review and include your patch in the trunk as soon as I
can.

To my knowledge, there are no test cases defined anywhere for the tools
(classdep, preferredlistgen etc.), also not in the QA suite.

So this may be an opportunity to introduce JUnit? Like Jukka mentioned
before, it should fairly straight forward to write JUnit tests for ClassDep
for instance.

Thanks and best regards
Jonathan

2009/4/21 Peter Firmstone (JIRA) <ji...@apache.org>

>
>    [
> https://issues.apache.org/jira/browse/RIVER-272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12701077#action_12701077]
>
> Peter Firmstone commented on RIVER-272:
> ---------------------------------------
>
> The latest patch is sufficient to resolve this issue for an AR2 release.
>
> I suggest creating a separate issue for the -outer functionality, as this
> behaviour is now enabled by default.  I couldn't find a test case where the
> Containing class wasn't present in the output with the old ClassDep tool.
>
> It should also resolve River-163, does anyone have any test cases for
> River-163 we can try out?
>
> Note the classdepend API is more powerful than ClassDep, feel free to check
> it out.
>
> After AR2 I'd like to add method and field dependency analysis to assist
> River API analysis and development, however it should be left for an
> improvement issue.
>
> Cheers,
>
> Peter.
>
> > ClassDep.java relies on Sun specific Internal JDK API
> > ------------------------------------------------------
> >
> >                 Key: RIVER-272
> >                 URL: https://issues.apache.org/jira/browse/RIVER-272
> >             Project: River
> >          Issue Type: Improvement
> >          Components: com_sun_jini_tool
> >    Affects Versions: jtsk_2.1
> >         Environment: Windows XP, JDK 1.4 - JDK 1.6, Eclipse 3.3 IDE
> >            Reporter: Hakan Kocakulak
> >         Attachments: ClassDep-a4.patch, ClassDep-a5.patch,
> ClassDep-a6.patch, classdepend.zip, classdepend_backport.tgz,
> ClassDepReplacement.tgz, ClassDepReplacement_alpha-2.tgz,
> ClassDepReplacement_alpha-3.tgz, ClassDepReplacement_alpha-4.tgz
> >
> >
> > ClassDep.java relies on Sun specific Internal JDK API
> > import sun.tools.java.BinaryClass;
> > > import sun.tools.java.ClassDeclaration; import
> > > sun.tools.java.ClassFile; import sun.tools.java.ClassNotFound; import
> > > sun.tools.java.ClassPath; import sun.tools.java.Constants; import
> > > sun.tools.java.Environment; import sun.tools.java.Identifier; import
> > > sun.tools.java.MemberDefinition; import sun.tools.java.Package; import
> > > sun.tools.java.Type;
> > while building from eclipse IDE, IDE do not add these Classes to
> classpath and can not build project.
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>

[jira] Commented: (RIVER-272) ClassDep.java relies on Sun specific Internal JDK API

Posted by "Peter Firmstone (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/RIVER-272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12694877#action_12694877 ] 

Peter Firmstone commented on RIVER-272:
---------------------------------------

We need to add the ASM Libraries:

trunk/lib/asm-2.2.3.jar
trunk/lib/asm-commons-2.2.3.jar

I noticed that the lib directory isn't in the build files classpath.

Cheers,

Peter.



> ClassDep.java relies on Sun specific Internal JDK API 
> ------------------------------------------------------
>
>                 Key: RIVER-272
>                 URL: https://issues.apache.org/jira/browse/RIVER-272
>             Project: River
>          Issue Type: Improvement
>          Components: com_sun_jini_tool
>    Affects Versions: jtsk_2.1
>         Environment: Windows XP, JDK 1.4 - JDK 1.6, Eclipse 3.3 IDE
>            Reporter: Hakan Kocakulak
>         Attachments: classdepend.zip, classdepend_backport.tgz
>
>
> ClassDep.java relies on Sun specific Internal JDK API 
> import sun.tools.java.BinaryClass;
> > import sun.tools.java.ClassDeclaration; import 
> > sun.tools.java.ClassFile; import sun.tools.java.ClassNotFound; import 
> > sun.tools.java.ClassPath; import sun.tools.java.Constants; import 
> > sun.tools.java.Environment; import sun.tools.java.Identifier; import 
> > sun.tools.java.MemberDefinition; import sun.tools.java.Package; import 
> > sun.tools.java.Type;
> while building from eclipse IDE, IDE do not add these Classes to classpath and can not build project.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (RIVER-272) ClassDep.java relies on Sun specific Internal JDK API

Posted by "Peter Firmstone (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/RIVER-272?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Peter Firmstone updated RIVER-272:
----------------------------------

    Attachment: ClassDepReplacement_alpha-3.tgz

In this version I've changed the ClassDepend class to be instantiated with a static factory method instead of a constructor to allow for different implementations of ClassDepend to be returned.

I've also added the equivalent to the -tells option in ClassDep to ClassDependParameters & CDP Builder, this is not yet implemented in ClassDepend.

Static methods in ClassDepend have been changed to instance methods apart from main() and newInstance() static factory methods.

More comments & documentation too.

N.B. Tim originally submitted well structured code that's easily extendable, I've done my best to maintain the standard.  Note this code can find Annotation dependencies too

More to follow.

Cheers,

Peter.

> ClassDep.java relies on Sun specific Internal JDK API 
> ------------------------------------------------------
>
>                 Key: RIVER-272
>                 URL: https://issues.apache.org/jira/browse/RIVER-272
>             Project: River
>          Issue Type: Improvement
>          Components: com_sun_jini_tool
>    Affects Versions: jtsk_2.1
>         Environment: Windows XP, JDK 1.4 - JDK 1.6, Eclipse 3.3 IDE
>            Reporter: Hakan Kocakulak
>         Attachments: classdepend.zip, classdepend_backport.tgz, ClassDepReplacement.tgz, ClassDepReplacement_alpha-2.tgz, ClassDepReplacement_alpha-3.tgz
>
>
> ClassDep.java relies on Sun specific Internal JDK API 
> import sun.tools.java.BinaryClass;
> > import sun.tools.java.ClassDeclaration; import 
> > sun.tools.java.ClassFile; import sun.tools.java.ClassNotFound; import 
> > sun.tools.java.ClassPath; import sun.tools.java.Constants; import 
> > sun.tools.java.Environment; import sun.tools.java.Identifier; import 
> > sun.tools.java.MemberDefinition; import sun.tools.java.Package; import 
> > sun.tools.java.Type;
> while building from eclipse IDE, IDE do not add these Classes to classpath and can not build project.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Re: [jira] Issue Comment Edited: (RIVER-272) ClassDep.java relies on Sun specific Internal JDK API

Posted by Peter Firmstone <ji...@zeus.net.au>.
Jonathan Costers (JIRA) wrote:
>     [ https://issues.apache.org/jira/browse/RIVER-272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12693546#action_12693546 ] 
>
> Jonathan Costers edited comment on RIVER-272 at 3/29/09 5:50 PM:
> -----------------------------------------------------------------
>
> Thanks for the code! I'm testing it right now.
> If all seems to work, I'll provide a patch for build.xml and integrationtest.xml
>   
Tim Blackman deserves the credit for the code, I just back ported it.

Cheers,

Peter.
> EDIT: 
> I have successfully built and run ClassDepend on a number of JAR targets in the QA suite build. It seems to calculate the same dependencies as ClassDep. 
> However, the command line options are not the same as for ClassDep, so integrating it into the build would require quite some work. Not impossible though.
>
> Also, how do we best handle the dependency on ASM? 
>
> Best
> Jonathan
>
>       was (Author: jcosters):
>     Thanks for the code! I'm testing it right now.
> If all seems to work, I'll provide a patch for build.xml and integrationtest.xml too.
>
> Best
> Jonathan
>   
>   
>> ClassDep.java relies on Sun specific Internal JDK API 
>> ------------------------------------------------------
>>
>>                 Key: RIVER-272
>>                 URL: https://issues.apache.org/jira/browse/RIVER-272
>>             Project: River
>>          Issue Type: Improvement
>>          Components: com_sun_jini_tool
>>    Affects Versions: jtsk_2.1
>>         Environment: Windows XP, JDK 1.4 - JDK 1.6, Eclipse 3.3 IDE
>>            Reporter: Hakan Kocakulak
>>         Attachments: classdepend.zip, classdepend_backport.tgz
>>
>>
>> ClassDep.java relies on Sun specific Internal JDK API 
>> import sun.tools.java.BinaryClass;
>>     
>>> import sun.tools.java.ClassDeclaration; import 
>>> sun.tools.java.ClassFile; import sun.tools.java.ClassNotFound; import 
>>> sun.tools.java.ClassPath; import sun.tools.java.Constants; import 
>>> sun.tools.java.Environment; import sun.tools.java.Identifier; import 
>>> sun.tools.java.MemberDefinition; import sun.tools.java.Package; import 
>>> sun.tools.java.Type;
>>>       
>> while building from eclipse IDE, IDE do not add these Classes to classpath and can not build project.
>>     
>
>   


Re: [jira] Issue Comment Edited: (RIVER-272) ClassDep.java relies on Sun specific Internal JDK API

Posted by Peter Firmstone <ji...@zeus.net.au>.
Tim Blackman wrote:
> On Mar 29, 2009, at 9:53 PM, Peter Firmstone wrote:
>
>>> Thanks for the code! I'm testing it right now.
>>> If all seems to work, I'll provide a patch for build.xml and 
>>> integrationtest.xml.
>>>
>>> EDIT: I have successfully built and run ClassDepend on a number of 
>>> JAR targets in the QA suite build. It seems to calculate the same 
>>> dependencies as ClassDep. However, the command line options are not 
>>> the same as for ClassDep, so integrating it into the build would 
>>> require quite some work. Not impossible though.
>>
>> I was thinking of implementing a ProxyClassDep to convert the command 
>> line input from ClassDepLoader to ClassDepend or fallback to ClassDep 
>> (if its in the classpath) when ClassDepend doesn't implement the 
>> functionality.
>
> What capabilities does ClassDep have that are not supported by 
> ClassDepend?
>
> - Tim
>
I haven't done the comparison to ClassDep yet, however I'm reading into 
your comment that ClassDepend does have full equivalent functionality 
and can probably do more as there are some class dependencies that 
ClassDep misses.  If this is the case it certainly makes the integration 
much easier.   If so, instead of setting up a proxy, I'll probably make 
ClassDep wrap ClassDepend, and reimplement its methods by forwarding 
requests onto ClassDepend.  Will look into it more on the weekend.

N.B. Thanks for the code, it was much better than I expected. I checked 
around on the net to get some background on whom I'm talking to on this 
list and must say I'm impressed.

Cheers,

Peter.

Re: [jira] Issue Comment Edited: (RIVER-272) ClassDep.java relies on Sun specific Internal JDK API

Posted by Tim Blackman <Ti...@sun.com>.
On Mar 29, 2009, at 9:53 PM, Peter Firmstone wrote:

>> Thanks for the code! I'm testing it right now.
>> If all seems to work, I'll provide a patch for build.xml and  
>> integrationtest.xml.
>>
>> EDIT: I have successfully built and run ClassDepend on a number of  
>> JAR targets in the QA suite build. It seems to calculate the same  
>> dependencies as ClassDep. However, the command line options are not  
>> the same as for ClassDep, so integrating it into the build would  
>> require quite some work. Not impossible though.
>
> I was thinking of implementing a ProxyClassDep to convert the  
> command line input from ClassDepLoader to ClassDepend or fallback to  
> ClassDep (if its in the classpath) when ClassDepend doesn't  
> implement the functionality.

What capabilities does ClassDep have that are not supported by  
ClassDepend?

- Tim

Re: [jira] Issue Comment Edited: (RIVER-272) ClassDep.java relies on Sun specific Internal JDK API

Posted by Peter Firmstone <ji...@zeus.net.au>.
Jonathan Costers (JIRA) wrote:
>     [ https://issues.apache.org/jira/browse/RIVER-272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12693546#action_12693546 ] 
>
> Jonathan Costers edited comment on RIVER-272 at 3/29/09 5:50 PM:
> -----------------------------------------------------------------
>
> Thanks for the code! I'm testing it right now.
> If all seems to work, I'll provide a patch for build.xml and integrationtest.xml.
>
> EDIT: 
> I have successfully built and run ClassDepend on a number of JAR targets in the QA suite build. It seems to calculate the same dependencies as ClassDep. 
> However, the command line options are not the same as for ClassDep, so integrating it into the build would require quite some work. Not impossible though.
>   
I was thinking of implementing a ProxyClassDep to convert the command 
line input from ClassDepLoader to ClassDepend or fallback to ClassDep 
(if its in the classpath) when ClassDepend doesn't implement the 
functionality.

> Also, how do we best handle the dependency on ASM? 
>   
Perhaps the library be located at trunk/lib/asm-2.2.3.jar and 
trunk/lib/asm-commons-2.2.3.jar  and be downloaded and updated via svn.
The build scripts need to change the namespace with jarjar to, for 
example, org.river.lib.asm.* to get it out of the way for client code. 
> Best
> Jonathan
>
>       was (Author: jcosters):
>     Thanks for the code! I'm testing it right now.
> If all seems to work, I'll provide a patch for build.xml and integrationtest.xml too.
>
> Best
> Jonathan
>   
>   
>> ClassDep.java relies on Sun specific Internal JDK API 
>> ------------------------------------------------------
>>
>>                 Key: RIVER-272
>>                 URL: https://issues.apache.org/jira/browse/RIVER-272
>>             Project: River
>>          Issue Type: Improvement
>>          Components: com_sun_jini_tool
>>    Affects Versions: jtsk_2.1
>>         Environment: Windows XP, JDK 1.4 - JDK 1.6, Eclipse 3.3 IDE
>>            Reporter: Hakan Kocakulak
>>         Attachments: classdepend.zip, classdepend_backport.tgz
>>
>>
>> ClassDep.java relies on Sun specific Internal JDK API 
>> import sun.tools.java.BinaryClass;
>>     
>>> import sun.tools.java.ClassDeclaration; import 
>>> sun.tools.java.ClassFile; import sun.tools.java.ClassNotFound; import 
>>> sun.tools.java.ClassPath; import sun.tools.java.Constants; import 
>>> sun.tools.java.Environment; import sun.tools.java.Identifier; import 
>>> sun.tools.java.MemberDefinition; import sun.tools.java.Package; import 
>>> sun.tools.java.Type;
>>>       
>> while building from eclipse IDE, IDE do not add these Classes to classpath and can not build project.
>>     
>
>   


[jira] Issue Comment Edited: (RIVER-272) ClassDep.java relies on Sun specific Internal JDK API

Posted by "Jonathan Costers (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/RIVER-272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12693546#action_12693546 ] 

Jonathan Costers edited comment on RIVER-272 at 3/29/09 5:50 PM:
-----------------------------------------------------------------

Thanks for the code! I'm testing it right now.
If all seems to work, I'll provide a patch for build.xml and integrationtest.xml.

EDIT: 
I have successfully built and run ClassDepend on a number of JAR targets in the QA suite build. It seems to calculate the same dependencies as ClassDep. 
However, the command line options are not the same as for ClassDep, so integrating it into the build would require quite some work. Not impossible though.

Also, how do we best handle the dependency on ASM? 

Best
Jonathan

      was (Author: jcosters):
    Thanks for the code! I'm testing it right now.
If all seems to work, I'll provide a patch for build.xml and integrationtest.xml too.

Best
Jonathan
  
> ClassDep.java relies on Sun specific Internal JDK API 
> ------------------------------------------------------
>
>                 Key: RIVER-272
>                 URL: https://issues.apache.org/jira/browse/RIVER-272
>             Project: River
>          Issue Type: Improvement
>          Components: com_sun_jini_tool
>    Affects Versions: jtsk_2.1
>         Environment: Windows XP, JDK 1.4 - JDK 1.6, Eclipse 3.3 IDE
>            Reporter: Hakan Kocakulak
>         Attachments: classdepend.zip, classdepend_backport.tgz
>
>
> ClassDep.java relies on Sun specific Internal JDK API 
> import sun.tools.java.BinaryClass;
> > import sun.tools.java.ClassDeclaration; import 
> > sun.tools.java.ClassFile; import sun.tools.java.ClassNotFound; import 
> > sun.tools.java.ClassPath; import sun.tools.java.Constants; import 
> > sun.tools.java.Environment; import sun.tools.java.Identifier; import 
> > sun.tools.java.MemberDefinition; import sun.tools.java.Package; import 
> > sun.tools.java.Type;
> while building from eclipse IDE, IDE do not add these Classes to classpath and can not build project.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (RIVER-272) ClassDep.java relies on Sun specific Internal JDK API

Posted by "Peter Firmstone (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/RIVER-272?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Peter Firmstone updated RIVER-272:
----------------------------------

    Attachment: classdepend_backport.tgz

I've backported the sources provided by Tim Blackman to Java 1.4 source level.  It depends on ASM 2.2.3.  I've changed package namespace to com.sun.jini.tools.classdepend, I haven't included a build.xml file, I noticed there's a large rewrite of build.xml in River, this needs to be added to the tools.jar package in build.xml

>From there we'll look at upgrading the code to ASM 3.1 followed by duplication of ClassDep's functionality.

Once this gets into the main source tree, we can move the ClassDep class and create a ProxyClassDep class to use the new functionality as it is created, until complete, when we can remove ClassDep altogether.  This will allow us to pick up any errors in the new functionality with the integration tests.

Note this code is untested.

Cheers,

Peter.

> ClassDep.java relies on Sun specific Internal JDK API 
> ------------------------------------------------------
>
>                 Key: RIVER-272
>                 URL: https://issues.apache.org/jira/browse/RIVER-272
>             Project: River
>          Issue Type: Improvement
>          Components: com_sun_jini_tool
>    Affects Versions: jtsk_2.1
>         Environment: Windows XP, JDK 1.4 - JDK 1.6, Eclipse 3.3 IDE
>            Reporter: Hakan Kocakulak
>         Attachments: classdepend.zip, classdepend_backport.tgz
>
>
> ClassDep.java relies on Sun specific Internal JDK API 
> import sun.tools.java.BinaryClass;
> > import sun.tools.java.ClassDeclaration; import 
> > sun.tools.java.ClassFile; import sun.tools.java.ClassNotFound; import 
> > sun.tools.java.ClassPath; import sun.tools.java.Constants; import 
> > sun.tools.java.Environment; import sun.tools.java.Identifier; import 
> > sun.tools.java.MemberDefinition; import sun.tools.java.Package; import 
> > sun.tools.java.Type;
> while building from eclipse IDE, IDE do not add these Classes to classpath and can not build project.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (RIVER-272) ClassDep.java relies on Sun specific Internal JDK API

Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/RIVER-272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12689941#action_12689941 ] 

Jukka Zitting commented on RIVER-272:
-------------------------------------

Looks interesting. Where/how do you think something like this could be best integrated with River? A patch would be nice.

Also, it would be great to have tests for any new code. This looks like a piece of code that should be easy to write unit tests for.

> ClassDep.java relies on Sun specific Internal JDK API 
> ------------------------------------------------------
>
>                 Key: RIVER-272
>                 URL: https://issues.apache.org/jira/browse/RIVER-272
>             Project: River
>          Issue Type: Improvement
>          Components: com_sun_jini_tool
>    Affects Versions: jtsk_2.1
>         Environment: Windows XP, JDK 1.4 - JDK 1.6, Eclipse 3.3 IDE
>            Reporter: Hakan Kocakulak
>         Attachments: classdepend.zip
>
>
> ClassDep.java relies on Sun specific Internal JDK API 
> import sun.tools.java.BinaryClass;
> > import sun.tools.java.ClassDeclaration; import 
> > sun.tools.java.ClassFile; import sun.tools.java.ClassNotFound; import 
> > sun.tools.java.ClassPath; import sun.tools.java.Constants; import 
> > sun.tools.java.Environment; import sun.tools.java.Identifier; import 
> > sun.tools.java.MemberDefinition; import sun.tools.java.Package; import 
> > sun.tools.java.Type;
> while building from eclipse IDE, IDE do not add these Classes to classpath and can not build project.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (RIVER-272) ClassDep.java relies on Sun specific Internal JDK API

Posted by "Peter Firmstone (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/RIVER-272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12701077#action_12701077 ] 

Peter Firmstone commented on RIVER-272:
---------------------------------------

The latest patch is sufficient to resolve this issue for an AR2 release. 

I suggest creating a separate issue for the -outer functionality, as this behaviour is now enabled by default.  I couldn't find a test case where the Containing class wasn't present in the output with the old ClassDep tool.

It should also resolve River-163, does anyone have any test cases for River-163 we can try out?

Note the classdepend API is more powerful than ClassDep, feel free to check it out.

After AR2 I'd like to add method and field dependency analysis to assist River API analysis and development, however it should be left for an improvement issue.

Cheers,

Peter.

> ClassDep.java relies on Sun specific Internal JDK API 
> ------------------------------------------------------
>
>                 Key: RIVER-272
>                 URL: https://issues.apache.org/jira/browse/RIVER-272
>             Project: River
>          Issue Type: Improvement
>          Components: com_sun_jini_tool
>    Affects Versions: jtsk_2.1
>         Environment: Windows XP, JDK 1.4 - JDK 1.6, Eclipse 3.3 IDE
>            Reporter: Hakan Kocakulak
>         Attachments: ClassDep-a4.patch, ClassDep-a5.patch, ClassDep-a6.patch, classdepend.zip, classdepend_backport.tgz, ClassDepReplacement.tgz, ClassDepReplacement_alpha-2.tgz, ClassDepReplacement_alpha-3.tgz, ClassDepReplacement_alpha-4.tgz
>
>
> ClassDep.java relies on Sun specific Internal JDK API 
> import sun.tools.java.BinaryClass;
> > import sun.tools.java.ClassDeclaration; import 
> > sun.tools.java.ClassFile; import sun.tools.java.ClassNotFound; import 
> > sun.tools.java.ClassPath; import sun.tools.java.Constants; import 
> > sun.tools.java.Environment; import sun.tools.java.Identifier; import 
> > sun.tools.java.MemberDefinition; import sun.tools.java.Package; import 
> > sun.tools.java.Type;
> while building from eclipse IDE, IDE do not add these Classes to classpath and can not build project.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (RIVER-272) ClassDep.java relies on Sun specific Internal JDK API

Posted by "Peter Firmstone (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/RIVER-272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12701604#action_12701604 ] 

Peter Firmstone commented on RIVER-272:
---------------------------------------

Your right, the -cp option in this case is passed in as an argument to ClassDepLoader, which then passes it as an argument to ClassDep when it invokes it with reflection.

Your right about the tools.jar manifest, it's probably the best solution at this stage, even though somewhat ugly.

I left the ASM libs in the -cp option (lazyness on my part, ClassDep needed it when checking its own dependencies)

Here's how it should work: 

$ /usr/jdk/j2sdk1.4.2_12/jre/bin/java -jar ../ClassDepReplacement/dist/ClassDepReplacement.jar -cp ./build/timeandmoney-v0_5_1.jar -in com.domainlanguage -edges com.domainlanguage.money.Money
java.io.Serializable
java.lang.AssertionError
java.lang.Class
java.lang.ClassCastException
java.lang.ClassNotFoundException
java.lang.Comparable
java.lang.IllegalArgumentException
java.lang.Integer
java.lang.NoClassDefFoundError
java.lang.Object
java.lang.String
java.lang.StringBuffer
java.lang.Throwable
java.lang.UnsupportedOperationException
java.math.BigDecimal
java.text.DateFormat
java.text.ParsePosition
java.text.SimpleDateFormat
java.util.ArrayList
java.util.Calendar
java.util.Collection
java.util.Currency
java.util.Date
java.util.Iterator
java.util.List
java.util.Locale
java.util.TimeZone

Another Example:

$ /usr/jdk/j2sdk1.4.2_12/jre/bin/java -jar ../ClassDepReplacement/dist/ClassDepReplacement.jar -cp ./build/classes:/usr/local/java/lib/asm-3.1/lib/asm-3.1.jar:/usr/local/java/lib/asm-3.1/lib/asm-commons-3.1.jar -in org.objectweb -in com.sun.jini -edges -show java.util com.sun.jini.tool.ClassDep java.util.ArrayList
java.util.Arrays
java.util.Collection
java.util.Collections
java.util.Comparator
java.util.Enumeration
java.util.HashMap
java.util.HashSet
java.util.Iterator
java.util.List
java.util.Map
java.util.MissingResourceException
java.util.ResourceBundle
java.util.Set
java.util.SortedSet
java.util.StringTokenizer
java.util.TreeSet
java.util.jar.JarEntry
java.util.jar.JarFile
java.util.regex.Matcher
java.util.regex.Pattern


Cheers,

Peter.

> ClassDep.java relies on Sun specific Internal JDK API 
> ------------------------------------------------------
>
>                 Key: RIVER-272
>                 URL: https://issues.apache.org/jira/browse/RIVER-272
>             Project: River
>          Issue Type: Improvement
>          Components: com_sun_jini_tool
>    Affects Versions: jtsk_2.1
>         Environment: Windows XP, JDK 1.4 - JDK 1.6, Eclipse 3.3 IDE
>            Reporter: Hakan Kocakulak
>         Attachments: ClassDep-a4.patch, ClassDep-a5.patch, ClassDep-a6.patch, classdepend.zip, classdepend_backport.tgz, ClassDepReplacement.tgz, ClassDepReplacement_alpha-2.tgz, ClassDepReplacement_alpha-3.tgz, ClassDepReplacement_alpha-4.tgz
>
>
> ClassDep.java relies on Sun specific Internal JDK API 
> import sun.tools.java.BinaryClass;
> > import sun.tools.java.ClassDeclaration; import 
> > sun.tools.java.ClassFile; import sun.tools.java.ClassNotFound; import 
> > sun.tools.java.ClassPath; import sun.tools.java.Constants; import 
> > sun.tools.java.Environment; import sun.tools.java.Identifier; import 
> > sun.tools.java.MemberDefinition; import sun.tools.java.Package; import 
> > sun.tools.java.Type;
> while building from eclipse IDE, IDE do not add these Classes to classpath and can not build project.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (RIVER-272) ClassDep.java relies on Sun specific Internal JDK API

Posted by "Peter Firmstone (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/RIVER-272?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Peter Firmstone updated RIVER-272:
----------------------------------

    Attachment: ClassDepReplacement_alpha-2.tgz

This version has the following improvements:

1. Visits inner classes and includes them in the dependency list.
2. when package limiting scope is not supplied using the "-in" option it recurses the entire dependency tree available in the classpath.

> ClassDep.java relies on Sun specific Internal JDK API 
> ------------------------------------------------------
>
>                 Key: RIVER-272
>                 URL: https://issues.apache.org/jira/browse/RIVER-272
>             Project: River
>          Issue Type: Improvement
>          Components: com_sun_jini_tool
>    Affects Versions: jtsk_2.1
>         Environment: Windows XP, JDK 1.4 - JDK 1.6, Eclipse 3.3 IDE
>            Reporter: Hakan Kocakulak
>         Attachments: classdepend.zip, classdepend_backport.tgz, ClassDepReplacement.tgz, ClassDepReplacement_alpha-2.tgz
>
>
> ClassDep.java relies on Sun specific Internal JDK API 
> import sun.tools.java.BinaryClass;
> > import sun.tools.java.ClassDeclaration; import 
> > sun.tools.java.ClassFile; import sun.tools.java.ClassNotFound; import 
> > sun.tools.java.ClassPath; import sun.tools.java.Constants; import 
> > sun.tools.java.Environment; import sun.tools.java.Identifier; import 
> > sun.tools.java.MemberDefinition; import sun.tools.java.Package; import 
> > sun.tools.java.Type;
> while building from eclipse IDE, IDE do not add these Classes to classpath and can not build project.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (RIVER-272) ClassDep.java relies on Sun specific Internal JDK API

Posted by "Peter Firmstone (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/RIVER-272?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Peter Firmstone updated RIVER-272:
----------------------------------

    Attachment: ClassDep-a5.patch

Add more functionality and corrections

The following options remain to be implemented:

-outer
    By default, if a static nested class is included in the dependency graph, all references from that static nested class to its immediate lexically enclosing class are ignored (except when the static nested class extends its outer class), to avoid inadvertent inclusion of the enclosing class. (The default is chosen this way because the compiled class file of a static nested class always contains a reference to the immediate lexically enclosing class.) This option causes all such references to be considered rather than ignored. Note that this option is needed very infrequently.

-edges
    By default, the classes which are included in the dependency graph are displayed in the output. This option specifies that instead, the classes which are excluded from the dependency graph, but which are directly referenced by classes in the dependency graph, should be displayed in the output. These classes form the outside "edges" of the dependency graph.

    For example, you might exclude classes from the Java 2 SDK from the dependency graph because you don't want to include them in your JAR file, but you might be interested in knowing which classes from the Java 2 SDK are referenced directly by the classes in your JAR file. The -edges option can be used to display this information. 

-tell class
    Specifies the fully qualified name of a class for which dependency information is desired. This option causes the tool to display information about every class in the dependency graph that references the specified class. This information is sent to the error stream of the tool, not to the normal output stream. This option can be specified zero or more times. If this option is used, all other output options are ignored, and the normal class output is not produced. This option is useful for debugging.

More to come.

Cheers,

Peter.

> ClassDep.java relies on Sun specific Internal JDK API 
> ------------------------------------------------------
>
>                 Key: RIVER-272
>                 URL: https://issues.apache.org/jira/browse/RIVER-272
>             Project: River
>          Issue Type: Improvement
>          Components: com_sun_jini_tool
>    Affects Versions: jtsk_2.1
>         Environment: Windows XP, JDK 1.4 - JDK 1.6, Eclipse 3.3 IDE
>            Reporter: Hakan Kocakulak
>         Attachments: ClassDep-a4.patch, ClassDep-a5.patch, classdepend.zip, classdepend_backport.tgz, ClassDepReplacement.tgz, ClassDepReplacement_alpha-2.tgz, ClassDepReplacement_alpha-3.tgz, ClassDepReplacement_alpha-4.tgz
>
>
> ClassDep.java relies on Sun specific Internal JDK API 
> import sun.tools.java.BinaryClass;
> > import sun.tools.java.ClassDeclaration; import 
> > sun.tools.java.ClassFile; import sun.tools.java.ClassNotFound; import 
> > sun.tools.java.ClassPath; import sun.tools.java.Constants; import 
> > sun.tools.java.Environment; import sun.tools.java.Identifier; import 
> > sun.tools.java.MemberDefinition; import sun.tools.java.Package; import 
> > sun.tools.java.Type;
> while building from eclipse IDE, IDE do not add these Classes to classpath and can not build project.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (RIVER-272) ClassDep.java relies on Sun specific Internal JDK API

Posted by "Peter Firmstone (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/RIVER-272?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Peter Firmstone resolved RIVER-272.
-----------------------------------

    Resolution: Fixed
      Assignee: Peter Firmstone

Issue Resolved

> ClassDep.java relies on Sun specific Internal JDK API 
> ------------------------------------------------------
>
>                 Key: RIVER-272
>                 URL: https://issues.apache.org/jira/browse/RIVER-272
>             Project: River
>          Issue Type: Improvement
>          Components: com_sun_jini_tool
>    Affects Versions: jtsk_2.1
>         Environment: Windows XP, JDK 1.4 - JDK 1.6, Eclipse 3.3 IDE
>            Reporter: Hakan Kocakulak
>            Assignee: Peter Firmstone
>         Attachments: ClassDep-a4.patch, ClassDep-a5.patch, ClassDep-a6.patch, classdepend.zip, classdepend_backport.tgz, ClassDepReplacement.tgz, ClassDepReplacement_alpha-2.tgz, ClassDepReplacement_alpha-3.tgz, ClassDepReplacement_alpha-4.tgz
>
>
> ClassDep.java relies on Sun specific Internal JDK API 
> import sun.tools.java.BinaryClass;
> > import sun.tools.java.ClassDeclaration; import 
> > sun.tools.java.ClassFile; import sun.tools.java.ClassNotFound; import 
> > sun.tools.java.ClassPath; import sun.tools.java.Constants; import 
> > sun.tools.java.Environment; import sun.tools.java.Identifier; import 
> > sun.tools.java.MemberDefinition; import sun.tools.java.Package; import 
> > sun.tools.java.Type;
> while building from eclipse IDE, IDE do not add these Classes to classpath and can not build project.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (RIVER-272) ClassDep.java relies on Sun specific Internal JDK API

Posted by "Peter Firmstone (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/RIVER-272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12694877#action_12694877 ] 

Peter Firmstone edited comment on RIVER-272 at 4/2/09 12:17 AM:
----------------------------------------------------------------

We need to add the ASM Libraries:

trunk/lib/asm-2.2.3.jar
trunk/lib/asm-commons-2.2.3.jar

And integrate ClassDepend into the main build file

Cheers,

Peter.



      was (Author: pfirmst):
    We need to add the ASM Libraries:

trunk/lib/asm-2.2.3.jar
trunk/lib/asm-commons-2.2.3.jar

I noticed that the lib directory isn't in the build files classpath.

Cheers,

Peter.


  
> ClassDep.java relies on Sun specific Internal JDK API 
> ------------------------------------------------------
>
>                 Key: RIVER-272
>                 URL: https://issues.apache.org/jira/browse/RIVER-272
>             Project: River
>          Issue Type: Improvement
>          Components: com_sun_jini_tool
>    Affects Versions: jtsk_2.1
>         Environment: Windows XP, JDK 1.4 - JDK 1.6, Eclipse 3.3 IDE
>            Reporter: Hakan Kocakulak
>         Attachments: classdepend.zip, classdepend_backport.tgz
>
>
> ClassDep.java relies on Sun specific Internal JDK API 
> import sun.tools.java.BinaryClass;
> > import sun.tools.java.ClassDeclaration; import 
> > sun.tools.java.ClassFile; import sun.tools.java.ClassNotFound; import 
> > sun.tools.java.ClassPath; import sun.tools.java.Constants; import 
> > sun.tools.java.Environment; import sun.tools.java.Identifier; import 
> > sun.tools.java.MemberDefinition; import sun.tools.java.Package; import 
> > sun.tools.java.Type;
> while building from eclipse IDE, IDE do not add these Classes to classpath and can not build project.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (RIVER-272) ClassDep.java relies on Sun specific Internal JDK API

Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/RIVER-272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12698754#action_12698754 ] 

Jukka Zitting commented on RIVER-272:
-------------------------------------

I added the ASM jars to jtsk/trunk/tools in revision 764754. This should make it easier to produce a patch that applies cleanly.


> ClassDep.java relies on Sun specific Internal JDK API 
> ------------------------------------------------------
>
>                 Key: RIVER-272
>                 URL: https://issues.apache.org/jira/browse/RIVER-272
>             Project: River
>          Issue Type: Improvement
>          Components: com_sun_jini_tool
>    Affects Versions: jtsk_2.1
>         Environment: Windows XP, JDK 1.4 - JDK 1.6, Eclipse 3.3 IDE
>            Reporter: Hakan Kocakulak
>         Attachments: classdepend.zip, classdepend_backport.tgz, ClassDepReplacement.tgz, ClassDepReplacement_alpha-2.tgz, ClassDepReplacement_alpha-3.tgz, ClassDepReplacement_alpha-4.tgz
>
>
> ClassDep.java relies on Sun specific Internal JDK API 
> import sun.tools.java.BinaryClass;
> > import sun.tools.java.ClassDeclaration; import 
> > sun.tools.java.ClassFile; import sun.tools.java.ClassNotFound; import 
> > sun.tools.java.ClassPath; import sun.tools.java.Constants; import 
> > sun.tools.java.Environment; import sun.tools.java.Identifier; import 
> > sun.tools.java.MemberDefinition; import sun.tools.java.Package; import 
> > sun.tools.java.Type;
> while building from eclipse IDE, IDE do not add these Classes to classpath and can not build project.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (RIVER-272) ClassDep.java relies on Sun specific Internal JDK API

Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/RIVER-272?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jukka Zitting updated RIVER-272:
--------------------------------

    Attachment: ClassDep-a4.patch

It would be helpful if the proposed changes were attached as a patch file against the latest trunk.

See the attachment (ClassDep-a4.patch) for a patch version of Peter's latest code (ClassDepReplacement_alpha-4.tgz). I've included simple build.xml changes to include the ASM libraries in the build classpaths. Not sure if I covered all the right places.

Peter, what's the current status of the code? Do you think it's already good as a replacement of all previous ClassDep functionality? If not, how should we go about integrating your code to the trunk?




> ClassDep.java relies on Sun specific Internal JDK API 
> ------------------------------------------------------
>
>                 Key: RIVER-272
>                 URL: https://issues.apache.org/jira/browse/RIVER-272
>             Project: River
>          Issue Type: Improvement
>          Components: com_sun_jini_tool
>    Affects Versions: jtsk_2.1
>         Environment: Windows XP, JDK 1.4 - JDK 1.6, Eclipse 3.3 IDE
>            Reporter: Hakan Kocakulak
>         Attachments: ClassDep-a4.patch, classdepend.zip, classdepend_backport.tgz, ClassDepReplacement.tgz, ClassDepReplacement_alpha-2.tgz, ClassDepReplacement_alpha-3.tgz, ClassDepReplacement_alpha-4.tgz
>
>
> ClassDep.java relies on Sun specific Internal JDK API 
> import sun.tools.java.BinaryClass;
> > import sun.tools.java.ClassDeclaration; import 
> > sun.tools.java.ClassFile; import sun.tools.java.ClassNotFound; import 
> > sun.tools.java.ClassPath; import sun.tools.java.Constants; import 
> > sun.tools.java.Environment; import sun.tools.java.Identifier; import 
> > sun.tools.java.MemberDefinition; import sun.tools.java.Package; import 
> > sun.tools.java.Type;
> while building from eclipse IDE, IDE do not add these Classes to classpath and can not build project.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (RIVER-272) ClassDep.java relies on Sun specific Internal JDK API

Posted by "Peter Firmstone (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/RIVER-272?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Peter Firmstone updated RIVER-272:
----------------------------------

    Attachment: ClassDepReplacement.tgz

Partially working implementation, to show progress.  Lots of functionality added, however not complete yet.

Here it is checking its own dependencies, followed by the old tool doing the same job:

 /usr/jdk/j2sdk1.4.2_12/jre/bin/java -jar ../ClassDepReplacement/dist/ClassDepReplacement.jar -cp ./build/classes:/usr/local/java/lib/asm-2.2.3.jar:/usr/local/java/lib/asm-commons-2.2.3.jar ./build/classes/com/sun/jini/tool/ -in com.sun.jini.tool -in com.sun.jini.tool -in org.objectweb.asm -out org.objectweb.asm.signature
com.sun.jini.tool.ClassDep
com.sun.jini.tool.ClassDep$1
com.sun.jini.tool.ClassDep$Compare
com.sun.jini.tool.classdepend.AbstractDependencyVisitor
com.sun.jini.tool.classdepend.AbstractVisitor
com.sun.jini.tool.classdepend.ClassDepend
com.sun.jini.tool.classdepend.ClassDepend$1
com.sun.jini.tool.classdepend.ClassDependParameters
com.sun.jini.tool.classdepend.ClassDependParameters$1
com.sun.jini.tool.classdepend.ClassDependParameters$CDPBuilder
com.sun.jini.tool.classdepend.ClasspathPackages
com.sun.jini.tool.classdepend.ClasspathPackages$1
com.sun.jini.tool.classdepend.PackageClasses
com.sun.jini.tool.classdepend.PackageClasses$1
com.sun.jini.tool.classdepend.ReferencedClasses
com.sun.jini.tool.classdepend.ReferencedClasses$1
org.objectweb.asm.AnnotationVisitor
org.objectweb.asm.AnnotationWriter
org.objectweb.asm.Attribute
org.objectweb.asm.ByteVector
org.objectweb.asm.ClassReader
org.objectweb.asm.ClassVisitor
org.objectweb.asm.ClassWriter
org.objectweb.asm.Edge
org.objectweb.asm.FieldVisitor
org.objectweb.asm.FieldWriter
org.objectweb.asm.Handler
org.objectweb.asm.Item
org.objectweb.asm.Label
org.objectweb.asm.MethodVisitor
org.objectweb.asm.MethodWriter
org.objectweb.asm.Type
org.objectweb.asm.commons.EmptyVisitor

 /usr/jdk/j2sdk1.4.2_12/jre/bin/java -jar ../NewTools/dist/RiverToolsReplacement.jar -cp ./build/classes:/usr/local/java/lib/asm-2.2.3.jar:/usr/local/java/lib/asm-commons-2.2.3.jar ./build/classes/com/sun/jini/tool/ -in com.sun.jini.tool -in com.sun.jini.tool -in org.objectweb.asm -out org.objectweb.asm.signature
com.sun.jini.tool.ClassDep
com.sun.jini.tool.ClassDep$1
com.sun.jini.tool.ClassDep$Compare
com.sun.jini.tool.classdepend.AbstractDependencyVisitor
com.sun.jini.tool.classdepend.AbstractVisitor
com.sun.jini.tool.classdepend.ClassDepend
com.sun.jini.tool.classdepend.ClassDepend$1
com.sun.jini.tool.classdepend.ClassDependParameters
com.sun.jini.tool.classdepend.ClassDependParameters$1
com.sun.jini.tool.classdepend.ClassDependParameters$CDPBuilder
com.sun.jini.tool.classdepend.ClasspathPackages
com.sun.jini.tool.classdepend.ClasspathPackages$1
com.sun.jini.tool.classdepend.PackageClasses
com.sun.jini.tool.classdepend.PackageClasses$1
com.sun.jini.tool.classdepend.ReferencedClasses
com.sun.jini.tool.classdepend.ReferencedClasses$1
org.objectweb.asm.AnnotationVisitor
org.objectweb.asm.AnnotationWriter
org.objectweb.asm.Attribute
org.objectweb.asm.ByteVector
org.objectweb.asm.ClassReader
org.objectweb.asm.ClassVisitor
org.objectweb.asm.ClassWriter
org.objectweb.asm.Edge
org.objectweb.asm.FieldVisitor
org.objectweb.asm.FieldWriter
org.objectweb.asm.Handler
org.objectweb.asm.Item
org.objectweb.asm.Label
org.objectweb.asm.MethodVisitor
org.objectweb.asm.MethodWriter
org.objectweb.asm.Type
org.objectweb.asm.commons.EmptyVisitor


> ClassDep.java relies on Sun specific Internal JDK API 
> ------------------------------------------------------
>
>                 Key: RIVER-272
>                 URL: https://issues.apache.org/jira/browse/RIVER-272
>             Project: River
>          Issue Type: Improvement
>          Components: com_sun_jini_tool
>    Affects Versions: jtsk_2.1
>         Environment: Windows XP, JDK 1.4 - JDK 1.6, Eclipse 3.3 IDE
>            Reporter: Hakan Kocakulak
>         Attachments: classdepend.zip, classdepend_backport.tgz, ClassDepReplacement.tgz
>
>
> ClassDep.java relies on Sun specific Internal JDK API 
> import sun.tools.java.BinaryClass;
> > import sun.tools.java.ClassDeclaration; import 
> > sun.tools.java.ClassFile; import sun.tools.java.ClassNotFound; import 
> > sun.tools.java.ClassPath; import sun.tools.java.Constants; import 
> > sun.tools.java.Environment; import sun.tools.java.Identifier; import 
> > sun.tools.java.MemberDefinition; import sun.tools.java.Package; import 
> > sun.tools.java.Type;
> while building from eclipse IDE, IDE do not add these Classes to classpath and can not build project.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (RIVER-272) ClassDep.java relies on Sun specific Internal JDK API

Posted by "Jonathan Costers (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/RIVER-272?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Costers updated RIVER-272:
-----------------------------------

    Attachment: RIVER-tools.patch

I have created a patch (RIVER-tools.patch) that moves the ASM libraries inside the River lib directory:
- asm-3.2.jar and asm-commons-3.2.jar are now located in the lib directory
- removed the tools directory
- changes were made to tools.jar MANIFEST accordingly
- PMOs were updated to include the ASM dependency

I believe it makes more sense this way when deploying River somewhere. 
tools.jar now expects the ASM JARs in the same directory as where itself is located.

If everybody is OK with this, I would like to apply the patch to trunk.

Thanks and best regards
Jonathan

> ClassDep.java relies on Sun specific Internal JDK API 
> ------------------------------------------------------
>
>                 Key: RIVER-272
>                 URL: https://issues.apache.org/jira/browse/RIVER-272
>             Project: River
>          Issue Type: Improvement
>          Components: com_sun_jini_tool
>    Affects Versions: jtsk_2.1
>         Environment: Windows XP, JDK 1.4 - JDK 1.6, Eclipse 3.3 IDE
>            Reporter: Hakan Kocakulak
>            Assignee: Peter Firmstone
>         Attachments: ClassDep-a4.patch, ClassDep-a5.patch, ClassDep-a6.patch, classdepend.zip, classdepend_backport.tgz, ClassDepReplacement.tgz, ClassDepReplacement_alpha-2.tgz, ClassDepReplacement_alpha-3.tgz, ClassDepReplacement_alpha-4.tgz, RIVER-tools.patch
>
>
> ClassDep.java relies on Sun specific Internal JDK API 
> import sun.tools.java.BinaryClass;
> > import sun.tools.java.ClassDeclaration; import 
> > sun.tools.java.ClassFile; import sun.tools.java.ClassNotFound; import 
> > sun.tools.java.ClassPath; import sun.tools.java.Constants; import 
> > sun.tools.java.Environment; import sun.tools.java.Identifier; import 
> > sun.tools.java.MemberDefinition; import sun.tools.java.Package; import 
> > sun.tools.java.Type;
> while building from eclipse IDE, IDE do not add these Classes to classpath and can not build project.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (RIVER-272) ClassDep.java relies on Sun specific Internal JDK API

Posted by "Peter Firmstone (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/RIVER-272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12693522#action_12693522 ] 

Peter Firmstone commented on RIVER-272:
---------------------------------------

TODO: Add jarjar at build time to include the ASM library into the build, but in a separate namespace to avoid conflicts with client code.

> ClassDep.java relies on Sun specific Internal JDK API 
> ------------------------------------------------------
>
>                 Key: RIVER-272
>                 URL: https://issues.apache.org/jira/browse/RIVER-272
>             Project: River
>          Issue Type: Improvement
>          Components: com_sun_jini_tool
>    Affects Versions: jtsk_2.1
>         Environment: Windows XP, JDK 1.4 - JDK 1.6, Eclipse 3.3 IDE
>            Reporter: Hakan Kocakulak
>         Attachments: classdepend.zip, classdepend_backport.tgz
>
>
> ClassDep.java relies on Sun specific Internal JDK API 
> import sun.tools.java.BinaryClass;
> > import sun.tools.java.ClassDeclaration; import 
> > sun.tools.java.ClassFile; import sun.tools.java.ClassNotFound; import 
> > sun.tools.java.ClassPath; import sun.tools.java.Constants; import 
> > sun.tools.java.Environment; import sun.tools.java.Identifier; import 
> > sun.tools.java.MemberDefinition; import sun.tools.java.Package; import 
> > sun.tools.java.Type;
> while building from eclipse IDE, IDE do not add these Classes to classpath and can not build project.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (RIVER-272) ClassDep.java relies on Sun specific Internal JDK API

Posted by "Jonathan Costers (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/RIVER-272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12701489#action_12701489 ] 

Jonathan Costers commented on RIVER-272:
----------------------------------------

The -jar option of the java command can not be combined with the -cp option (in fact, -cp is simply ignored). And as the ASM JARs are not in the tools.jar manifest Class-Path, they are indeed not found. You would be able to call ClassDep directly without the -jar option though.
Solution would be to add the ASM JARs to the Class-Path in the tools.jar manifest.

Personally, I don't always like that mechanism at all. It forces you to keep your dependent JARs at fixed locations, relative to the depending JAR. River makes use of it a lot though, almost all distribution JAR files have a Class-Path in their manifest. But I suppose there is no real alternative, aside from not using the -jar option at all :-)

About the ClassDepLoader class, I would need to take a deeper look to see if we can get rid of it, but your explanation certainly makes sense.

Best
Jonathan

> ClassDep.java relies on Sun specific Internal JDK API 
> ------------------------------------------------------
>
>                 Key: RIVER-272
>                 URL: https://issues.apache.org/jira/browse/RIVER-272
>             Project: River
>          Issue Type: Improvement
>          Components: com_sun_jini_tool
>    Affects Versions: jtsk_2.1
>         Environment: Windows XP, JDK 1.4 - JDK 1.6, Eclipse 3.3 IDE
>            Reporter: Hakan Kocakulak
>         Attachments: ClassDep-a4.patch, ClassDep-a5.patch, ClassDep-a6.patch, classdepend.zip, classdepend_backport.tgz, ClassDepReplacement.tgz, ClassDepReplacement_alpha-2.tgz, ClassDepReplacement_alpha-3.tgz, ClassDepReplacement_alpha-4.tgz
>
>
> ClassDep.java relies on Sun specific Internal JDK API 
> import sun.tools.java.BinaryClass;
> > import sun.tools.java.ClassDeclaration; import 
> > sun.tools.java.ClassFile; import sun.tools.java.ClassNotFound; import 
> > sun.tools.java.ClassPath; import sun.tools.java.Constants; import 
> > sun.tools.java.Environment; import sun.tools.java.Identifier; import 
> > sun.tools.java.MemberDefinition; import sun.tools.java.Package; import 
> > sun.tools.java.Type;
> while building from eclipse IDE, IDE do not add these Classes to classpath and can not build project.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (RIVER-272) ClassDep.java relies on Sun specific Internal JDK API

Posted by "Jonathan Costers (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/RIVER-272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12693546#action_12693546 ] 

Jonathan Costers edited comment on RIVER-272 at 3/29/09 5:03 AM:
-----------------------------------------------------------------

Thanks for the code! I'm testing it right now.
If all seems to work, I'll provide a patch for build.xml and integrationtest.xml too.

Best
Jonathan

      was (Author: jcosters):
    Thanks for the code! I'm testing it right now.
I added the code to the main River src tree as is.
If all seems to work, I'll provide a patch for build.xml and integrationtest.xml too.

Best
Jonathan
  
> ClassDep.java relies on Sun specific Internal JDK API 
> ------------------------------------------------------
>
>                 Key: RIVER-272
>                 URL: https://issues.apache.org/jira/browse/RIVER-272
>             Project: River
>          Issue Type: Improvement
>          Components: com_sun_jini_tool
>    Affects Versions: jtsk_2.1
>         Environment: Windows XP, JDK 1.4 - JDK 1.6, Eclipse 3.3 IDE
>            Reporter: Hakan Kocakulak
>         Attachments: classdepend.zip, classdepend_backport.tgz
>
>
> ClassDep.java relies on Sun specific Internal JDK API 
> import sun.tools.java.BinaryClass;
> > import sun.tools.java.ClassDeclaration; import 
> > sun.tools.java.ClassFile; import sun.tools.java.ClassNotFound; import 
> > sun.tools.java.ClassPath; import sun.tools.java.Constants; import 
> > sun.tools.java.Environment; import sun.tools.java.Identifier; import 
> > sun.tools.java.MemberDefinition; import sun.tools.java.Package; import 
> > sun.tools.java.Type;
> while building from eclipse IDE, IDE do not add these Classes to classpath and can not build project.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (RIVER-272) ClassDep.java relies on Sun specific Internal JDK API

Posted by "Peter Firmstone (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/RIVER-272?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Peter Firmstone updated RIVER-272:
----------------------------------

    Attachment: ClassDep-a6.patch

Note that by default the new behaviour is to include the outer class.

The following options remain to be implemented:

-outer
By default, if a static nested class is included in the dependency graph, all references from that static nested class to its immediate lexically enclosing class are ignored (except when the static nested class extends its outer class), to avoid inadvertent inclusion of the enclosing class. (The default is chosen this way because the compiled class file of a static nested class always contains a reference to the immediate lexically enclosing class.) This option causes all such references to be considered rather than ignored. Note that this option is needed very infrequently.



> ClassDep.java relies on Sun specific Internal JDK API 
> ------------------------------------------------------
>
>                 Key: RIVER-272
>                 URL: https://issues.apache.org/jira/browse/RIVER-272
>             Project: River
>          Issue Type: Improvement
>          Components: com_sun_jini_tool
>    Affects Versions: jtsk_2.1
>         Environment: Windows XP, JDK 1.4 - JDK 1.6, Eclipse 3.3 IDE
>            Reporter: Hakan Kocakulak
>         Attachments: ClassDep-a4.patch, ClassDep-a5.patch, ClassDep-a6.patch, classdepend.zip, classdepend_backport.tgz, ClassDepReplacement.tgz, ClassDepReplacement_alpha-2.tgz, ClassDepReplacement_alpha-3.tgz, ClassDepReplacement_alpha-4.tgz
>
>
> ClassDep.java relies on Sun specific Internal JDK API 
> import sun.tools.java.BinaryClass;
> > import sun.tools.java.ClassDeclaration; import 
> > sun.tools.java.ClassFile; import sun.tools.java.ClassNotFound; import 
> > sun.tools.java.ClassPath; import sun.tools.java.Constants; import 
> > sun.tools.java.Environment; import sun.tools.java.Identifier; import 
> > sun.tools.java.MemberDefinition; import sun.tools.java.Package; import 
> > sun.tools.java.Type;
> while building from eclipse IDE, IDE do not add these Classes to classpath and can not build project.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Re: [jira] Commented: (RIVER-272) ClassDep.java relies on Sun specific Internal JDK API

Posted by Peter Firmstone <ji...@zeus.net.au>.
Hey Thanks Jonathan,

I'm looking forward to your follow up patch for River-301 too, your 
doing well with those build scripts, it's been a massive effort on your 
part.

I'll submit another patch shortly.

Cheers,

Peter.

Jonathan Costers (JIRA) wrote:
>     [ https://issues.apache.org/jira/browse/RIVER-272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12699698#action_12699698 ] 
>
> Jonathan Costers commented on RIVER-272:
> ----------------------------------------
>
> I've applied your patch (ClassDep-a5.patch) and made some additional changes to the build files to include the ASM JARs on the classpath when compiling and when running ClassDep.
> All seems to work up until now, I've built the complete River distribution (including QA tests) with it (i.e. the ClassDep calls to build some of the River JARs seem to work).
> This also gave me the opportunity to remove the JDK tools.jar dependency from the build and further simplify the build process by eliminating the need for JAVA_HOME to be set.
>
> Great work! 
>
> I will include your code in a follow up patch for RIVER-301 too.
>
> Best
> Jonathan
>
>   
>> ClassDep.java relies on Sun specific Internal JDK API 
>> ------------------------------------------------------
>>
>>                 Key: RIVER-272
>>                 URL: https://issues.apache.org/jira/browse/RIVER-272
>>             Project: River
>>          Issue Type: Improvement
>>          Components: com_sun_jini_tool
>>    Affects Versions: jtsk_2.1
>>         Environment: Windows XP, JDK 1.4 - JDK 1.6, Eclipse 3.3 IDE
>>            Reporter: Hakan Kocakulak
>>         Attachments: ClassDep-a4.patch, ClassDep-a5.patch, classdepend.zip, classdepend_backport.tgz, ClassDepReplacement.tgz, ClassDepReplacement_alpha-2.tgz, ClassDepReplacement_alpha-3.tgz, ClassDepReplacement_alpha-4.tgz
>>
>>
>> ClassDep.java relies on Sun specific Internal JDK API 
>> import sun.tools.java.BinaryClass;
>>     
>>> import sun.tools.java.ClassDeclaration; import 
>>> sun.tools.java.ClassFile; import sun.tools.java.ClassNotFound; import 
>>> sun.tools.java.ClassPath; import sun.tools.java.Constants; import 
>>> sun.tools.java.Environment; import sun.tools.java.Identifier; import 
>>> sun.tools.java.MemberDefinition; import sun.tools.java.Package; import 
>>> sun.tools.java.Type;
>>>       
>> while building from eclipse IDE, IDE do not add these Classes to classpath and can not build project.
>>     
>
>   


[jira] Commented: (RIVER-272) ClassDep.java relies on Sun specific Internal JDK API

Posted by "Jonathan Costers (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/RIVER-272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12699698#action_12699698 ] 

Jonathan Costers commented on RIVER-272:
----------------------------------------

I've applied your patch (ClassDep-a5.patch) and made some additional changes to the build files to include the ASM JARs on the classpath when compiling and when running ClassDep.
All seems to work up until now, I've built the complete River distribution (including QA tests) with it (i.e. the ClassDep calls to build some of the River JARs seem to work).
This also gave me the opportunity to remove the JDK tools.jar dependency from the build and further simplify the build process by eliminating the need for JAVA_HOME to be set.

Great work! 

I will include your code in a follow up patch for RIVER-301 too.

Best
Jonathan

> ClassDep.java relies on Sun specific Internal JDK API 
> ------------------------------------------------------
>
>                 Key: RIVER-272
>                 URL: https://issues.apache.org/jira/browse/RIVER-272
>             Project: River
>          Issue Type: Improvement
>          Components: com_sun_jini_tool
>    Affects Versions: jtsk_2.1
>         Environment: Windows XP, JDK 1.4 - JDK 1.6, Eclipse 3.3 IDE
>            Reporter: Hakan Kocakulak
>         Attachments: ClassDep-a4.patch, ClassDep-a5.patch, classdepend.zip, classdepend_backport.tgz, ClassDepReplacement.tgz, ClassDepReplacement_alpha-2.tgz, ClassDepReplacement_alpha-3.tgz, ClassDepReplacement_alpha-4.tgz
>
>
> ClassDep.java relies on Sun specific Internal JDK API 
> import sun.tools.java.BinaryClass;
> > import sun.tools.java.ClassDeclaration; import 
> > sun.tools.java.ClassFile; import sun.tools.java.ClassNotFound; import 
> > sun.tools.java.ClassPath; import sun.tools.java.Constants; import 
> > sun.tools.java.Environment; import sun.tools.java.Identifier; import 
> > sun.tools.java.MemberDefinition; import sun.tools.java.Package; import 
> > sun.tools.java.Type;
> while building from eclipse IDE, IDE do not add these Classes to classpath and can not build project.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (RIVER-272) ClassDep.java relies on Sun specific Internal JDK API

Posted by "Jonathan Costers (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/RIVER-272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12693546#action_12693546 ] 

Jonathan Costers edited comment on RIVER-272 at 3/29/09 5:02 AM:
-----------------------------------------------------------------

Thanks for the code! I'm testing it right now.
I added the code to the main River src tree as is.
If all seems to work, I'll provide a patch for build.xml and integrationtest.xml too.

Best
Jonathan

      was (Author: jcosters):
    Thanks for the patch! I'm testing it right now.
I added the code to the main River src tree as is.
If all seems to work, I'll provide a patch for build.xml and integrationtest.xml too.

Best
Jonathan
  
> ClassDep.java relies on Sun specific Internal JDK API 
> ------------------------------------------------------
>
>                 Key: RIVER-272
>                 URL: https://issues.apache.org/jira/browse/RIVER-272
>             Project: River
>          Issue Type: Improvement
>          Components: com_sun_jini_tool
>    Affects Versions: jtsk_2.1
>         Environment: Windows XP, JDK 1.4 - JDK 1.6, Eclipse 3.3 IDE
>            Reporter: Hakan Kocakulak
>         Attachments: classdepend.zip, classdepend_backport.tgz
>
>
> ClassDep.java relies on Sun specific Internal JDK API 
> import sun.tools.java.BinaryClass;
> > import sun.tools.java.ClassDeclaration; import 
> > sun.tools.java.ClassFile; import sun.tools.java.ClassNotFound; import 
> > sun.tools.java.ClassPath; import sun.tools.java.Constants; import 
> > sun.tools.java.Environment; import sun.tools.java.Identifier; import 
> > sun.tools.java.MemberDefinition; import sun.tools.java.Package; import 
> > sun.tools.java.Type;
> while building from eclipse IDE, IDE do not add these Classes to classpath and can not build project.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (RIVER-272) ClassDep.java relies on Sun specific Internal JDK API

Posted by "Peter Firmstone (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/RIVER-272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12701395#action_12701395 ] 

Peter Firmstone commented on RIVER-272:
---------------------------------------

Thanks Jonathan for merging the latest patch,

We've got some loose ends to tidy up, the ASM libraries aren't picked up when using classdep.jar from the command line.

ClassDepLoader.java is where ClassDep is being called from, it's still looking for the sun tools.jar library

It appears that ClassDepLoader is only used from the command line to find the sun tools.jar library and add it to the URL loader classpath before calling the ClassDep reflectively.

I have been calling ClassDep's main method directly during my testing.

I don't think we need ClassDepLoader anymore and we need to link in the ASM libs into the dependencies.

What do you think?

Cheers,

Peter.

Also line 2087 in build.xml refers to a class that no longer exists, I deleted it.

<target name="tools.jar" depends="river.jars">
        <property name="tools.deps" location="${build.deps.dir}/tools.deps" />

            <arg value="com.sun.jini.tool.ClassDep$$Env"/>
            <arg value="com.sun.jini.tool.ClassDepLoader"/>


bash-3.00$ /usr/jdk/j2sdk1.4.2_12/jre/bin/java -jar ./lib/classdep.jar -cp tools/asm-3.1.jar:tools/asm-commons-3.1.jar:../../TimeAndMoney/build/timeandmoney-v0_5_1.jar -in com.domainlanguage -edges com.domainlanguage.money.Money
failure loading ClassDep
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at com.sun.jini.tool.ClassDepLoader.main(ClassDepLoader.java:87)
Caused by: java.lang.NoClassDefFoundError: org/objectweb/asm/ClassVisitor
        at com.sun.jini.tool.classdepend.ClassDepend.getDependencyRelationshipMap(ClassDepend.java:251)
        at com.sun.jini.tool.ClassDep.compute(ClassDep.java:885)
        at com.sun.jini.tool.ClassDep.main(ClassDep.java:1329)
        ... 5 more


ClassDepLoader.java source code:

/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership. The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License. You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.sun.jini.tool;

import java.io.File;
import java.lang.reflect.Method;
import java.net.URL;
import java.net.URLClassLoader;
import java.text.MessageFormat;

import java.util.MissingResourceException;
import java.util.ResourceBundle;
import java.util.StringTokenizer;

/**
 * Class to provide the <code>main</code> method referenced by the
 * <code>Main-Class</code> entry in the manifest of the <code>classdep</code>
 * JAR file. <code>ClassDep</code> relies on <code>sun.tools</code>
 * classes which may not be available in the boot or extension classloader;
 * this class provides support for finding the JDK <code>tools.jar</code> file
 * at runtime and running <code>ClassDep</code> from a classloader which
 * includes that file.
 */
class ClassDepLoader {

    /**
     * Entry point for an executable JAR file for <code>ClassDep</code>.  Search
     * for <code>tools.jar</code> in <code>$java.home/../lib/</code>. If the
     * file is found, construct a classloader using <code>URL</code>s generated
     * from the union of the value of <code>java.class.path</code> and the path
     * to the <code>tools.jar</code> file with the extension classloader as
     * parent. Then reflectively call the <code>main</code> method of the
     * <code>ClassDep</code> class obtained from that loader.
     * <p>
     * If no <code>tool.jar</code> file is found, <code>ClassDep.main</code>
     * is called directly.
     *
     * @param args the command line arguments
     */
    public static void main(String[] args) {
    File javaHome = new File(System.getProperty("java.home"));
    String jarPath = "lib" + File.separator + "tools.jar";
    File toolsJar = new File(javaHome.getParent(), jarPath);
    if (!toolsJar.exists()) {
        try {
        Class.forName("sun.tools.java.Constants");
        } catch (ClassNotFoundException e) {
        print("classdep.notools", toolsJar.toString());
        return;
        }
        ClassDep.main(args);
    } else {
        try {
        String classpath = System.getProperty("java.class.path");
        classpath += File.pathSeparator + toolsJar;
        StringTokenizer st = new StringTokenizer(classpath,
                             File.pathSeparator);
        URL[] urls = new URL[st.countTokens()];
        for (int i=0; st.hasMoreTokens(); i++) {
            urls[i] = new File(st.nextToken()).toURI().toURL();
        }
                ClassLoader cl = ClassLoader.getSystemClassLoader();
        if (cl != null) {
            cl = cl.getParent();
        }
        ClassLoader loader = new URLClassLoader(urls, cl);
        Class classdepClass =
            Class.forName("com.sun.jini.tool.ClassDep", true, loader);
        Method mainMethod =
            classdepClass.getMethod("main",
                        new Class[] {String[].class});
        mainMethod.invoke(null, new Object[]{args});
        } catch (Throwable e) {
        print("classdep.loadfailed", null);
        e.printStackTrace();
        }
    }
    }
    
    /** print a localized message */
    private static void print(String key, String v1) {
    Object[] vals = (v1 == null) ? null : new Object[]{v1};
    try {
        String name = "com.sun.jini.tool.resources.classdep";
        ResourceBundle resources = ResourceBundle.getBundle(name);
        String fmt = resources.getString(key);
        System.err.println(MessageFormat.format(fmt, vals));
    } catch (MissingResourceException e) {
        e.printStackTrace();
    }
    }
}


> ClassDep.java relies on Sun specific Internal JDK API 
> ------------------------------------------------------
>
>                 Key: RIVER-272
>                 URL: https://issues.apache.org/jira/browse/RIVER-272
>             Project: River
>          Issue Type: Improvement
>          Components: com_sun_jini_tool
>    Affects Versions: jtsk_2.1
>         Environment: Windows XP, JDK 1.4 - JDK 1.6, Eclipse 3.3 IDE
>            Reporter: Hakan Kocakulak
>         Attachments: ClassDep-a4.patch, ClassDep-a5.patch, ClassDep-a6.patch, classdepend.zip, classdepend_backport.tgz, ClassDepReplacement.tgz, ClassDepReplacement_alpha-2.tgz, ClassDepReplacement_alpha-3.tgz, ClassDepReplacement_alpha-4.tgz
>
>
> ClassDep.java relies on Sun specific Internal JDK API 
> import sun.tools.java.BinaryClass;
> > import sun.tools.java.ClassDeclaration; import 
> > sun.tools.java.ClassFile; import sun.tools.java.ClassNotFound; import 
> > sun.tools.java.ClassPath; import sun.tools.java.Constants; import 
> > sun.tools.java.Environment; import sun.tools.java.Identifier; import 
> > sun.tools.java.MemberDefinition; import sun.tools.java.Package; import 
> > sun.tools.java.Type;
> while building from eclipse IDE, IDE do not add these Classes to classpath and can not build project.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (RIVER-272) ClassDep.java relies on Sun specific Internal JDK API

Posted by "Tim Blackman (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/RIVER-272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12689094#action_12689094 ] 

Tim Blackman edited comment on RIVER-272 at 3/25/09 5:32 AM:
-------------------------------------------------------------

The classdepend.zip file attachment contains a rough cut at a replacement for ClassDep that I wrote a few years ago using ASM.

Note that at least one of the files in the attachment is part of ASM, so it already has its own license.  The other files are of my devising and should be licensed under the Apache license.

      was (Author: tjb):
    This is a rough cut at a replacement for ClassDep that I wrote a few years ago using ASM.

Note that at least one of the files in the attachment is part of ASM, so it already has its own license.  The other files are of my devising and should be licensed under the Apache license.
  
> ClassDep.java relies on Sun specific Internal JDK API 
> ------------------------------------------------------
>
>                 Key: RIVER-272
>                 URL: https://issues.apache.org/jira/browse/RIVER-272
>             Project: River
>          Issue Type: Improvement
>          Components: com_sun_jini_tool
>    Affects Versions: jtsk_2.1
>         Environment: Windows XP, JDK 1.4 - JDK 1.6, Eclipse 3.3 IDE
>            Reporter: Hakan Kocakulak
>         Attachments: classdepend.zip
>
>
> ClassDep.java relies on Sun specific Internal JDK API 
> import sun.tools.java.BinaryClass;
> > import sun.tools.java.ClassDeclaration; import 
> > sun.tools.java.ClassFile; import sun.tools.java.ClassNotFound; import 
> > sun.tools.java.ClassPath; import sun.tools.java.Constants; import 
> > sun.tools.java.Environment; import sun.tools.java.Identifier; import 
> > sun.tools.java.MemberDefinition; import sun.tools.java.Package; import 
> > sun.tools.java.Type;
> while building from eclipse IDE, IDE do not add these Classes to classpath and can not build project.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (RIVER-272) ClassDep.java relies on Sun specific Internal JDK API

Posted by "Peter Firmstone (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/RIVER-272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12699110#action_12699110 ] 

Peter Firmstone commented on RIVER-272:
---------------------------------------

Most command line options are implemented with the exception of the -newdirbehaviour options, -tell and -edges.

Once I get the command line sorted, I'll go over the ClassDep API.

At this stage, we can add the com.sun.jini.tool.classdepend package, there are no conflicts. Can we move the old com.sun.jini.tools.ClassDep out of the way (rename to ClassDepOld) so we can run the test suite on the new ClassDep?  That would assist with replicating the API.

Cheers,

Peter.






> ClassDep.java relies on Sun specific Internal JDK API 
> ------------------------------------------------------
>
>                 Key: RIVER-272
>                 URL: https://issues.apache.org/jira/browse/RIVER-272
>             Project: River
>          Issue Type: Improvement
>          Components: com_sun_jini_tool
>    Affects Versions: jtsk_2.1
>         Environment: Windows XP, JDK 1.4 - JDK 1.6, Eclipse 3.3 IDE
>            Reporter: Hakan Kocakulak
>         Attachments: ClassDep-a4.patch, classdepend.zip, classdepend_backport.tgz, ClassDepReplacement.tgz, ClassDepReplacement_alpha-2.tgz, ClassDepReplacement_alpha-3.tgz, ClassDepReplacement_alpha-4.tgz
>
>
> ClassDep.java relies on Sun specific Internal JDK API 
> import sun.tools.java.BinaryClass;
> > import sun.tools.java.ClassDeclaration; import 
> > sun.tools.java.ClassFile; import sun.tools.java.ClassNotFound; import 
> > sun.tools.java.ClassPath; import sun.tools.java.Constants; import 
> > sun.tools.java.Environment; import sun.tools.java.Identifier; import 
> > sun.tools.java.MemberDefinition; import sun.tools.java.Package; import 
> > sun.tools.java.Type;
> while building from eclipse IDE, IDE do not add these Classes to classpath and can not build project.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (RIVER-272) ClassDep.java relies on Sun specific Internal JDK API

Posted by "Mark Brouwer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/RIVER-272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12571949#action_12571949 ] 

Mark Brouwer commented on RIVER-272:
------------------------------------

It is indeed unfortunate that {{ClassDep}} relies on Sun specific JVM classes, which might be removed in the future. It is possible to solve this problem by using a byte code analysis library such as [ASM|http://asm.objectweb.org/], some experimentation indicates that by relying on a 42 KBytes JAR file (licensed under a BSD type license) {{ClassDep}} can be made JVM implementation independent while solving some other outstanding issues as well.

> ClassDep.java relies on Sun specific Internal JDK API 
> ------------------------------------------------------
>
>                 Key: RIVER-272
>                 URL: https://issues.apache.org/jira/browse/RIVER-272
>             Project: River
>          Issue Type: Improvement
>          Components: com_sun_jini_tool
>    Affects Versions: jtsk_2.1
>         Environment: Windows XP, JDK 1.4 - JDK 1.6, Eclipse 3.3 IDE
>            Reporter: Hakan Kocakulak
>
> ClassDep.java relies on Sun specific Internal JDK API 
> import sun.tools.java.BinaryClass;
> > import sun.tools.java.ClassDeclaration; import 
> > sun.tools.java.ClassFile; import sun.tools.java.ClassNotFound; import 
> > sun.tools.java.ClassPath; import sun.tools.java.Constants; import 
> > sun.tools.java.Environment; import sun.tools.java.Identifier; import 
> > sun.tools.java.MemberDefinition; import sun.tools.java.Package; import 
> > sun.tools.java.Type;
> while building from eclipse IDE, IDE do not add these Classes to classpath and can not build project.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (RIVER-272) ClassDep.java relies on Sun specific Internal JDK API

Posted by "Peter Firmstone (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/RIVER-272?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Peter Firmstone updated RIVER-272:
----------------------------------

    Attachment: ClassDepReplacement_alpha-4.tgz

Additions:

Now upgraded to ASM-3.1, requires asm-3.1.jar and asm-commons-3.1.jar

Working on an object data structure to capture more information on dependency relationships. Added ClassDependencyTreeNodes.java  Useful for the -edges option in ClassDep, and probably other uses in future.

Please feel free to look and comment.

> ClassDep.java relies on Sun specific Internal JDK API 
> ------------------------------------------------------
>
>                 Key: RIVER-272
>                 URL: https://issues.apache.org/jira/browse/RIVER-272
>             Project: River
>          Issue Type: Improvement
>          Components: com_sun_jini_tool
>    Affects Versions: jtsk_2.1
>         Environment: Windows XP, JDK 1.4 - JDK 1.6, Eclipse 3.3 IDE
>            Reporter: Hakan Kocakulak
>         Attachments: classdepend.zip, classdepend_backport.tgz, ClassDepReplacement.tgz, ClassDepReplacement_alpha-2.tgz, ClassDepReplacement_alpha-3.tgz, ClassDepReplacement_alpha-4.tgz
>
>
> ClassDep.java relies on Sun specific Internal JDK API 
> import sun.tools.java.BinaryClass;
> > import sun.tools.java.ClassDeclaration; import 
> > sun.tools.java.ClassFile; import sun.tools.java.ClassNotFound; import 
> > sun.tools.java.ClassPath; import sun.tools.java.Constants; import 
> > sun.tools.java.Environment; import sun.tools.java.Identifier; import 
> > sun.tools.java.MemberDefinition; import sun.tools.java.Package; import 
> > sun.tools.java.Type;
> while building from eclipse IDE, IDE do not add these Classes to classpath and can not build project.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (RIVER-272) ClassDep.java relies on Sun specific Internal JDK API

Posted by "Tim Blackman (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/RIVER-272?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tim Blackman updated RIVER-272:
-------------------------------

    Attachment: classdepend.zip

This is a rough cut at a replacement for ClassDep that I wrote a few years ago using ASM.

Note that at least one of the files in the attachment is part of ASM, so it already has its own license.  The other files are of my devising and should be licensed under the Apache license.

> ClassDep.java relies on Sun specific Internal JDK API 
> ------------------------------------------------------
>
>                 Key: RIVER-272
>                 URL: https://issues.apache.org/jira/browse/RIVER-272
>             Project: River
>          Issue Type: Improvement
>          Components: com_sun_jini_tool
>    Affects Versions: jtsk_2.1
>         Environment: Windows XP, JDK 1.4 - JDK 1.6, Eclipse 3.3 IDE
>            Reporter: Hakan Kocakulak
>         Attachments: classdepend.zip
>
>
> ClassDep.java relies on Sun specific Internal JDK API 
> import sun.tools.java.BinaryClass;
> > import sun.tools.java.ClassDeclaration; import 
> > sun.tools.java.ClassFile; import sun.tools.java.ClassNotFound; import 
> > sun.tools.java.ClassPath; import sun.tools.java.Constants; import 
> > sun.tools.java.Environment; import sun.tools.java.Identifier; import 
> > sun.tools.java.MemberDefinition; import sun.tools.java.Package; import 
> > sun.tools.java.Type;
> while building from eclipse IDE, IDE do not add these Classes to classpath and can not build project.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (RIVER-272) ClassDep.java relies on Sun specific Internal JDK API

Posted by "Tom Hobbs (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/RIVER-272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12637852#action_12637852 ] 

Tom Hobbs commented on RIVER-272:
---------------------------------

I've managed to get round this (in Eclipse 3.3.2 / Windows XP) without ASM simply by adding the jdk/lib/tools.jar as an external JAR to the project.

> ClassDep.java relies on Sun specific Internal JDK API 
> ------------------------------------------------------
>
>                 Key: RIVER-272
>                 URL: https://issues.apache.org/jira/browse/RIVER-272
>             Project: River
>          Issue Type: Improvement
>          Components: com_sun_jini_tool
>    Affects Versions: jtsk_2.1
>         Environment: Windows XP, JDK 1.4 - JDK 1.6, Eclipse 3.3 IDE
>            Reporter: Hakan Kocakulak
>
> ClassDep.java relies on Sun specific Internal JDK API 
> import sun.tools.java.BinaryClass;
> > import sun.tools.java.ClassDeclaration; import 
> > sun.tools.java.ClassFile; import sun.tools.java.ClassNotFound; import 
> > sun.tools.java.ClassPath; import sun.tools.java.Constants; import 
> > sun.tools.java.Environment; import sun.tools.java.Identifier; import 
> > sun.tools.java.MemberDefinition; import sun.tools.java.Package; import 
> > sun.tools.java.Type;
> while building from eclipse IDE, IDE do not add these Classes to classpath and can not build project.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (RIVER-272) ClassDep.java relies on Sun specific Internal JDK API

Posted by "Peter Firmstone (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/RIVER-272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12697465#action_12697465 ] 

Peter Firmstone commented on RIVER-272:
---------------------------------------

While trying to experiment with the -newdirbehaviour and -inroot options I found a bug in the original ClassDep that prevents these options from executing via the command line options:

notice the if (args.equals("-newdirbehavior")  it should be if (arg.equals(...

public void setupOptions(String[] args) {
	for (int i = 0; i < args.length ; i++ ) {
	    String arg = args[i];
	    if (args.equals("-newdirbehavior")) {
		newRootDirBehavior = true;
	    }
	    else if (arg.equals("-cp")) {
		i++;
		setClassPath(args[i]);
	    } else if (arg.equals("-files")) {
		setFiles(true);
	    } else if ....

Does anyone have information regarding the new behaviour?

Cheers,

Peter.

> ClassDep.java relies on Sun specific Internal JDK API 
> ------------------------------------------------------
>
>                 Key: RIVER-272
>                 URL: https://issues.apache.org/jira/browse/RIVER-272
>             Project: River
>          Issue Type: Improvement
>          Components: com_sun_jini_tool
>    Affects Versions: jtsk_2.1
>         Environment: Windows XP, JDK 1.4 - JDK 1.6, Eclipse 3.3 IDE
>            Reporter: Hakan Kocakulak
>         Attachments: classdepend.zip, classdepend_backport.tgz, ClassDepReplacement.tgz, ClassDepReplacement_alpha-2.tgz
>
>
> ClassDep.java relies on Sun specific Internal JDK API 
> import sun.tools.java.BinaryClass;
> > import sun.tools.java.ClassDeclaration; import 
> > sun.tools.java.ClassFile; import sun.tools.java.ClassNotFound; import 
> > sun.tools.java.ClassPath; import sun.tools.java.Constants; import 
> > sun.tools.java.Environment; import sun.tools.java.Identifier; import 
> > sun.tools.java.MemberDefinition; import sun.tools.java.Package; import 
> > sun.tools.java.Type;
> while building from eclipse IDE, IDE do not add these Classes to classpath and can not build project.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Re: [jira] Commented: (RIVER-272) ClassDep.java relies on Sun specific Internal JDK API

Posted by Peter Firmstone <ji...@zeus.net.au>.
Cool,  you guys are making real progress, with the build scripts, just 
updated Ant and ran the build scripts, will checkout again tomorrow and 
try the integration tests.

Cheers,

Peter.

Jonathan Costers (JIRA) wrote:
>     [ https://issues.apache.org/jira/browse/RIVER-272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12693546#action_12693546 ] 
>
> Jonathan Costers commented on RIVER-272:
> ----------------------------------------
>
> Thanks for the patch! I'm testing it right now.
> I added the code to the main River src tree as is.
> If all seems to work, I'll provide a patch for build.xml and integrationtest.xml too.
>
> Best
> Jonathan
>
>   
>> ClassDep.java relies on Sun specific Internal JDK API 
>> ------------------------------------------------------
>>
>>                 Key: RIVER-272
>>                 URL: https://issues.apache.org/jira/browse/RIVER-272
>>             Project: River
>>          Issue Type: Improvement
>>          Components: com_sun_jini_tool
>>    Affects Versions: jtsk_2.1
>>         Environment: Windows XP, JDK 1.4 - JDK 1.6, Eclipse 3.3 IDE
>>            Reporter: Hakan Kocakulak
>>         Attachments: classdepend.zip, classdepend_backport.tgz
>>
>>
>> ClassDep.java relies on Sun specific Internal JDK API 
>> import sun.tools.java.BinaryClass;
>>     
>>> import sun.tools.java.ClassDeclaration; import 
>>> sun.tools.java.ClassFile; import sun.tools.java.ClassNotFound; import 
>>> sun.tools.java.ClassPath; import sun.tools.java.Constants; import 
>>> sun.tools.java.Environment; import sun.tools.java.Identifier; import 
>>> sun.tools.java.MemberDefinition; import sun.tools.java.Package; import 
>>> sun.tools.java.Type;
>>>       
>> while building from eclipse IDE, IDE do not add these Classes to classpath and can not build project.
>>     
>
>   


[jira] Commented: (RIVER-272) ClassDep.java relies on Sun specific Internal JDK API

Posted by "Jonathan Costers (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/RIVER-272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12693546#action_12693546 ] 

Jonathan Costers commented on RIVER-272:
----------------------------------------

Thanks for the patch! I'm testing it right now.
I added the code to the main River src tree as is.
If all seems to work, I'll provide a patch for build.xml and integrationtest.xml too.

Best
Jonathan

> ClassDep.java relies on Sun specific Internal JDK API 
> ------------------------------------------------------
>
>                 Key: RIVER-272
>                 URL: https://issues.apache.org/jira/browse/RIVER-272
>             Project: River
>          Issue Type: Improvement
>          Components: com_sun_jini_tool
>    Affects Versions: jtsk_2.1
>         Environment: Windows XP, JDK 1.4 - JDK 1.6, Eclipse 3.3 IDE
>            Reporter: Hakan Kocakulak
>         Attachments: classdepend.zip, classdepend_backport.tgz
>
>
> ClassDep.java relies on Sun specific Internal JDK API 
> import sun.tools.java.BinaryClass;
> > import sun.tools.java.ClassDeclaration; import 
> > sun.tools.java.ClassFile; import sun.tools.java.ClassNotFound; import 
> > sun.tools.java.ClassPath; import sun.tools.java.Constants; import 
> > sun.tools.java.Environment; import sun.tools.java.Identifier; import 
> > sun.tools.java.MemberDefinition; import sun.tools.java.Package; import 
> > sun.tools.java.Type;
> while building from eclipse IDE, IDE do not add these Classes to classpath and can not build project.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.