JCE Verifier - a bug in the Java Docs?

When implementing a new JCE Provider, one should follow the special docs, such as http://java.sun.com/j2se/1.4.2/docs/guide/security/jce/HowToImplAJCEProvider.html
In the section "Creating a JarFile Referring to the JAR File", there's this code snippet proposed to get the jar to verify:
// Always get a fresh copy, so we don't have to
// worry about the stale file handle when the
// cached jar is closed by some other application.
conn.setUseCaches(false);
jf = conn.getJarFile();
My question: is it still necessary to switch off using the jar caches before trying to get the file? My impression is that this is related to the old bug 4271671 which is a duplicate of 4211817 which has been closed four years ago (see:http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4211817) . Isn't this just some leftover from those times in the documentation?
This is an issue for us as switching the cache off forces the Java Plugin to always download a fresh copy of an applet jar during the initiation phase, thus slowing down the applet start time very considerably, especially over slow lines.
Thanks everybody!

When implementing a new JCE Provider, one should follow the special docs, such as http://java.sun.com/j2se/1.4.2/docs/guide/security/jce/HowToImplAJCEProvider.html
In the section "Creating a JarFile Referring to the JAR File", there's this code snippet proposed to get the jar to verify:
// Always get a fresh copy, so we don't have to
// worry about the stale file handle when the
// cached jar is closed by some other application.
conn.setUseCaches(false);
jf = conn.getJarFile();
My question: is it still necessary to switch off using the jar caches before trying to get the file? My impression is that this is related to the old bug 4271671 which is a duplicate of 4211817 which has been closed four years ago (see:http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4211817) . Isn't this just some leftover from those times in the documentation?
This is an issue for us as switching the cache off forces the Java Plugin to always download a fresh copy of an applet jar during the initiation phase, thus slowing down the applet start time very considerably, especially over slow lines.
Thanks everybody!

