This content has been marked as final. Show 6 replies
When you have compiled in JDK 6 then the class version has got changed. So it is obvious JDK 5 runtime will not be able to read it. Which API's you are talking about, if you can provide that, I am sure you will get a better solution.
Aniruddha Dutta Chowdhury
satendrajain wrote:Did the 1.6 API exist in Java 1.5? What exactly was deprecated?
...I have a piece of code which is made for Java 1.5, from which some API got deprecated , changed those API for Java1.6 ,and Compile same in Java 1.6 Environment.
That is working fine in Java 1.6 . but when I am launching same in Java 1.5 , it is giving me "Main class not found error ".
Please help me how to resolve this , also is there any way by which i can use same code for both Java version .Look into the [cross-compilation options|http://java.sun.com/javase/6/docs/technotes/tools/windows/javac.html#crosscomp-options] of the javac tool.
I am using
I replaced all the API with their available version.
satendrajain wrote:There is no 'global()' method in either Java 5 or 6 of the java.util.logging.Logger class.
...I am using
toURL()1) Which of the 3,777 classes of the J2SE does that method come from? Or is guessing part of the 'fun' of helping you?
Hide()See (1). Though I doubt any method in the J2SE would start with a capital letter.
for global , you can find this
for Hide(), that was by mistake i type in capital latter .
Please refer hide().
satendrajain wrote:Yes, I'm well aware of the JavaDocs. The point is that there is no 'global()' method! Perhaps you were referring to the [Logger.global *field*|http://java.sun.com/javase/6/docs/api/java/util/logging/Logger.html#global]. In which case, you're screwed. The JavaDocs state..
...for global , you can find this
Deprecated. Initialization of this field is prone to deadlocks. The field must be initialized by the Logger class initialization which may cause deadlocks with the LogManager class initialization. In such cases two class initialization wait for each other to complete. As of JDK version 1.6, the preferred way to get the global logger object is via the call Logger.getLogger(Logger.GLOBAL_LOGGER_NAME).Then, if you follow the JavaDocs to the definition of [Logger.GLOBAL_LOGGER_NAME|http://java.sun.com/javase/6/docs/api/java/util/logging/Logger.html#GLOBAL_LOGGER_NAME] it states (in part)
Since: *1.6*That means the field did not exist in 1.5 JREs, and therefore cannot be used in Java 1.5. You will just have to put up with a deprecation warning until such times as the app. no longer supports 1.5.
for Hide(), that was by mistake i type in capital latter .1) *In which friggin' class?* It sure is not a method of the J2SE Logger class, and I refuse to speculate further based on your (so far) pathetic, incomplete, inaccurate & illogical information.
Please refer hide().
As programmers, the compiler expects us to write code that is exactly what we mean. Is it too much to ask that you extend that precision to Java problems for which you ask for help? Don't expect the compiler, or people who are trying to help you on international forums, to try and 'guess' what you are referring to.
The same question (1) applies to the other methods you quoted, I queried you about, yet you ignored., link to the exact class and method you speak of, otherwise I will be unable to offer further help.