Force jvm 1.5 autodownload

My Problem:
My applet only runs under 1.5.
Under 1.4, I get a ClassNotFoundException, the connection is HTTPS (SSL), I guess, the 1.4 JRE has a problem with this. But under the 1.5 version, it works.
How can I force an automatic download and install of an 1.5.0_0x plugin for the browser ?
I have been trying the following so far:
1) Applet tag:
<pre>
<applet name="org.xxxxApplet"
code="org.xxxxApplet"
codebase=""
archive="xxxxApplet.jar, iaik_jce.jar, iaikPkcs11Wrapper.jar, jnlp.jar, plugin.jar"
width="636"
height="500"
mayscript="true">
<param name="xxxxFormName" value="xxxxforms.xml"/>
<param name="Language" value="<bean:write name="formTestForm" property="language" />" />
<param name="cache_option" value="Plugin"/>
Your browser must be configured for displaying Java v1.5+ applets.
</applet>
</pre>
This works of course, but uses the 1.4 jvms, if no 1.5 jvm is installed and/or set as default browser plugin jvm.
2)
a combined one for ie and netscape, using the object tag:
<pre>
<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
width="636"
height="500"
codebase="http://java.sun.com/products/plugin/autodl/ jinstall-1_5_0-windows-i586.cab#Version=1,5,0,0">
<param name="type" value="application/x-java-applet;version=1.5">
<param name="CODE" value="org.xxxxApplet.class">
<param name="ARCHIVE" value="xxxxApplet.jar, iaik_jce.jar, iaikPkcs11Wrapper.jar, jnlp.jar, plugin.jar">
<param name="scriptable" value="true">
<param name="xxxxFormName" value="xxxxforms.xml"/>
<param name="Language" value="<bean:write name="formTestForm" property="language" />" />
<param name="cache_option" value="Plugin" />
<!-- The part in the comment tags invokes the Java Plug-in from Netscape -->
<comment>
<embed type="application/x-java-applet;version=1.5"
pluginspage="http://java.sun.com/products/plugin/1.5/plugin-install.html"
width="636" height="500"
CODE="org.xxxxApplet.class"
ARCHIVE="xxxxApplet.jar, iaik_jce.jar, iaikPkcs11Wrapper.jar, jnlp.jar, plugin.jar"
scriptable=true
xxxxFormName="xxxxforms.xml"/>
Language="<bean:write name="formTestForm" property="language" />"
cache_option="Plugin">
<noembed></noembed>
</embed>
</comment>
</object>
</pre>
This one almost works (under IE6, Win2000):
I get a dialog which asks me, if I would like to download
http://java.sun.com/products/plugin/autodl/ jinstall-1_5_0-windows-i586.cab
( from an unknown / not certified producer...)
I click yes - and nothing happens - no download.
Did I insert the wrong clsid, or is there another way for solving this ?
I appreciate any answer.

i read ur message .i also facing the same problem.i have to detect the whether jvm is installed or not if not then automatic downoad jvm

