Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / April 2006

Tip: Looking for answers? Try searching our database.

com.sun.mirror.apt

Thread view: 
printdude1968@gmail.com - 15 Apr 2006 02:15 GMT
I am running the following java on a Windows XP Home Ed PC

java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing)

I am trying to use code that wants to import
com.sun.mirror.apt

But my IDE (Eclipse) is not finding it.
If I do
import com.sun.  (then code completion takes over)
I see sun.media.sound.*   and
       sun.media.naming.*

No mirror!!!   Do I need something else like the J2SEE (doesn't this
require XP Pro)
Mark Thomas - 15 Apr 2006 11:43 GMT
> I am running the following java on a Windows XP Home Ed PC
>
[quoted text clipped - 13 lines]
> No mirror!!!   Do I need something else like the J2SEE (doesn't this
> require XP Pro)

No, apt is a standard tool - supplied as part of the JDK.  You need to
put tools.jar unto your classpath.  You can find it in the lib directory
of your JDK.  BTW, I think you'd need import com.sun.mirror.apt.*; as
apt isn't a class but a package.

Mark
printdude1968@gmail.com - 15 Apr 2006 17:25 GMT
I copied tools.jar to all the right places and it still doesn't work.
Even using JCreator, I set the correct JDK to 1.5 and it should, by
rights, pick up the proper library but I don't know what I'm doing
wrong.

Here's my CLASSPATH
CLASSPATH=.;..;J:\TIJ4\code;javassist.jar;c:\jdk1.5.0_06\jre\lib

and JAVA_HOME

JAVA_HOME=c:\jdk1.5.0_06

I am using posix here to do a listing so you can see that tools.jar is
in the right place

-rwx---rwx  1 Compaq_Owner  None   153235 Nov 10 10:20
sunjce_provider.jar
-rwx---rwx  1 Compaq_Owner  None   175811 Nov 10 10:20 sunpkcs11.jar
-rwx---rwx  1 Compaq_Owner  None     8176 Nov 10 11:05 dnsns.jar
-rwx---rwx  1 Compaq_Owner  None  7043169 Nov 10 12:13 tools.jar
-rwx---rwx  1 Compaq_Owner  None   802394 Nov 10 12:21 localedata.jar
-rwx---rwx  1 Compaq_Owner  None   431568 Nov 29 17:44 xom-1.1.jar
-rwx---rwx  1 Compaq_Owner  None   163728 Nov 29 17:44 xom-samples.jar
-rwx---rwx  1 Compaq_Owner  None  1283237 Jan 18 16:35 swt.jar
-rwx---rwx  1 Compaq_Owner  None   446045 Feb 23 01:50 javassist.jar
$ pwd
//C/jdk1.5.0_06/jre/lib/ext

I know there is something that I am doing wrong but I am only learning
Java so it's beyond me.
Mark Thomas - 15 Apr 2006 21:07 GMT
> I copied tools.jar to all the right places and it still doesn't work.
You don't need to copy it, just put its location on the classpath.
> Even using JCreator, I set the correct JDK to 1.5 and it should, by
> rights, pick up the proper library but I don't know what I'm doing
[quoted text clipped - 9 lines]
> I am using posix here to do a listing so you can see that tools.jar is
> in the right place
right place?  What place is that?

> -rwx---rwx  1 Compaq_Owner  None   153235 Nov 10 10:20
> sunjce_provider.jar
[quoted text clipped - 11 lines]
> I know there is something that I am doing wrong but I am only learning
> Java so it's beyond me.

The tools are part of the jdk, not the jre.  Add
c:\jdk1.5.0_06\lib\tools.jar to your classpath to pick up tools.jar.

Mark
printdude1968@gmail.com - 16 Apr 2006 01:31 GMT
Hi Mark,

I posted this message to an Eclipse forum and got the answer...another
aspect of the IDE that I don't know anything about.  Thanks for your
help.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.