Solved

Using the java.util.logging package from JDK1.4 in JDK1.3?

Posted on 2001-06-27
4
863 Views
Last Modified: 2011-10-03
In a project I am working on I need the ability to Logg different messages. The logging package from the JDK1.4 is pretty much what I need. The project will be updated to JDK1.4 once it is released, but until then I have to use JDK1.3.
What I tried was to just copy the specific package into my own class structure but when I try to call a class from the logging package I get following error:

java.lang.SecurityException: Prohibited package name: java.util.logging

Why do I get this error and is there a way (other than renaming the package) to use this package without getting the error?
0
Comment
Question by:Calron
4 Comments
 
LVL 3

Accepted Solution

by:
exorcist earned 200 total points
ID: 6231895
This is a security thing. You just arent allowed to put classes in the java.* package. This is to prevent "fake" classes.
What you might try is to put these classes into the file with all java standard classes. I think it was called classes.zip once. On my linux it is called rt.jar

try to put the classes into this jar file and tell me if this works.
0
 
LVL 4

Expert Comment

by:k.jones
ID: 6232553
Try sticking it in the Java extensions directory.  Do not know if that will work, but sounds worth a try.

Cheers,
Ken Jones
0
 
LVL 5

Author Comment

by:Calron
ID: 6234031
The solution exorcist provided "worked". It got rid of the Security Exception. Then I found that that package uses some native code, so I will just have to wait until the project is switched over to JDK1.4.

Thanks for the help
0
 
LVL 1

Expert Comment

by:zeus_akkali
ID: 11793950
java.util.logging is an implmentation of the apache log4j logging.

What you can do is use the apache logging until you are in jdk1.3 and the switch to jdk 1.4 java.util.logging would be very easy.

This is the url to download the logging package from apache -
http://logging.apache.org/log4j/docs/
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Systems talking to each other 5 126
Java array passed to SQL where clause 23 64
object oriented programming comparison 5 57
servlet filter example 37 46
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)
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 learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This video teaches viewers about errors in exception handling.

867 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

23 Experts available now in Live!

Get 1:1 Help Now