Similar Messages

  • Question about the java doc of String.intern() method

    hi all, my native language is not english, and i have a problem when reading the java doc of String.intern() method. the following text is extract from the documentation:
    When the intern method is invoked, if the pool already contains a string equal to this String object as determined by the equals(Object) method, then the string from the pool is returned. Otherwise, this String object is added to the pool and a reference to this String object is returned.
    i just don't know the "a reference to this String object is returned" part, does the "the reference to this String" means the string that the java keyword "this" represents or the string newly add to the string pool?
    eg,
    String s=new String("abc");  //create a string
    s.intern();  //add s to the string pool, and return what? s itself or the string just added to string pool?greate thanks!

    Except for primitives (byte, char, short, int, long, float, double, boolean), every value that you store in a variable, pass as a method parameter, return from a method, etc., is always a reference, never an object.
    String s  = "abc"; // s hold a reference to a String object containing chars "abc"
    foo(s); // we copy the reference in variable s and pass it to the foo() method.
    String foo(String s) {
      return s + "zzz"; // create a new String and return a reference that points to it.
    s.intern(); //add s to the string pool, and return what? s itself or the string just added to string pool?intern returns a reference to the String object that's held in the pool. It's not clear whether the String object is copied, or if it's just a reference to the original String object. It's also not relevant.

  • How to know whether a method is thread-safe through the java-doc?

    In some book, it says that SAXParserFactory.newSAXParser() is thread-safe,but in the java-doc,it doesn't say that.
    newSAXParser
    public abstract SAXParser newSAXParser()
    throws ParserConfigurationException,
    SAXExceptionCreates a new instance of a SAXParser using the currently configured factory parameters.
    Returns:
    A new instance of a SAXParser.
    Throws:
    ParserConfigurationException - if a parser cannot be created which satisfies the requested configuration.
    SAXException - for SAX errors.
    I want to know, how to know whether a method is thread-safe?

    System.out is a PrintStream object. None of the methods there use the synchronized modifier, but if you look in the source code, you will find out it is thread-safe, because it will use synchronized blocks whenever it writes some text.
    The source code is in the src.jar file which you can extract.
    I didn't find any comments about that PrintStream is thread-safe in the API.

  • Where can i find the Java doc API for Sun Portal 6.2

    Hi
    I am looking for the java doc api for portal.. for e.g, i want to know the available classes under com.sun.portal.providers.util and method details under that..
    Thanks
    Ramesh

    There should be a file called javadocs.jar in your portal installation directory. Either under SUNWps/sdk or SUNWps/export.
    - Jim

  • How to vote, add to watch list or comment on a bug in the Java Bug Database

    Sorry, could not fine a better place where to post this question.
    I'm successfully logged-in but I cannot add a particular bug to my bug watch list, comment on it or vote for it (ok, here I may have already used all my 3 votes but I could also not find where to check this in my profile).
    I am particular interested in this bug #4787931:
    http://bugs.sun.com/view_bug.do?bug_id=4787931
    Thanks for you support!

    The Java bug DB was a Sun-time idea. Oracle hasn't put much effort into it since the merger:
    - the performance has been horrible, see e.g. {thread:id=2173553}), and it is not clear whether they intend to keep maintaining it as such (open, vote-able,...)
    - the "recently closed bugs" page (http://bugs.sun.com/recently_closed.do) seems out of date
    - At the time of this writing, I cannot even find a link to log on it from the welcome page http://bugs.sun.com/ :(
    Until Oracle openly declares that they will maintain this resource, I wouldn't put much hope nor effort into it...
    Much luck,
    J.
    Edited by: jduprez on Sep 17, 2012 11:59 AM

  • Strange bug with the java.io.File class

    Hi everibody!
    I'm writting a system to upload images with JSF and RichFaces. But when i try to delete the images files sometimes hapen some strange bug.
    first i'll post my method code here:
    public void deleteUploadedFile(ActionEvent event) throws Throwable {
            UIComponent link = event.getComponent();
            UIParameter param = (UIParameter) link.findComponent("fileId");
            TheFile file = this.uploadedFiles.get((Integer) param.getValue());
            try {
                File f = new File(file.getPath(), file.getName());
                if ((f.exists()) && (f.canRead()) && (f.canWrite())) {
                    if(f.delete()){
                        for(int i=0; i<file.getThumbs().size(); i++){
                            File t1 = new File(file.getPath(), file.getThumbs().get(i).getThumbName());
                            t1.delete();
                        setDeleted(true);
                    else{
                        setDeleteLog("Arquivo não pode ser excluido");
                        setDeleted(false);
                } else {
                    setDeleteLog("Erro ao tentar excluir o arquivo");
                    setDeleted(false);
                this.finalize();
            } catch (Exception ex) {
                setDeleteLog("Deu erro: " + ex);
            } finally {
                if (this.deleted) {
                    if (this.uploadedFiles.remove(file)) {
                        setDeleteLog("Conseguiu remover");
                    } else {
                        setDeleteLog("Deu erro");
        }Well, when the method run the f.delete() line, sometimes, something strange hapen. With is, the file data is deleted as expected, but the file it self is not deleted. And even when i run the line this.finalize the JVM still using the file, with don't allows me to try to delete it untill my tomcat stop (with kill the application that was using the file). And this don't hapen every time that i try to delete one file.
    And worse, once it hapen every next time that i try to delete one file hapen the same bug.
    My question is...what could it be, and what can i do to solve this?!

    About this is not a possible cause. Because before i upload a file I verify if the file already exists and even after i change the file name:
    //this method change the file name and eliminate all the special characters, and also attach the current day of month,
    //month, year, minute and second to the file name
    public String generateFileName(String fileName){
            Locale l = new Locale("pt","BR");
            Calendar cal = Calendar.getInstance(TimeZone.getTimeZone(TimeZone.getTimeZone("GMT-3").getID()), l);
            int ext = fileName.lastIndexOf('.');
            String name = fileName.replace(fileName.substring(ext), "");
            String newName = RemoverAcentos.remover(name).toLowerCase()+cal.get(cal.DAY_OF_MONTH)+cal.get(cal.MONTH)
                    +cal.get(cal.YEAR)+cal.get(cal.MINUTE)+cal.get(cal.SECOND)+fileName.substring(ext);
            return newName;
        }the upload method
    String fileName = generateFileName(item.getFileName());
            try {
                File uploadFile = new File(filepath, fileName);
                if (!uploadFile.exists()) {

  • How can we generate the java doc for default package

    hello....
    i using Netbeans 6.5 with JDK 1.5 and JRE 1.6. I generated comment and selected generate javadoc option from Netbeans.
    It genearted javadoc for all packages except the default package.Please help me to generate javadoc for default package.

    You need to pass in source filenames (rather than package names) with the javadoc command on the command line. (I don't know if this can be done in NetBeans)
    "I have refined this fix to handle classes in unnamed packages. A link with the label <unnamed package> now appears at the top of the packge list when classes in unnamed packages are specified on the command line."
    stddoclet: Include package info when passing in source filenames (*.java)
    10-Fix Delivered,
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4359386
    Also see:
    stddoclet: Want default (i.e. unnamed) package to appear in package list
    11-Closed, duplicate of 4359386
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4213968

  • 10.1.3 - what happened to all the java docs?

    I'm trying to do a right click Show Javadoc on an XMLDocument class and can't find the docs. The library points the docs to: C:\jdev1013\jdev\doc\ohj\xml-javadoc.jar. This file does not exist.
    It does exist in the JDeveloper 10.1.2.1 release in that folder. In fact, the JDEV 10.1.2.1 has about 56 files in that folder where JDEV 10.1.3 has only 14.
    It's not in any other folder under 10.1.3.
    What's the scoop?

    XMLDocument class
    http://www.ifs.uni-linz.ac.at/ifs/teaching/offer/ss00/webdb/eh5/xmlparserv2/doc/oracle.xml.parser.v2.XMLDocument.html

  • How to find the java doc?

    Dear all,
    I saw a function in java3d called ALPHA. I want to know where I should go to look for the information of the function
    thanks

    The api is listed under documentation.
    https://java3d.dev.java.net/

  • Where are the latest java docs for the 9i JDBC drivers

    Hi, I'm trying to locate the java docs for the latest 9i JDBC drivers. I have searched all over the otn and oracle sites and still haven't found them. Does anyone know where they can be found.
    Thanks,
    Simon

    I believe they're right on the download page where you download the drivers.
    Justin
    Distributed Database Consulting, Inc.
    www.ddbcinc.com

  • Java Docs for the Module Process Classes

    Hi,
    I would like to start creating my own JDBC and file-based modules for interface development. I have found several  SDN contributions which step through the creation of these modules. These are very helpful.
    However, I have not yet found comprehensive documentation describing the classes used in module develpment. i.e.:
    - com.sap.aii.af.mp.module.Module
    - com.sap.aii.af.mp.module.ModuleContext
    - com.sap.aii.af.mp.module.ModuleData
    Does anyone know where to find the Java Docs for these classes? Or is there any other equivalent explanation of how to use these classes, their methods and fields?
    Any help would be greatly appreciated.
    Carl Engel
    CSC Australia

    Hi Carl,
    Another link for you
    http://help.sap.com/saphelp_nw04/helpdata/en/87/3ef4403ae3db12e10000000a155106/frameset.htm
    This says that the java documentation is available in the example adapter/module that is there with XI.
    I vaguely remembering seeing the docu..it was long back though..right now i donot have access to a system...
    Get the rar(java archive) that i talked about in the above link...
    Thanks,
    Renjith

  • Problem with Java doc -- any ideas

    This is the command which produces the java docs:
    javadoc  -d docs -author -overview e:\workspace\ckviewer\src\overview.html -doctitle
    "CkEntry / CkViewer Application and APIs" -sourcepath e:\workspace\ckviewer\src
    cprs.as400 cprs.ckentry cprs.ckviewer cprs.pc5250 cprs.roi cprs.util
    neva vistech.imageviewer vistech.jai.render vistech.util The java docs are built correctly except that the package.html files for each source folder are being left out. These are the errors:
    E:\ckviewer\ckviewer.jar: Body tag missing from HTML
    E:\ckviewer\ckviewer.jar: Body tag missing from HTML
    E:\ckviewer\ckviewer.jar: Body tag missing from HTML
    E:\ckviewer\ckviewer.jar: Body tag missing from HTML
    E:\ckviewer\ckviewer.jar: Body tag missing from HTML
    E:\ckviewer\ckviewer.jar: Body tag missing from HTML
    E:\ckviewer\ckviewer.jar: Body tag missing from HTML
    E:\ckviewer\ckviewer.jar: Body tag missing from HTML
    E:\ckviewer\ckviewer.jar: Body tag missing from HTML
    E:\ckviewer\ckviewer.jar: Body tag missing from HTMLOne error message for each of the 10 packages. What I don't understand is that the source within the packages is found. Each package is documented, methods listed, etc. The package.html is not processed.
    Any ideas?
    Thanks
    Bill

    I'm not familiar with the -overview option, but I bet
    it's complaining about your overview.html file.That is a good suggestion but actually the overview file is being processed and shows up in the java docs. The "package.html" files in each of the source folders are being ignored. There are 10 source folders, 10 "package.html" files and 10 errors.
    Any other ideas or suggestions how to call javadoc?
    Thanks
    Bill

  • Where can I find the Java Document of com.sap.aii.af.ra.ms.api.Message

    Com.sap.aii.af.ra.ms.api.Message is class that would be used in Adapter Module development, but I found I can't find the document of it in neither Adapter Module related document nor XI Mapping related document.
    Anyone can help me?

    YiNing,
    Did you check this link,
    http://help.sap.com/saphelp_nw04/helpdata/en/87/3ef4403ae3db12e10000000a155106/content.htm
    Does it help? Also did you look into the Java Docs Section,
    https://help.sap.com/javadocs/index.html
    Regards
    Bhavesh

  • Where can I find the java solution of online file storage ?

    Hi,
    I am facing a project about online file storage like box.net,xdrive..User can upload/download through http(web application) and ftp client or through other protocol such as SMB,share files,full-featured text index and search,the file directory structure and file records maybe persist in database(virtual directory)..
    There are many online file storage service website in internet,but I can not find any technique article about how to build there website,I think I maybe need bothside code in the web server and the ftp server(different server may cause different code) or other server(such as SMB server) to process such as file uploading(write IO file ,write record to database,build file text index).
    Any suggest is appreciated.
    Thanks and regards.
    L.J.W

    YiNing,
    Did you check this link,
    http://help.sap.com/saphelp_nw04/helpdata/en/87/3ef4403ae3db12e10000000a155106/content.htm
    Does it help? Also did you look into the Java Docs Section,
    https://help.sap.com/javadocs/index.html
    Regards
    Bhavesh

  • EP6 SP2 ICrawler (deprecated) - XCrawler java docs?

    Hallo all,
    I want to implement a Crawler for EP6 SP2 and found out in the Java docs that ICrawler is deprecated for EP6 SP2 and that XCrawler should be used. But I can't find any information (e.g. java docs or sample coding) for XCrawler replacing ICrawler. Neither do I find the necessary libraries for implementing a crawler.
    Could someone please point me to the right place to look for libraries/docs/samples? Or does anyone know something about ICrawler / XCrawler implementation on EP6 SP2?
    Thanks a lot for any input on this!
    Best Regards
    Helga
    Message was edited by: Helga Ortius

    See /thread/41429 [original link is broken]

Maybe you are looking for