• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

i can't compile my code

 
Arun Bhowmick
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
i can't compile my java code. it is ok for my machine. but when i try in the different machine it gives a errop message "deprecation of API". how can i solve this?
arun
 
Tim Holloway
Saloon Keeper
Posts: 18359
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually this is a question for Java In General.
Normally the deprecation message is only a warning. It means that you're attempting to use a method that Sun has decided not to support in future releases. It gives a warning so that you'll know to fix things, but will be able to still run the code while you're working on the fix.
The actual cause of getting a deprecation on one machine but not on another is very simple. You're using two different versions of the JDK. The one on the machine that gives the warning is more up-to-date, so you might want to update the older machine. Otherwise you should just be able to ignore the message.
 
Arun Bhowmick
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for ur reply. yeh i got ur point but i am wondering why i am getting the message "the applet is not initiated". if i remove the deprecation warning i won't recieve the message?
arun

Originally posted by Arun Bhowmick:
hi,
i can't compile my java code. it is ok for my machine. but when i try in the different machine it gives a errop message "deprecation of API". how can i solve this?
arun

 
Maulin Vasavada
Ranch Hand
Posts: 1873
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Arun
Can you see your "Java console" and see if there are any exceptions you see there?
In case you are unaware of how to go to Java console then,
- In IE, you can do "Tools->Sun Java console" if you are using SUN JRE
- In IE, if you are using MS VM then you can do "View->Java console"
- In Netscape/Mozilla you can use "Tools->Web development->Java console"
from menubar.
As Tim suggested the deprication messages you can ignore most of the time but if you are getting "Applet not initated" it means there is some problem which might not be just due to the use of depricated API use.
Please let us know if you see any errors on the java console.
Regards
Maulin
 
Tim Holloway
Saloon Keeper
Posts: 18359
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yup. In fact, a deprecation warning is in indicator that in a future Java release, the indicated field or method will probably be removed. When that happens, you'll die on a MethodNotFoundException - or when recompiling, get a Method Not Found error message, but not get a deprecation warning, since the warning is output by the compiler when it compiles that method. If the method's been removed, there's nothing to attach the warning to!
 
Arun Bhowmick
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this is all i can see in java console. i'm really tired with this problem.
any solution would be much appreciated. thanks
arun
Java(TM) Plug-in: Version 1.4.2
Using JRE version 1.4.2 Java HotSpot(TM) Client VM
User home directory = C:\Documents and Settings\ujjal Chakraborty
Proxy Configuration: No proxy
----------------------------------------------------
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
o: trigger logging
p: reload proxy configuration
q: hide console
r: reload policy configuration
s: dump system properties
t: dump thread list
v: dump thread stack
x: clear classloader cache
0-5: set trace level to <n>
----------------------------------------------------

Originally posted by Maulin Vasavada:
hi Arun
Can you see your "Java console" and see if there are any exceptions you see there?
In case you are unaware of how to go to Java console then,
- In IE, you can do "Tools->Sun Java console" if you are using SUN JRE
- In IE, if you are using MS VM then you can do "View->Java console"
- In Netscape/Mozilla you can use "Tools->Web development->Java console"
from menubar.
As Tim suggested the deprication messages you can ignore most of the time but if you are getting "Applet not initated" it means there is some problem which might not be just due to the use of depricated API use.
Please let us know if you see any errors on the java console.
Regards
Maulin
 
Arun Bhowmick
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
dear friends,
i'm still looking for the solution. is there anybody listening me?
arun
 
Rob Ross
Bartender
Posts: 2205
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The deprecation warning will not prevent your applet from running. The "Applet not initialized" message is not at all related to the deprecation warning you received when compiling.
There is some other problem preventing your Applet from being initialized. Usually, it's a classpath issue, ie, the browser cannot find the Applet class to load. This can happen for a variety of reasons. What does your "APPLET" tag look like? Are you including the CODEBASE attribute? What is its value? And where is your .class or .jar file, etc?
 
Arun Bhowmick
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks a lot. yeh u r right. i removed the deprecated API warning but still getting the message. here i am giving my HTML linings for ur convenience.
<applet codebase=classes code=Roadway.class width=800 height=600>
</applet>
i think now u can trigger the solution more specifically.
thanks a lot.
arun
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic