Solved

sun.tools.java.*;

Posted on 1998-08-18
5
216 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
Comment Utility
in the lib directory, there is  tools.jar file which has all these classes.


0
 

Expert Comment

by:awilkins
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks to both of you.  It really helped.

Gamestor
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

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…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

744 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now