river-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Firmstone (JIRA)" <j...@apache.org>
Subject [jira] Commented: (RIVER-272) ClassDep.java relies on Sun specific Internal JDK API
Date Wed, 22 Apr 2009 17:21:47 GMT

    [ 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.


Mime
View raw message