Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #13635

Re: the problem for accessing the classes in rt.jar

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail
From Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at>
Newsgroups comp.lang.java.programmer
Subject Re: the problem for accessing the classes in rt.jar
Date Wed, 18 Apr 2012 13:48:44 +0000 (UTC)
Organization A noiseless patient Spider
Lines 30
Message-ID <slrnjothhs.kvi.avl@gamma.logic.tuwien.ac.at> (permalink)
References <22583724.345.1334591253848.JavaMail.geo-discussion-forums@vbvf19> <4f8e0210$0$290$14726298@news.sunsite.dk> <14699406.1250.1334754816127.JavaMail.geo-discussion-forums@vbyj26>
Reply-To avl@logic.at
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Transfer-Encoding 7bit
Injection-Date Wed, 18 Apr 2012 13:48:44 +0000 (UTC)
Injection-Info mx04.eternal-september.org; posting-host="bKsX5T0bATV2wS37QVtI5g"; logging-data="12532"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1//agWNFpJkEk/xsSU6n8Ob"
User-Agent slrn/pre0.9.9-111 (Linux)
Cancel-Lock sha1:ITg6IPUrPd6mjTf0HZHwWSgIUzM=
Xref csiph.com comp.lang.java.programmer:13635

Show key headers only | View raw


zyng <xsli2@yahoo.com> wrote:
> OK. And also re-phrase my question: 
> A)in build.xml file, when not including rt.jar by commenting out rt.jar:

Your experiments and conclusions make sense, but classes in "com.sun.*"
packages are not intended to be used in apps in the first place (and even
less so, if they have ".internal." in their path), so maybe there's even
some explicit trick in Java, that prevents these classes from being visible
to foreign code, when rt.jar is loaded as initial library. By symlinking
(on Linux) you may have outsmarted that mechanism, but you're walking on
very thin ice.

You will most likely run into difficulties later, maybe during any
oncoming patchlevel-update of your jdk, where package
 com.sun.xml.internal.fastinfoset.stax
might just disappear with all the classes previously inside it -
without even a mention in release-notes or migration-guides.

>     [javac] Compiling 407 source files to C:\my_work\build
>     [javac] C:\my_work\src\abc\efg\xml\MyXmlUtils.java:27: package com.sun.xml.internal.fastinfoset.stax does not exist
>     [javac] import com.sun.xml.internal.fastinfoset.stax.StAXDocumentParser;
>     [javac]                                             ^

So, to fix your problem, go find a class in a package under "java"
or "javax" that provides a *public* interface to the functionality
of StAXDocumentParser that you really need.

(If I knew the correct class, I'd have mentioned it, but I rarely
do xml-stuff, so others more into it hopefully will step in here.)

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

the problem for accessing the classes in rt.jar zyng <xsli2@yahoo.com> - 2012-04-16 08:47 -0700
  Re: the problem for accessing the classes in rt.jar markspace <-@.> - 2012-04-16 10:22 -0700
    Re: the problem for accessing the classes in rt.jar Lew <lewbloch@gmail.com> - 2012-04-16 14:31 -0700
  Re: the problem for accessing the classes in rt.jar Arne Vajhøj <arne@vajhoej.dk> - 2012-04-17 19:51 -0400
    Re: the problem for accessing the classes in rt.jar zyng <xsli2@yahoo.com> - 2012-04-18 06:13 -0700
      Re: the problem for accessing the classes in rt.jar Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2012-04-18 13:48 +0000
        Re: the problem for accessing the classes in rt.jar zyng <xsli2@yahoo.com> - 2012-04-18 08:06 -0700
          Re: the problem for accessing the classes in rt.jar zyng <xsli2@yahoo.com> - 2012-04-18 08:35 -0700
            Re: the problem for accessing the classes in rt.jar Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2012-04-18 16:02 +0000
            Re: the problem for accessing the classes in rt.jar markspace <-@.> - 2012-04-18 09:02 -0700
              Re: the problem for accessing the classes in rt.jar zyng <xsli2@yahoo.com> - 2012-04-18 10:49 -0700
                Re: the problem for accessing the classes in rt.jar Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2012-04-18 18:49 +0000
          Re: the problem for accessing the classes in rt.jar Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2012-04-18 15:50 +0000
          Re: the problem for accessing the classes in rt.jar Arne Vajhøj <arne@vajhoej.dk> - 2012-04-18 21:07 -0400
      Re: the problem for accessing the classes in rt.jar markspace <-@.> - 2012-04-18 07:45 -0700

csiph-web