Similar Messages

  • To force JVM load classes already loaded

    How to force JVM, from java code, to load any classes already loaded, in order to reload a class modified in time the java program is runnig.

    You have to do it yourself by loading the classes from your own ClassLoader. Everytime you want to reload you classes just create a new instance of your ClassLoader and load the class again from that ClassLoader. This is how servlet and jsp engines like Tomcat do it.

  • Is there any way to force jvm load a new class?

    I write a standalone command line program. This program calls a function which I added to an existing class. the existing class has run run for a while by other processes.
    When I run my command line program, it can not find the function I added to the existing class. But I am 100% sure I have overwrote the existing class file with my new copy. It looks like the old class file is still in effect.
    How can I instruct the JVM to load my new class file, not using the old one(maybe it is cached in memory, and didn't get refreshed)
    Welcome any suggestions. I have run out of idea. (BTW: It is infeasible for me to restart the computer)

    Classes are loaded by an object called a ClassLoader which stores all the classes it loads in some kind of internal Map object. If you ask the same ClassLoader for a class it's already loaded it will given you the old one.
    The only way to drop a class is to drop the ClassLoader which loaded it and create a new one to load a new version.
    What you need to do is to put the class file in question is a directory or jar which isn't on the class path. And make sure that no class file of the same name exists on the classpath (because that will be loaded in preference).
    Then you create a java.net.URLClassLoader pointing to the directory or jar (use FIle.toURL() to turn a file into a URL).
    Then call loadClass on that to load your class file. Then you'll probably have to call newInstance() on the class object to create an instance.
    Of course, if new method signatures are added you'll have to access them using Method objects, since they won't be know about at compile time.

  • Forcing JVM to unload bytecode at runtime, to allow reloading of new class?

    Hi all,
    I would like to know a few things about classes once they are loaded. I believe a loaded class is nothing more than an Object in terms of its lifecycle, correct? If so, then to make a class "unload", you simply have to make sure there are no references to the class correct? So, what are the rules for making sure nothing references a class instance?
    Below I'll list a couple of examples. In Example 1 below, I have class A, B and C. Class A creates a instance variable to class B. In the constructor of class A, it creates a temporary class C, passing to it a reference of itself, which C stores in a local variable. Now, in class C, since it is only created in a Constructor (or method) in class A, it goes out of scope at the end of the method/constructor, and thus its reference to class A is no longer any good, correct? Therefore, at this point, there are no references to class A and thus setting A = null (assuming a "central" class loads class A, B and C like a plugin engine would do) should properly dispose of class A. I know, the GC does NOT necessarily remove the class A bytecode from memory right away. So I guess a question here is in need. When does the class A bytecode actually get removed from the JVM memory, in such a way that a "new" call to create it would effectively tell the JVM to have to open the .class file, read its byte code and create a new instance of it in memory? The purpose of these questions is to figure out how, at runtime to reload a class AND get the actual new version of the code. The reason is, if you do everything possible to unload a class, but the JVM doesn't discard the bytecodes of the class before you tell it to load the same class, it will use the "old" bytecode it has in memory, rather than load the bytecode off the HD or URL location and discard the old bytecode. I need a way to get the JVM to discard the bytecode to reload a newer version of a class. But the reason for the examples below is to also help me understand how a class is actually permitted to be unloaded by the JVM. This is also so that the JVM is not wasting memory with multiple versions of the same class, if it even does that. I want to definitely reclaim any memory used by the older version of the class, before loading a newer version.
    So, in example 2 below, the situation changes slightly. A is now keeping a reference to the class C it creates in the constructor. Because C also creates a reference back to A since the A instance is passed in to C's constructor, A can now not be freed and made available for unloading until the reference to A in C is set to null, is this correct? I seem to lack basic understanding of how the whole reference counting thing works for objects and when a JVM can actually unload the bytecode of an object, thus freeing up memory. I suppose a good book on the JVM would clear this up, but I am hoping one of you reading this will know and can help me understand this process. So in this example, am I correct in that the C reference to A must be set to null, then the A instance must be set to null to tell the JVM there is no more use for the A class? I do realize that if other classes also use A, that the bytecode for A would be kept in memory. Let's assume this is the only use of A, B and C (and looking at the examples, B serves no real purpose anyway, but I already wrote it down so I'll leave it).
    So once again, my goal here is to understand the lifecycle of an object, specifically a Class object (they are one and the same, correct, in terms of lifecycle?), and when the JVM actually removes the bytecode from memory so that if a new version of the same class is now available at runtime, the JVM loads the new bytecode into memory.
    Thanks very much for taking the time to read this and reply.
    Example 1:
    class A
    B b = new B();
    public A()
    C c = new C(this);
    class B
    public B()
    class C
    A a = null;
    public C(A a)
    this.a = a;
    Example 2:
    class A
    B b = new B();
    C c = null;
    public A()
    c = new C(this);
    class B
    public B()
    class C
    A a = null;
    public C(A a)
    this.a = a;
    }

    Cross post (numerous times.)
    http://forum.java.sun.com/thread.jsp?thread=292465&forum=37&message=1152136

  • Force jvm to use UTF8 encoding for properties?

    hi,
    my problem is i cannot display turkish characters that are retrieved from properties file [(key, value) pair].The value may contain turkish characters.
    reference : java toc
    "..When saving properties to a stream or loading them from a stream, the ISO 8859-1 character encoding is used. For characters that cannot be directly represented in this encoding, Unicode escapes are used; however, only a single 'u' character is allowed in an escape sequence..."
    instead of iso 8859-1 or directly representing non-conforming characters in the form of UTF8 encoding , i want to use UTF8 . i dont know is there a way to enforce the encoding to UTF8 .is it possible ?
    note : javac -encoding or java -Djava.encoding has no use..
    thanx in advance

    Hi,
    I did a lot of testing with the method of my last posting and ran into the following problem: each character, that is not available in iso 8859-1 is discarded and replaced by a '?'. So when e.g. loading arabic characters you get just "?????" as your property's value.
    The only possibility to enable other encodings of Property Files is to replace the encoding of the reader to one that is better suited. So I created a customized class, that inherits from java.util.Properties, and supports loading and storing to any encoding. This class I give here:
    * Properties.java
    * Created on 11. Juni 2003, 14:08
    package xy;
    * The <code>Properties</code> class represents a persistent set of
    * properties. The <code>Properties</code> can be saved to a stream
    * or loaded from a stream. Each key and its corresponding value in
    * the property list is a string.
    * <p>
    * A property list can contain another property list as its
    * "defaults"; this second property list is searched if
    * the property key is not found in the original property list.
    * <p>
    * Because <code>Properties</code> inherits from <code>Hashtable</code>, the
    * <code>put</code> and <code>putAll</code> methods can be applied to a
    * <code>Properties</code> object.  Their use is strongly discouraged as they
    * allow the caller to insert entries whose keys or values are not
    * <code>Strings</code>.  The <code>setProperty</code> method should be used
    * instead.  If the <code>store</code> or <code>save</code> method is called
    * on a "compromised" <code>Properties</code> object that contains a
    * non-<code>String</code> key or value, the call will fail.
    * <p>
    * <a name="encoding"></a>
    * When saving properties to a stream or loading them from a stream, the
    * ISO 8859-1 character encoding can be used. For characters that cannot be directly
    * represented in this encoding,
    * <a href="http://java.sun.com/docs/books/jls/html/3.doc.html#100850">Unicode escapes</a>
    * are used; however, only a single 'u' character is allowed in an escape sequence.
    * The native2ascii tool can be used to convert property files to and from
    * other character encodings.
    * </p>
    * <p>
    * This Properties class is an extension of the default properties class an supports the
    * loading and saving from and into other encodings than ISO 8859-1.
    * </p>
    * @see <a href="../../../tooldocs/solaris/native2ascii.html">native2ascii tool for Solaris</a>
    * @see <a href="../../../tooldocs/win32/native2ascii.html">native2ascii tool for Windows</a>
    * @author  Gregor Kappler, extended the class of JDK by
    * @author  Arthur van Hoff
    * @author  Michael McCloskey
    * @version 1.64, 06/26/00
    * @since   JDK1.0
    public class Properties extends java.util.Properties {
        private static final String keyValueSeparators = "=: \t\r\n\f";
        private static final String strictKeyValueSeparators = "=:";
        private static final String specialSaveChars = "=: \t\r\n\f#!";
        private static final String whiteSpaceChars = " \t\r\n\f";
        /** Creates a new instance of Properties */
        public Properties() {
         * Reads a property list (key and element pairs) from the input stream.
         * The stream is assumed to be in the specified character encoding.
         * <p>
         * Every property occupies one line of the input stream. Each line
         * is terminated by a line terminator (<code>\n</code> or <code>\r</code>
         * or <code>\r\n</code>). Lines from the input stream are processed until
         * end of file is reached on the input stream.
         * <p>
         * A line that contains only whitespace or whose first non-whitespace
         * character is an ASCII <code>#</code> or <code>!</code> is ignored
         * (thus, <code>#</code> or <code>!</code> indicate comment lines).
         * <p>
         * Every line other than a blank line or a comment line describes one
         * property to be added to the table (except that if a line ends with \,
         * then the following line, if it exists, is treated as a continuation
         * line, as described
         * below). The key consists of all the characters in the line starting
         * with the first non-whitespace character and up to, but not including,
         * the first ASCII <code>=</code>, <code>:</code>, or whitespace
         * character. All of the key termination characters may be included in
         * the key by preceding them with a \.
         * Any whitespace after the key is skipped; if the first non-whitespace
         * character after the key is <code>=</code> or <code>:</code>, then it
         * is ignored and any whitespace characters after it are also skipped.
         * All remaining characters on the line become part of the associated
         * element string. Within the element string, the ASCII
         * escape sequences <code>\t</code>, <code>\n</code>,
         * <code>\r</code>, <code>\\</code>, <code>\"</code>, <code>\'</code>,
         * <code>\  </code>  (a backslash and a space)
         * are recognized and converted to single
         * characters. Moreover, if the last character on the line is
         * <code>\</code>, then the next line is treated as a continuation of the
         * current line; the <code>\</code> and line terminator are simply
         * discarded, and any leading whitespace characters on the continuation
         * line are also discarded and are not part of the element string. <br>
         * Note:
         * <code>\u</code><i>xxxx</i> is not supported if the encoding is not
         * ISO 8859-1!
         * <p>
         * As an example, each of the following four lines specifies the key
         * <code>"Truth"</code> and the associated element value
         * <code>"Beauty"</code>:
         * <p>
         * <pre>
         * Truth = Beauty
         *     Truth:Beauty
         * Truth               :Beauty
         * </pre>
         * As another example, the following three lines specify a single
         * property:
         * <p>
         * <pre>
         * fruits                    apple, banana, pear, \
         *                                  cantaloupe, watermelon, \
         *                                  kiwi, mango
         * </pre>
         * The key is <code>"fruits"</code> and the associated element is:
         * <p>
         * <pre>"apple, banana, pear, cantaloupe, watermelon, kiwi, mango"</pre>
         * Note that a space appears before each <code>\</code> so that a space
         * will appear after each comma in the final result; the <code>\</code>,
         * line terminator, and leading whitespace on the continuation line are
         * merely discarded and are <i>not</i> replaced by one or more other
         * characters.
         * <p>
         * As a third example, the line:
         * <p>
         * <pre>cheeses
         * </pre>
         * specifies that the key is <code>"cheeses"</code> and the associated
         * element is the empty string.<p>
         * @param      inStream   the input stream.
         * @exception  IOException  if an error occurred when reading from the
         *               input stream.
        public synchronized void load(java.io.InputStream inStream, java.nio.charset.Charset encoding) throws java.io.IOException {
            if (encoding.equals (encoding.forName("8859_1"))) {
                super.load (inStream);
                return;
            java.io.BufferedReader in = new java.io.BufferedReader(new java.io.InputStreamReader(inStream, encoding));
         while (true) {
                // Get next line
                String line = in.readLine();
                if (line == null)
                    return;
                if (line.length() > 0) {
                    // Continue lines that end in slashes if they are not comments
                    char firstChar = line.charAt(0);
                    if ((firstChar != '#') && (firstChar != '!')) {
                        while (continueLine(line)) {
                            String nextLine = in.readLine();
                            if(nextLine == null)
                                nextLine = "";
                            String loppedLine = line.substring(0, line.length()-1);
                            // Advance beyond whitespace on new line
                            int startIndex=0;
                            for(startIndex=0; startIndex<nextLine.length(); startIndex++)
                                if (whiteSpaceChars.indexOf(nextLine.charAt(startIndex)) == -1)
                                    break;
                            nextLine = nextLine.substring(startIndex,nextLine.length());
                            line = new String(loppedLine+nextLine);
                        // Find start of key
                        int len = line.length();
                        int keyStart;
                        for(keyStart=0; keyStart<len; keyStart++) {
                            if(whiteSpaceChars.indexOf(line.charAt(keyStart)) == -1)
                                break;
                        // Blank lines are ignored
                        if (keyStart == len)
                            continue;
                        // Find separation between key and value
                        int separatorIndex;
                        for(separatorIndex=keyStart; separatorIndex<len; separatorIndex++) {
                            char currentChar = line.charAt(separatorIndex);
                            if (currentChar == '\\')
                                separatorIndex++;
                            else if(keyValueSeparators.indexOf(currentChar) != -1)
                                break;
                        // Skip over whitespace after key if any
                        int valueIndex;
                        for (valueIndex=separatorIndex; valueIndex<len; valueIndex++)
                            if (whiteSpaceChars.indexOf(line.charAt(valueIndex)) == -1)
                                break;
                        // Skip over one non whitespace key value separators if any
                        if (valueIndex < len)
                            if (strictKeyValueSeparators.indexOf(line.charAt(valueIndex)) != -1)
                                valueIndex++;
                        // Skip over white space after other separators if any
                        while (valueIndex < len) {
                            if (whiteSpaceChars.indexOf(line.charAt(valueIndex)) == -1)
                                break;
                            valueIndex++;
                        String key = line.substring(keyStart, separatorIndex);
                        String value = (separatorIndex < len) ? line.substring(valueIndex, len) : "";
                        // Convert then store key and value
                        key = loadConvert(key);
                        value = loadConvert(value);
                        put(key, value);
         * Writes this property list (key and element pairs) in this
         * <code>Properties</code> table to the output stream in a format suitable
         * for loading into a <code>Properties</code> table using the
         * <code>load</code> method.
         * The stream is written using the ISO 8859-1 character encoding.
         * <p>
         * Properties from the defaults table of this <code>Properties</code>
         * table (if any) are <i>not</i> written out by this method.
         * <p>
         * If the header argument is not null, then an ASCII <code>#</code>
         * character, the header string, and a line separator are first written
         * to the output stream. Thus, the <code>header</code> can serve as an
         * identifying comment.
         * <p>
         * Next, a comment line is always written, consisting of an ASCII
         * <code>#</code> character, the current date and time (as if produced
         * by the <code>toString</code> method of <code>Date</code> for the
         * current time), and a line separator as generated by the Writer.
         * <p>
         * Then every entry in this <code>Properties</code> table is written out,
         * one per line. For each entry the key string is written, then an ASCII
         * <code>=</code>, then the associated element string. Each character of
         * the element string is examined to see whether it should be rendered as
         * an escape sequence. The ASCII characters <code>\</code>, tab, newline,
         * and carriage return are written as <code>\\</code>, <code>\t</code>,
         * <code>\n</code>, and <code>\r</code>, respectively. Characters less
         * than <code>\u0020</code> and characters greater than
         * <code>\u007E</code> are written as <code>\u</code><i>xxxx</i> for
         * the appropriate hexadecimal value <i>xxxx</i>. Leading space characters,
         * but not embedded or trailing space characters, are written with a
         * preceding <code>\</code>. The key and value characters <code>#</code>,
         * <code>!</code>, <code>=</code>, and <code>:</code> are written with a
         * preceding slash to ensure that they are properly loaded.
         * <p>
         * After the entries have been written, the output stream is flushed.  The
         * output stream remains open after this method returns.
         * @param   out      an output stream.
         * @param   header   a description of the property list.
         * @exception  IOException if writing this property list to the specified
         *             output stream throws an <tt>IOException</tt>.
         * @exception  ClassCastException  if this <code>Properties</code> object
         *             contains any keys or values that are not <code>Strings</code>.
         * @exception  NullPointerException  if <code>out</code> is null.
         * @since 1.2
        public synchronized void store(java.io.OutputStream out, java.nio.charset.Charset encoding, String header)
        throws java.io.IOException
            if (encoding.equals (encoding.forName("8859_1"))) {
                super.store (out,header);
                return;
            java.io.BufferedWriter awriter;
            awriter = new java.io.BufferedWriter(new java.io.OutputStreamWriter(out,encoding));
            if (header != null)
                writeln(awriter, "#" + header);
            writeln(awriter, "#" + new java.util.Date().toString());
            for (java.util.Enumeration e = keys(); e.hasMoreElements();) {
                String key = (String)e.nextElement();
                String val = (String)get(key);
                key = saveConvert(key, true);
             /* No need to escape embedded and trailing spaces for value, hence
              * pass false to flag.
                val = saveConvert(val, false);
                writeln(awriter, key + "=" + val);
            awriter.flush();
         * changes special saved chars to their original forms
        private String loadConvert (String theString) {
            char aChar;
            int len = theString.length();
            StringBuffer outBuffer = new StringBuffer(len);
            for(int x=0; x<len; ) {
                aChar = theString.charAt(x++);
                if (aChar == '\\') {
                    aChar = theString.charAt(x++);
                    if (aChar == 't') aChar = '\t';
                    else if (aChar == 'r') aChar = '\r';
                    else if (aChar == 'n') aChar = '\n';
                    else if (aChar == 'f') aChar = '\f';
                    else if (aChar == '\\') aChar = '\\';
                    else if (aChar == '\"') aChar = '\"';
                    else if (aChar == '\'') aChar = '\'';
                    else if (aChar == ' ') aChar = ' ';
                    else
                        throw new IllegalArgumentException ("error in Encoding: '\\"+aChar+" not supported");
                    outBuffer.append(aChar);
                } else
                    outBuffer.append(aChar);
            return outBuffer.toString();
         * writes out any of the characters in specialSaveChars
         * with a preceding slash
        private String saveConvert(String theString, boolean escapeSpace) {
            int len = theString.length();
            StringBuffer outBuffer = new StringBuffer(len*2);
            for(int x=0; x<len; x++) {
                char aChar = theString.charAt(x);
                switch(aChar) {
              case ' ':
                  if (x == 0 || escapeSpace)
                   outBuffer.append('\\');
                  outBuffer.append(' ');
                  break;
                    case '\\':outBuffer.append('\\'); outBuffer.append('\\');
                              break;
                    case '\t':outBuffer.append('\\'); outBuffer.append('t');
                              break;
                    case '\n':outBuffer.append('\\'); outBuffer.append('n');
                              break;
                    case '\r':outBuffer.append('\\'); outBuffer.append('r');
                              break;
                    case '\f':outBuffer.append('\\'); outBuffer.append('f');
                              break;
                    default:
    //                    if ((aChar < 0x0020) || (aChar > 0x007e)) {
    //                        outBuffer.append(aChar);
    //                    } else {
                            if (specialSaveChars.indexOf(aChar) != -1)
                                outBuffer.append('\\');
                            outBuffer.append(aChar);
            return outBuffer.toString();
         * Returns true if the given line is a line that must
         * be appended to the next line
        private boolean continueLine (String line) {
            int slashCount = 0;
            int index = line.length() - 1;
            while((index >= 0) && (line.charAt(index--) == '\\'))
                slashCount++;
            return (slashCount % 2 == 1);
        private static void writeln(java.io.BufferedWriter bw, String s) throws java.io.IOException {
            bw.write(s);
            bw.newLine();
    }I hope you can use this class for your needs as I can. For me it supports any characters so far. If you find some bugs on it, let me know
    Regards,
    Gregor Kappler

  • JVM Crash OutOfMemory Chunk::new Out Of swap Space

    Hi !
    We are currently experiencing a problem on both JRE-1.5.0_15 and JRE-1.6.0_7. We have a JEE application running with EJB2 on JBoss 423 that we have migrated to EJB3 on JBoss5. The server is Windows 2003 SP2 server running in 32 bits mode (with /3GB option in boot.ini) is set up with 4GB memory and 4GB paging.
    Before migration, this app runs perfectly on JBoss 423 compiled on JDK5 with runtime JRE5 and JRE6 (not at the same time though) up to 50 simulatneous users on a single JBoss instance.
    After migration to EJB3, we are experiencing this error as of 5 simultaneous users :
    # java.lang.OutOfMemoryError: requested 2292728 bytes for Chunk::new. Out of swap space?
    Current thread (0x54092800):  JavaThread "CompilerThread0" daemon [_thread_in_native, id=4092, stack(0x54280000,0x542d0000)]
    Stack: [0x54280000,0x542d0000]
    [error occurred during error reporting (printing stack bounds), id 0x80000001]
    Current CompileTask:
    C2:4692      com.mycompany.myproduct ...These are our JVM options for memory:
    jvm_args: -Dprogram.name=pdm.bat -Xms1024m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=256m -XX:+DisableExplicitGCWe don't have this problem if we force JVM options so that it only runs in interpreted mode (-Xint). We also have created a file with the list of methods we want to keep out of the JIT. With this option, the server runs longer but it eventualy crashes.
    So we reckon this is a JIT issue on the App Server. I have posted a thread on JBoss forum but they recommended me to open one here.
    So I have modified the JVM options to increase the Perm size :
    jvm_args: -Dprogram.name=pdm.bat -Xms1024m -Xmx1024m -XX:PermSize=512m -XX:MaxPermSize=512m -XX:+Dis
    ableExplicitGCIn that case, JBoss crashes at startup time :
    # An unexpected error has been detected by Java Runtime Environment:
    # java.lang.OutOfMemoryError: requested 35608 bytes for Chunk::new. Out of swap space?
    #  Internal Error (allocation.cpp:218), pid=5756, tid=8176
    #  Error: Chunk::new
    # Java VM: Java HotSpot(TM) Server VM (10.0-b23 mixed mode windows-x86)
    # If you would like to submit a bug report, please visit:
    #   http://java.sun.com/webapps/bugreport/crash.jsp
    # The crash happened outside the Java Virtual Machine in native code.
    # See problematic frame for where to report the bug.
    ---------------  T H R E A D  ---------------
    Current thread (0x64142800):  JavaThread "CompilerThread0" daemon [_thread_in_native, id=8176, stack(0x64330000,0x64380000)]
    Stack: [0x64330000,0x64380000]
    [error occurred during error reporting (printing stack bounds), id 0x80000001]
    Current CompileTask:
    C2:1420  !   org.jboss.ejb3.Ejb3Deployment.deployElement(Ljava/io/InputStream;Lorg/jboss/ejb3/Ejb3Ha
    ndlerFactory;Ljavax/naming/InitialContext;)V (66 bytes)
    Heap
    PSYoungGen      total 217472K, used 176224K [0x539d0000, 0x639d0000, 0x639d0000)
      eden space 170432K, 97% used [0x539d0000,0x5dbec148,0x5e040000)
      from space 47040K, 21% used [0x60be0000,0x615dc210,0x639d0000)
      to   space 44672K, 0% used [0x5e040000,0x5e040000,0x60be0000)
    PSOldGen        total 786432K, used 200494K [0x239d0000, 0x539d0000, 0x539d0000)
      object space 786432K, 25% used [0x239d0000,0x2fd9b9b0,0x539d0000)
    PSPermGen       total 524288K, used 39978K [0x039d0000, 0x239d0000, 0x239d0000)
      object space 524288K, 7% used [0x039d0000,0x060da870,0x239d0000)So I have reduced heap size
    jvm_args: -Dprogram.name=pdm.bat -Xms768m -Xmx768m -XX:PermSize=512m -XX:MaxPermSize=512m -XX:+Dis
    ableExplicitGCand then it works much longer (can reach 20 users ...) before, again, eventually crashing.
    I have reported the error to http://java.sun.com/webapps/bugreport/crash.jsp but I haven't heard from it as yet ...
    Any recommendation to fix this issue ? Many thanks in advance for your help !

    I recently experienced a similar issue on HP-UX 11iv2 with WebLogic 9.1 and HP JDK 1.5, and we were also using the CMS (Concurrent Mark Sweep) GC. I was able to resolve the issue by forcing the size of the Survivor Area using the -XX:SurvivorRatio=n parameter. By setting this to a value lower than the default (I think 25) it forces the Survivor Area to be a larger percentage of the New Generation, and hence larger in size. I found that I needed at least 8MB, but we have a pretty large application, so you might get by with significantly less.
    As it stands, your New Gen will be 25% (default, I think) of you Xms, and I think the default SurvivorRatio is 25. The tricky part is the calculation using the SurvivorRatio. Since there are two Survivor Areas, if -XX:SurvivorRatio=25, then each Survivor Area will be 1/27 of New Gen. Anyhow, it's confusing, but you can easily verify these numbers online, and do the math yourself, but hopefully you get the point.
    Obviously, I can't guarantee anything, but you might want to give it a try since my symptoms were extremely similar.

  • How to use different (not local) user for NTLM auth in Authenticator?

    Hi All,
    I use custom authenticator to provide user / passwords to connect to .NET Web Services. I overloaded function getPasswordAuthentication() that returns right user / password combination for the requested URL. It all works perfectly for many kinds of HTTP connections: basic, ntlm, ntlm-v2, through proxy, ssl, etc.
    My problem is that during NTLM authentication from Windows computers JVM uses credentials of the currently logged in domain user instead of calling Authenticator to get other user / password provided by the user. In case when local user credentials fail to authenticate, JVM calls my Authenticator but in case authentication is successful it does uses local domain user and never calls my Authenticator. The issue is when this local domain user does not have enough permissions but authenticated correctly there is no way to supply JVM with another user to begin with.
    What can I do to force JVM to ignore local domain user and to use Authenticator to collect credentials during NTLM authentication requested by the server in case the software runs on a Windows box with currently logged in domain user?
    I am looking for the answer for a long time already but found only questions and suggestions to switch server from NTLM authentication which is not an option for me. From the developer's view it has to be pretty simple change for Sun to do in Java networking API. Is there any way to escalate it to Sun support? Maybe there is some property in some JRE patch level that allows to do this?
    Thank you very much!
    Mark

    Thank you for the reply. I have kind of an opposite problem. I can perfectly connect from Linux computers to Microsoft IIS servers using NTLM or even NTLMv2 authentication. My problem is connecting from Windows client computer joined to the same domain as IIS server with the domain user logged in to this computer. In this case this user account will be used in any HTTP connections I initiate to this IIS server instead of the one that I want to supply in my custom Authenticator.
    I have graphical interactive application that connects to IIS Server. When user runs it and connects to IIS server I want to prompt for the user/password regardless whether JRE may correctly authenticate using current user account credentials. The current user may not have enough permissions in IIS application so I want to use different user to login to IIS application.
    Thank you anyway,
    Mark

  • How to load all the classes in a JAR file at runtime?

    Any clues o:
    "How can I force JVM to load all the classes in a specified JAR at once?"
    Thanx!
    -Rajeev

    Well I was thinking may be there exists an option with "java", when I
    am starting an application from a jar file, I could force it to load all
    the classes in the JAR. I don't want to do it programically. Is there such
    an option available?? Or in other words can I ask JVM to not do the dynamic
    loading for the JAR??
    Thanx.
    List all JarEntries and convert the paths to fully
    qualified class files
    e.g file in jar
    [1] /com/mycompany/proj/X.class
    should become
    [2] com.mycompany.proj.X
    then for each entry issue
    Class.forName( [2] );

  • Hsperfdata_uid not getting created

    Hi, I am trying to use jstat and jmap utilities to get the snapshot of the jvm. It is working fine in dev and staging env but it doesn't work in production. All three on linux.
    The error is could not find jvmId. The main difference i found is that the on prod jvm is not creating a /tmp/hsperfdata_uid folder but on dev env i can see the files created under hsperfdata_uid for each jvm.
    I am not able to figure out the difference between these settings in these JVMs. I tried using -XX:+UsePerfData on that jvm but still no output.
    let me know if you guys had any such issues.
    thanks,

    798009 wrote:
    I am not sure if i can restart but i checked the permissions for the folder and it looks all fine. Is there a flag or something that we can add to force JVM to create these files ?The instrumented HotSpot JVM ships with J2SE 1.4.2 and later, providing always-on instrumentation. The HotSpot JVM, verion 1.4.1, also includes the the instrumentation, but it must be enabled with the -XX:+UsePerfData flag.
    So you shouldn't need to do anything assuming you are using a HotSpot JVM > 1.4.2. There is an exception if the file system type for the temporary directory does not support Persistent Access Control List, in which case the files are not created for security reasons (can bypass this check with PerfBypassFileSystemCheck).

  • How many ways are there to get the Width/Height of an image ?

    I am currently using the following code to get the width and hight of an image :
    BufferedImage Buffered_Image=ImageIO.read(new File(Image_Path));
    int Image_Width=Buffered_Image.getWidth();
    int Image_Height=Buffered_Image.getHeight();I don't need to get the image (*.jpg, *.gif, *.png), just want to know it's dimensions. I wonder how many other ways are available to do the same thing in a Java application ?
    Frank

    Ni_Min wrote:
    That's what I thought. I am asking because I hit a wall and am trying to find a different approach.Yeah, if you only have one file type you can probably write the code to read the header in 20 min.
    I packed my programs into an executable Jar file which I can run and access images on my C:\ drive, everything worked fine until I tried to experiment with something new. I know that I can force JVM to pre-load all my java classes just after it starts, so I deleted the jar right after the program pre-loaded all my classes and tried to see if it would work, but now I get a null pointer error when it tried to get the width/height of an existing image, because ImageIO.read return null. ( The same image is still on my C:\ drive )Sounds like a strange thing you're doing here. What's the point of this?
    So I wonder why it makes a difference after I deleted the jar, what was the problem ( or do I need to pre-load another class related to ImageIO.read ? ), and maybe if I use something else other than the ImageIO.read to get the width/height, I can bypass the problem.I dunno why you need to do this preload stuff and/or delete anything. I'd say leave the JVM and the app alone if possible.

  • Java.io.IOException: HTTPS hostname wrong

    Hello
    I was trying to open a connection to secure URL and post content to it.
    I got the following exception:
    java.io.IOException: HTTPS hostname wrong: should be <165.112.121.195>
    at sun.net.www.protocol.https.HttpsClient.b(DashoA12275)
    Its apparantly because the connection is
    com.sun.net.ssl.internal.www.protocol.https.DelegateHttpsURLConnection
    not
    sun.net.ssl.www.protocol.DelegateHttpsURLConnection
    I tried setting the system property
    System.setProperty("java.protocol.handler.pkgs","sun.net.www.protocol");
    to force JVM to use the newer Delegate.
    Its still doent work. I use JDK 1.4.2_05. I deploy my application in OC4J 9.0.4
    Interesting thing is, I use this code in two different applications, it works in
    one and doen't work in one. Both containers use same JDK. Both are OC4J
    containers.
    Any thoughts? I would appreciate.
    thanks
    Raghavan

    Do you mean?
    System.setProperty("java.protocol.handler.pkgs","sun.net.ssl.www.protocol");

  • HT4859 How many ways are there to get to Setup Assistant?

    I'd like to restore all the iPads we have in the classroom to a set configuration before each class.  Originally, the iCloud backup sounded like it would do the trick, however, from what I've been able to learn so far, iCloud backup behaves more like Recovery from Fatal error than either the Time Machine available on Macs and Deep Freeze, which is what we use for our Windows system.
    iCloud makes it easy to backup, why don't they give us an easy way to restore one of the backups?  As far as I can tell, if I want to restore from an iCloud backup, I have to use the Erase All Content and Settings in the Reset area of the General Settings option. Am I missing something are is this "solution" really that poorly designed?

    Ni_Min wrote:
    That's what I thought. I am asking because I hit a wall and am trying to find a different approach.Yeah, if you only have one file type you can probably write the code to read the header in 20 min.
    I packed my programs into an executable Jar file which I can run and access images on my C:\ drive, everything worked fine until I tried to experiment with something new. I know that I can force JVM to pre-load all my java classes just after it starts, so I deleted the jar right after the program pre-loaded all my classes and tried to see if it would work, but now I get a null pointer error when it tried to get the width/height of an existing image, because ImageIO.read return null. ( The same image is still on my C:\ drive )Sounds like a strange thing you're doing here. What's the point of this?
    So I wonder why it makes a difference after I deleted the jar, what was the problem ( or do I need to pre-load another class related to ImageIO.read ? ), and maybe if I use something else other than the ImageIO.read to get the width/height, I can bypass the problem.I dunno why you need to do this preload stuff and/or delete anything. I'd say leave the JVM and the app alone if possible.

  • Is there any way a member can leave a cluster ?

    Hi,
    I have a java client and a cache server running , the function of java client is that it should get a Named cache and write something to the cache.
    Once this is done the client (which now is a member in a cluster) should leave the cluster and continue with other functions in the client.
    Is there anyway we could make the client leave the cluster after performing required action.
    Any help will be highly appreciated.
    Thanks.

    Hi,
    Alternatively to Coherence*Extend you can force JVM to leave a cluster.
    CacheFactory.getCluster().shutdown();This line will forc JVM to leave a cluster, and all instances of NamedCache will become invalid.
    To rejoin cluster later just call
    CacheFactory.getCache(...);And it will automatically join cluster again before returning you fresh instance of NamedCache.
    Interesting thing is what you can connect to different cluster this way, just adjust cluster config before rejoining cluster (see Re: Multiple clusters on same JVM
    PS I'd better keep your client node storage disabled for this case

  • How can I force new JVM for new browser instance?

    I have an applet with some static variables.
    When I run the applet in multiple browser instances that have been opened by clicking on the IE icon there are no problems because each browser instance has its own JVM.
    However if I after downloading the applet I open a new browser by clicking CTRL + N or going to File->New Window, the new browser uses the same JVM as the original browser which causes problems with my static variables.
    So I'm wondering is there a way to force the new browser instances to always have their own JVM instance?
    Cheers,
    D

    No. Internet Explorer is trash. CTRL-N (or File > New > Window) causes so many more problems, e.g. sharing cookies and therefore also sharing session IDs (!).

  • Force start applet in Sun's JVM when MSJVM is default

    Hi,
    how do I make my applet get started in Sun's JVM although Microsoft's JVM is set as default. All my clients use IExplorer and some have only Sun's JVM and others have both Sun and Microsoft with mixed settings on which one is set as default.
    Using the OBJECT-tags clsid I know I can force it to a specific JVM but it doesn't change the JVM automatically but instructs the user to do it...
    any way around this?

    If it's been asked so many times, howcome you cannot give me an answer?
    I was asking for a way to FORCE sun's JVM to start although MSJVM is set as default in Iexplorer running on XP. The machines have Sun's JVM installed as well but the company I'm working for doesn't have them set as default and would need an applet to run under it anyway from the client's machines...

Maybe you are looking for

  • ISE 1.2 SNS-3415 NIC Bonding / Teaming

    Hello, I have installed the SNS-3415 with ISE 1.2 and i'm trying to setup redundnacy (Team) nic modes for the authentication requests and not for management purpose. The tests showed that when the one interface was unpluged everything was lost and no

  • Syncing Addresses with iCloud and an older iPod Touch

    I've got my iMac set up to sync Address Book with iCloud.  I've also got a 2nd generation iPod Touch that cannot run iO5 so it cannot communicate with iCloud.  When I sync the iPod with the iMac if I don't turn off the "Sync Address Book Contacts" op

  • PXE Imaging & Licence Server Comms

    Hi Guys, long time forum reader, but first time poster - therefore please overlook the low post count. We have a ZCM 10.3.3 setup, and i'm struggling to acheive Imaging connection. Due to a lack of IP addresses in our ZCM subnet (DMZ) we have created

  • Response codes

    hi, could you tell me what does this response code mean? code: 64 21 where can i find every response codes meaning? I look for them in some javacard tutorial but i can�t find every codes. thanks

  • Remove Programs

    I was wondering if anyone knew how to remove programs from your computer entirely. I dont mean just dragging it into your trash and deleting.