?
Solved

sun.tools.java.*;

Posted on 1998-08-18
5
Medium Priority
?
224 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 280 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

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

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

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
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…
Suggested Courses
Course of the Month14 days, 1 hour left to enroll

800 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