Solved

sun.tools.java.*;

Posted on 1998-08-18
5
218 Views
Last Modified: 2010-05-18
Hello,
In jdk1.1, there was a package sun.tools.java, with sun.tools.java.Scanner and sun.tools.java.Constants in it.  Does anyone know where I can find these classes in jdk1.2beta4?
Thanks in advance.
Gamestor
0
Comment
Question by:Gamestor
  • 2
  • 2
5 Comments
 
LVL 4

Accepted Solution

by:
evijay earned 70 total points
ID: 1222047
in the lib directory, there is  tools.jar file which has all these classes.


0
 

Expert Comment

by:awilkins
ID: 1222048
I don't think that's quite what Gamestor meant -- he wants to know where in the jdk 1.2beta4 package hierarchy these classes are, not their physical location on the hard drive.  Trying to import sun.tools.java results in a compiler error:  
    Package sun.tools.java not found in import.
He wants to know what package you should import instead.

    As far as I can tell, sun.tools.java is not present in any form at all in the jdk1.2beta4, but I could be wrong.  I couldn't find either 'Scanner' or 'Constants' in the index, though.

  -- Alexander Wilkins
0
 
LVL 4

Expert Comment

by:evijay
ID: 1222049
sun.tools package is undocumented package which can be used at our own risk since sun doesnt provide any support for these packages.

give the command

jar tvf lib\tools.jar in the jdk1.2 installed directory and you will see all these files in the display.

you can use them without any problems.
 in fact a lot of them are quite useful. Read the java secrets book which contain a lot of undocumented classes which is a treasure for programmer.

to use them, include tools.jar in the classpath.


0
 

Expert Comment

by:awilkins
ID: 1222050
Whoops--sorry, evijay.  My fingers sometimes shift to fifth while my brain is stuck in neutral.  I should nave thought longer before replying.

  Sincerely --
    Alexander Wilkins
0
 

Author Comment

by:Gamestor
ID: 1222051
Thanks to both of you.  It really helped.

Gamestor
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question