Link to home
Start Free TrialLog in
Avatar of Calron
Calron

asked on

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

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?
ASKER CERTIFIED SOLUTION
Avatar of exorcist
exorcist

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of k.jones
k.jones

Try sticking it in the Java extensions directory.  Do not know if that will work, but sounds worth a try.

Cheers,
Ken Jones
Avatar of Calron

ASKER

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
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/