This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I just have started applets and I have a silly question. I know that the applet use the jnlp.jar in the jdk to retrieve data or save data in the file system. one of those services is FileOpenService which is initiated by the following code
ok, I agree. but how the lookup method instantiate a reference to object of it and cast it back to File Open Service.
Joined: Mar 22, 2005
By instantiating some class that implements the interface. You can find out which class that is on your particular JVM by printing out "fos.getClass().getName()". That likely won't do you much good, though, as it'll be an internal class of the JRE, and what's more, it'll be different on different OSes, so your code can't make assumptions what it's going to be.
Joined: Apr 26, 2013
I got you. You mean that JVM instantiate a class that implements this interface and the look up method bring the bject of this class. And because this new class not known to public it is casted to the type i want. Is that what you mean