Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #13638
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail |
|---|---|
| From | zyng <xsli2@yahoo.com> |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: the problem for accessing the classes in rt.jar |
| Date | Wed, 18 Apr 2012 08:35:05 -0700 (PDT) |
| Organization | http://groups.google.com |
| Lines | 24 |
| Message-ID | <21528069.1815.1334763305959.JavaMail.geo-discussion-forums@yntt13> (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> <slrnjothhs.kvi.avl@gamma.logic.tuwien.ac.at> <29910219.1583.1334761581496.JavaMail.geo-discussion-forums@ynjm4> |
| NNTP-Posting-Host | 205.156.36.56 |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-1 |
| X-Trace | posting.google.com 1334763306 1032 127.0.0.1 (18 Apr 2012 15:35:06 GMT) |
| X-Complaints-To | groups-abuse@google.com |
| NNTP-Posting-Date | Wed, 18 Apr 2012 15:35:06 +0000 (UTC) |
| Cc | avl@logic.at |
| In-Reply-To | <29910219.1583.1334761581496.JavaMail.geo-discussion-forums@ynjm4> |
| Complaints-To | groups-abuse@google.com |
| Injection-Info | glegroupsg2000goo.googlegroups.com; posting-host=205.156.36.56; posting-account=oo44OQoAAABMDvaRlaO3SeQ5MVbxqLdH |
| User-Agent | G2/1.0 |
| X-Received-Bytes | 2462 |
| Xref | csiph.com comp.lang.java.programmer:13638 |
Show key headers only | View raw
My goodness. The problem is solved. By searching Google, I found this link which provides the explanation and the answer:
http://stackoverflow.com/questions/4065401/using-internal-sun-classes-with-javac
I copied his answer here:
"When javac is compiling code it doesn't link against rt.jar by default. Instead it uses special symbol file lib/ct.sym with class stubs.
Surprisingly this file contains many but not all of internal sun classes. In my case one of those more-internal-than-usual classes was sun.awt.event.IgnorePaintEvent.
And the answer to my question is: javac -XDignore.symbol.file
That's what javac uses for compiling rt.jar."
So, in my build.xml, the target "compile", I have:
<target name="compile" depends="prepare">
<javac srcdir="${src.dir}" destdir="${build.dir}" compiler="modern" fork="yes" debug="on">
<classpath refid="project.classpath"/>
<compilerarg value="-Xlint"/>
<compilerarg value="-verbose"/>
<compilerarg value="-XDignore.symbol.file"/>
</javac>
</target>
In project.classpath, I don't need to explicitly reference rt.jar at all! Now it compiles fine.
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll 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