Solved

sun.tools.java.*;

Posted on 1998-08-18
5
221 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

691 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