Couldn't I use Chinese language in properties stream ?

Hi , everyone !
Couldn't I use Chinese language in properties ?
I use properties manage program attributes , but the value which I type in Chinese language can not load
correctly !
Why ?

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

Similar Messages

  • How to text using chinese language?

    I actually have a Nokia 6500 slide. Recently I found out that I can't actually send a text messages using chinese language (mandarin). However, I could receive msges in mandarin. I tried changing in the 'Language Setting', however only English, Filipino and Vietnamese are available. Is there anyway I can install the language without formatting my phone?
    Hope someone can help me on this. Thanks!

    Hi,
    To get the Chinese language installed in the device, visit a nearby Nokia Care Point in your city. Language packs are region dependent.
    "If this post helped you solve your query, please do click the KUDOS tab."

  • Chinese Language import issue

    Hi All,
    Need to import Chinese Language in 4.6C. Not sure if I am doing a mistake. Any help would be appreciated.
    What I did was:
    1. I first added ZH & ZF in SE38->RSCPINST and did the simulate and activate actions.
    2. Then I imported the Chinese ZH Alone in SMLT and English as supplement (Since the language CD did not have ZF and I mistakenly added it in RSCPINST).
    3. Now I go back to SE38->RSCPINST and delete ZF because I did not import it and click Simulate and then activate it does not do anything. It just gives me the following messages and does not go further.
    <b>Do you want to change the databases entries?
    Installed languages(in profiles):
    ZH Chinese                     8400
    DE German                      1100
    EN English                     1100
    JA Japanese                    8000
    The country code (TCP0D):
        Latin1 or MDMP
    Necessary code pages (TCPDB):
    8400 Simplified Chinese
    1100 SAP internal, like ISO 8859-1        (00697/00819)
    8000 Shift JIS
    TCPDB contains more than one code page!
    1. Only the common subset of selected code pages can be used for global data.
    2. Please read note 73606 on our Online Support System (OSS):
    ftp://sapserv3/home/ftp/general/R3server/abap/note.0073606/document/maindocument.doc
    Verify if following locales are installed on operating system:
    coral_C13_00        Chinese_CHN.936
                        English_United States.1252
                        German_Germany.1252
                        Japanese_Japan.932
    Profile parameters
    Profile parameter                        Check result
                                      coral_C13_00
                                           O.K.
       Go back to the selection screen</b>
    Even I click Activate the same thing happens and I am not able to login using Chinese language. What have I done wrong???
    Please help.
    Regards,
    kp

    issue resolved. thanks. it was OS locales issue.

  • Chinese Language import issue - TCPDB

    Hi All,
    Need to import Chinese Language in 4.6C. Not sure if I am doing a mistake. Any help would be appreciated.
    What I did was:
    1. I first added ZH & ZF in SE38->RSCPINST and did the simulate and activate actions.
    2. Then I imported the Chinese ZH Alone in SMLT and English as supplement (Since the language CD did not have ZF and I mistakenly added it in RSCPINST).
    3. Now I go back to SE38->RSCPINST and delete ZF because I did not import it and click Simulate and then activate it does not do anything. It just gives me the following messages and does not go further.
    <b>Do you want to change the databases entries?
    Installed languages(in profiles):
    ZH Chinese                     8400
    DE German                      1100
    EN English                     1100
    JA Japanese                    8000
    The country code (TCP0D):
        Latin1 or MDMP
    Necessary code pages (TCPDB):
    8400 Simplified Chinese
    1100 SAP internal, like ISO 8859-1        (00697/00819)
    8000 Shift JIS
    TCPDB contains more than one code page!
    1. Only the common subset of selected code pages can be used for global data.
    2. Please read note 73606 on our Online Support System (OSS):
    ftp://sapserv3/home/ftp/general/R3server/abap/note.0073606/document/maindocument.doc
    Verify if following locales are installed on operating system:
    coral_C13_00        Chinese_CHN.936
                        English_United States.1252
                        German_Germany.1252
                        Japanese_Japan.932
    Profile parameters
    Profile parameter                        Check result
                                      coral_C13_00
                                           O.K.
       Go back to the selection screen</b>
    Even I click Activate the same thing happens and I am not able to login using Chinese language. What have I done wrong???
    Please help.
    Regards,
    kp

    Hi Henry,
    I did do that before itself. But jus a small mistake in that. I installed only simple chinese and OS locale for chinese. But then I selected all locales in regional settings and installed. Now it is working fine.
    Thanks for your response.
    Regards,
    kp

  • How can I restored the trace pad input for Chinese Language?

    I am using Chinese language for my MacBook Pro. I usually use the trace pad to input the Chinese?But, after I install OS lion, the trace pad seems working, but all the words can not input into the Applications(Safari...). And I tried to unselect the input option of trace pad. It is gone! I tried to restore but I can not? Can please anyone tell me how to restore the Trace Pad input option back from language input setting? Thanks!

    https://discussions.apple.com/thread/3189418

  • HT201301 how about the Chinese language doc. Able to use with the My Lyric Book program?

    how about the Chinese language doc. Able to use with the My Lyric Book program?

    I'm not sure where you see that the links I gave suggested that. The iPhoto link (quoted below) in step 4 suggests dragging the library to the new location. You can do that in Finder by dragging the library to the external disk in the Finder sidebar. If you don't have a sidebar in Finder, go to the Finder View menu and click Show Sidebar. If the external disk isn't visible in the sidebar, go to the Finder Preferences, click Sidebar at the top of the Preferences window, and put a checkmark in front of External disks in the Devices section.
    You can move your entire iPhoto library to a different computer, a hard disk, or another location on your computer.
    Important:    Before you move your iPhoto library, it’s a good idea to back it up to a DVD or external hard disk.
    Move your iPhoto library
    If you’ve created multiple photo libraries, be sure to move only the library currently displayed when iPhoto is open. To move a different library, you first need to switch to it.
    Quit iPhoto.
    In the Finder, choose your home folder (it’s usually named after you).
    Open the Pictures folder (in the home folder) to locate the iPhoto Library file.
    Drag the iPhoto Library file to a new location on your computer.
    Open iPhoto.
    In the window that appears, select the library you want, and then click Choose.

  • Null pointer Exception on java plug-in , using Mutity language...

    hi all :)
    I found at plug-in do not suppor Multy language.
    for Example...
    my operating System is Window XP and log in ID is not English ... like Korean, Chinese etc...
    i programmed Web application with Swing Applet(JApplet)... and tested plug-in version 1.2.2 and 1.3.1 and XP plug-in
    Plug-in said that like this.
    Java(TM) Plug-in: version 1.3.1
    JRE version usage 1.3.1 Java HotSpot(TM) Client VM
    user home = C:\Documents and Settings\��????��java.lang.NullPointerException java.lang.NullPointerException������ ����:java.lang.NullPointerException������ ����java.lang.NullPointerException java.lang.NullPointerException java.lang.NullPointerException----------------------------------------------------
    c: clear console window
    f: final queue
    g: garbage collect
    h: display this help message
    l: dump classloader list
    m: print memory usage
    q: hide console
    s: dump system properties
    t: dump thread list
    x: clear classloader cache
    0-5: set trace level to <n>
    ----------------------------------------------------java.lang.NullPointerException java.lang.NullPointerExceptionjava.security.PrivilegedActionException: java.lang.NullPointerExceptionjava.io.FileNotFoundException: C:\Documents and Settings\��????��\Local Settings\Temporary Internet Files\Content.IE5\9KENTUKR\graph-a[1].jar (���� ����, �������� ���� ���� ���� ������ ������ ��������)java.lang.NullPointerException java.lang.NullPointerException     at java.io.FileInputStream.open(Native Method)
    ... etc....
    this message is plug-in do not download class archive in client System cache... because of VM cannot know user.home directory...
    you can find that java plug-in does not support mulity language to see the next sentence.
    "user home = C:\Documents and Settings\��????"
    in this reason i found a problem in communication JApplet and java-script by using cookies...
    How can I solve this problem...( i must use Multi language login ID plz.....)
    have a nice day!!!
    poemtry ... ^^

    I have such problems with a russian version Windows 2000....
    Java(TM) Plug-in: Version 1.4.0
    Using JRE version 1.4.0-beta3 Java HotSpot(TM) Client VM
    User home directory = D:\Documents and Settings\?????????????
    ava.lang.NullPointerExceptionjava.lang.NullPointerException
    java.lang.NullPointerException     at sun.plugin.cache.Cache$3.hasMoreElements(Cache.java:306)
    java.lang.NullPointerException     at sun.plugin.cache.CachedFileLoader$2.run(CachedFileLoader.java:94)
    java.lang.NullPointerException     at java.security.AccessController.doPrivileged(Native Method)
    java.lang.NullPointerException     at sun.plugin.cache.Cache.privileged(Cache.java:237)
    java.lang.NullPointerException     at sun.plugin.cache.CachedFileLoader.getCacheFile(CachedFileLoader.java:86)
    java.lang.NullPointerException     at sun.plugin.cache.CachedFileLoader.load(CachedFileLoader.java:66)
    java.lang.NullPointerException     at sun.plugin.cache.FileCache.get(FileCache.java:138)
    java.lang.NullPointerException     at sun.plugin.net.protocol.http.HttpURLConnection.connectWithCache(HttpURLConnection.java:198)
    java.lang.NullPointerException     at sun.plugin.net.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:144)
    java.lang.NullPointerException     at sun.plugin.net.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:290)
    java.lang.NullPointerException     at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:1120)
    java.lang.NullPointerException     at sun.net.www.protocol.http.HttpURLConnection.getResponseCode(HttpURLConnection.java:1134)
    java.lang.NullPointerException     at sun.applet.AppletClassLoader.getBytes(AppletClassLoader.java:224)
    java.lang.NullPointerException     at sun.applet.AppletClassLoader.access$100(AppletClassLoader.java:42)
    java.lang.NullPointerException     at sun.applet.AppletClassLoader$1.run(AppletClassLoader.java:143)
    java.lang.NullPointerException     at java.security.AccessController.doPrivileged(Native Method)
    java.lang.NullPointerException     at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:140)
    java.lang.NullPointerException     at sun.plugin.security.PluginClassLoader.findClass(PluginClassLoader.java:191)
    java.lang.NullPointerException     at java.lang.ClassLoader.loadClass(ClassLoader.java:309)
    java.lang.NullPointerException     at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:114)
    java.lang.NullPointerException     at java.lang.ClassLoader.loadClass(ClassLoader.java:265)
    java.lang.NullPointerException     at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:470)
    java.lang.NullPointerException     at sun.applet.AppletPanel.createApplet(AppletPanel.java:551)
    java.lang.NullPointerException     at sun.plugin.AppletViewer.createApplet(AppletViewer.java:1610)
    java.lang.NullPointerException     at sun.applet.AppletPanel.runLoader(AppletPanel.java:480)
    java.lang.NullPointerException     at sun.applet.AppletPanel.run(AppletPanel.java:293)
    java.lang.NullPointerException     at java.lang.Thread.run(Thread.java:539)
    java.lang.NullPointerExceptionjava.lang.NullPointerException
    java.lang.NullPointerException     at sun.plugin.cache.Cache$3.hasMoreElements(Cache.java:306)
    java.lang.NullPointerException     at sun.plugin.cache.CachedJarLoader$4.run(CachedJarLoader.java:212)
    java.lang.NullPointerException     at java.security.AccessController.doPrivileged(Native Method)
    java.lang.NullPointerException     at sun.plugin.cache.Cache.privileged(Cache.java:237)
    java.lang.NullPointerException     at sun.plugin.cache.CachedJarLoader.getCacheFile(CachedJarLoader.java:204)
    java.lang.NullPointerException     at sun.plugin.cache.CachedJarLoader.<init>(CachedJarLoader.java:81)
    java.lang.NullPointerException     at sun.plugin.cache.JarCache.get(JarCache.java:170)
    java.lang.NullPointerException     at sun.plugin.net.protocol.jar.CachedJarURLConnection.connect(CachedJarURLConnection.java:73)
    java.lang.NullPointerException     at sun.plugin.net.protocol.jar.CachedJarURLConnection.getJarFile(CachedJarURLConnection.java:58)
    java.lang.NullPointerException     at sun.misc.URLClassPath$JarLoader.getJarFile(URLClassPath.java:501)
    java.lang.NullPointerException     at sun.misc.URLClassPath$JarLoader.<init>(URLClassPath.java:462)
    java.lang.NullPointerException     at sun.misc.URLClassPath$2.run(URLClassPath.java:258)
    java.lang.NullPointerException     at java.security.AccessController.doPrivileged(Native Method)
    java.lang.NullPointerException     at sun.misc.URLClassPath.getLoader(URLClassPath.java:247)
    java.lang.NullPointerException     at sun.misc.URLClassPath.getLoader(URLClassPath.java:224)
    java.lang.NullPointerException     at sun.misc.URLClassPath.getResource(URLClassPath.java:137)
    java.lang.NullPointerException     at java.net.URLClassLoader$1.run(URLClassLoader.java:193)
    java.lang.NullPointerException     at java.security.AccessController.doPrivileged(Native Method)
    java.lang.NullPointerException     at java.net.URLClassLoader.findClass(URLClassLoader.java:189)
    java.lang.NullPointerException     at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:134)
    java.lang.NullPointerException     at sun.plugin.security.PluginClassLoader.findClass(PluginClassLoader.java:191)
    java.lang.NullPointerException     at java.lang.ClassLoader.loadClass(ClassLoader.java:309)
    java.lang.NullPointerException     at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:114)
    java.lang.NullPointerException     at java.lang.ClassLoader.loadClass(ClassLoader.java:265)
    java.lang.NullPointerException     at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:470)
    java.lang.NullPointerException     at sun.applet.AppletPanel.createApplet(AppletPanel.java:551)
    java.lang.NullPointerException     at sun.plugin.AppletViewer.createApplet(AppletViewer.java:1610)
    java.lang.NullPointerException     at sun.applet.AppletPanel.runLoader(AppletPanel.java:480)
    java.lang.NullPointerException     at sun.applet.AppletPanel.run(AppletPanel.java:293)
    java.lang.NullPointerException     at java.lang.Thread.run(Thread.java:539)
    java.lang.NullPointerException
    on mainpage http://java.sun.com :-)

  • Chinese language

    Hello! I have a little problem with Chinese language support in my project. I tried to set Chinese text on button using setText() function. As a result I had only bars instead of text. Also I tried to show that text in JOptionPane - it worked correctly! This is my code:
    JOptionPane.showMessageDialog(null, "Setting button text! "+m_pProps.getButtonSelectAllText());//correct symbols
    m_pButtonSelectAll.setText(m_pProps.getButtonSelectAllText());//bars

    If you type Big character in the resource file, you need to code like this
    import java.util.Properties;
    import java.io.*;
    public class ReadProp {
         public static void main(String args[]){
         Properties p = new Properties();
         InputStream inStrm = null;
        String s2  = null;
         try{
              //inStrm = ClassLoader.getSystemResourceAsStream(new File("Extraction.properties"));
              p.load(new FileInputStream("c:\\Extraction.properties"));
              //System.out.println(p.get("prop"));
              s2 = new String( ((String)p.get("prop")).getBytes("latin1"), "Big5" );
              System.out.println(s2);
         catch(Exception e){
         System.out.println("Exception");
    }

  • Internationalization for Chinese Language

    Hi All
    I need to impelement the chinese language in Swing components. I followed the INternationalization steps from Java tutorial. I have a property file which contains the necessary mapppings for the chinese equivalents of english words.
    <filename>.zh.CN.properties
    on executing the application it is nort displaying any characters for the chinese equivalent.
    Kindly reply also to my id at [email protected]

    Typing Chinese characters into the properties file is not part of the java capabilities. For example, you could use something like Microsoft Word to create your properties file including Chinese characters. You would save the file as some type of encoded text (I prefer UTF8 myself) and then use the Sun "nativetoascii" program to convert the file to a form where all your non-ASCII characters are represented by the Unicode escape sequence. (for example, \u347a ). It is this last file that is read by java when it gets your resource bundle at run time.hi joe,
    sorry, but my basics are not strong, i could not get you. my project manager has asked me to use Arial unicode MS. so how do i get chinese characters in word , i did not understand.
    You would save the file as some type of encoded text >>(I prefer UTF8 myself) and then use the >>Sun "nativetoascii" program to converti did not understand this can you eloborate.
    do i hava an option of typing in english, and it gets converted to unicode in the properties file.
    please help
    thanks,
    kiran

  • Chinese language ISO code

    Hello Everybody,
    I want to make my application chinese language dependant.
    I have apended _ZH behind all my resource files.
    Now I have three questions:
    1. What is the correct ISO code for Chinese?
    2. If ZH is right ISO code, When I deply my application and I look in content administrator-> my application and resource text tab, I cannot see resource bundle generetade for ZH ISO code. Why it is not showing ZH resource bundle?
    3. How can I specify Chinese caracters in my resource file in my Developer studio. When I tried to copy and paste Chinese characters in resource file. It was shown as boxes instead of actual characters. Please suggest me.
    I will really appriciate your inputs.
    Regards,
    Bhavik

    Bhavik,
    Never tried this with Chineese language but done several times for Russian and German:
    1. OS is configured to store files in "native" locale (say Win1251 for Russian, Win1252 for German and many other European languages)
    2. Just create property file via some editor that stores characters using OS encoding (like notepad)
    3. Then in your JDK installation find utility <JDK_DIR>\bin\native2ascii
    4. Run native2ascii original_file.properties > target_file_with_ascii_only_symbols.properties
    As an example, here is output for "Hello, World!" in Russian:
    hello.world=u041fu0440u0438u0432u0435u0442, u041cu0438u0440!
    Valery Silaev
    SaM Solutions
    http://www.sam-solutions.net

  • Chinese language for Elements 12?

    Tech Spec (on the Adobe UK website) says Elements 12 is available in Chinese, but when I try to order online I do not get a Chinese language option. I tried talking with an Adobe rep "online" but they couldn't help me, apart from tell me "it must be a sales issue, please talk with sales" - but how do I talk with sales?
    (PS - the UK website offers Elements 12 on Windows in many European languages; the US website offers only English, French, Spanish; the Hong Kong website offers only English; the Middle East and Africa store offers only English & French.... can anybody explain WHY?
    Why is it so difficult to offer ALL available languages in ALL stores?)

    Alex1955 I am sorry but I am unable to locate a Chinese language version of Photoshop or Premiere Elements 12.  I would recommend using one of the languages which are available if you wish to use Photoshop Elements 12 or Premiere Elements 12.
    It does appear there is a Chinese version of Photoshop and Premiere Elements 11.  You may want to work with a local reseller to obtain a copy.

  • No chinese language support in new N70 firmware?

    I've just used to Nokia Software updater and it updated my N70's firmware to V5.0616.2.0.3, 24-04-06 RM-84. But now i couldn't see any chinese text...any solution to this? And also now when i try to SMS, It doesn't want to send the message..just stays in the outbox..how come?
    please help..

    You are just talking to other users here, and none of us can answer your question. To convey you views to Apple, use the feedback channel:
    http://www.apple.com/feedback/ipod.html
    Thai is hardly alone in lacking support currently. Others are Arabic, Hebrew, all the languages of India and Pakistan, and all the rest of S.E. Asian including Vietnamese.
    The languages which are supported are listed very clearly in the tech specs for the iPod. If you must have Thai you should buy something else. For the benefit of other readers, perhaps you could recommend a similar device with good Thai support?

  • Using chinese characters in struts-config.xml

    Hi
    i am developing an application in Chinese language where i need to create all the urls in the Chinese language. i am using struts 1.3.5.can anyone tell me is it possible to use Chinese characters in struts-config.xml action mappings? i tried but it is not working. is there ant way really?
    Regards,
    A.

    Don't know about struts specifically, but for Chinese URLs to work you would need to convert to punycode at some point, to comply with IDNA: http://en.wikipedia.org/wiki/Punycode
    Are you doing that?

  • Output of Sapscript in Chinese language

    I have a Purchase order in english and now i want its output in chinese.
    I want the output of my script in chinese language.
    I have tried logging in chinese language but the output comes in German.
    I have also tried through se63.
    An output type is attached to the script(zneu) . I have changed its language(i.e. output type )  to chinese   ( ZH) but yet i am not able to see its output as desired.
    Please help me in this query as early as possible.

    It is quite simple, now change all your text to standard text..
    Now display the text in your form using standard text. Maintain standard text in both english and chinese.
    Ex.
    If COMPANY CODE EQ <CHINA>
    Pick standart text LANGUAGE<b> 'ZF/ZH'</b>
    ELSE
    Pick standard text LANGUAGE <b>'EN'.</b>
    I hope you will be successful with solution.
    Reward points if useful.
    Regards,
    Sairam

  • URGENT help please. Problem creating Chinese language text field in Adobe LiveCycle.

    A client requested to create an employee details form in which few text fields has to be in Chinese language. I selected "Arial Unicode MS" for that fields. In final PDF I am able to insert text in Chinese text fields in Acrobat. But I cant insert text when i opened the final PDF in Adobe Reader. (only these Arial Unicode MS fields are disabled). All other fields (English) are in Arial font., they are working in both (Acrobat and Reader). As these forms will be distributed to people who may don't have Acrobat and only the Free Adobe Reader. Can someone please advice me how to solve this problem.
    Thank you
    - Amal

    Make sure the format of the date strings provided by the calendar is what you are expecting. Or use the "formattedValue" for the input strings.

Maybe you are looking for

  • Problem with "watch folder" and Windows 7

    I have just switched to Windows 7 and Elements 9 - so far things are working quite well, but I am having a problem with "Watch folder"  It is watching my odf folder "My Pictures" but all my new photos are going into Libraries/Pictures and PSE9 won't

  • How to transfer data to a new MacBook Pro?

    My wife has a 12" Power PC G4. Running OS 10.5.8. She is receiving a brand new MacBook Pro today from Apple. How do we transfer all her "everything" from the G4  to the new computer? Thx, Steve

  • Pro Import Crash

    I have used after Effects for Some time. I usually import Avid AAF for final colorization and effects. I recently updated to Creative Cloud. I just tried to import a Wedding that I did . When starting Pro Import CC crashes completely. I have to resta

  • Clipping paths inverting in CS3

    I see that this has been discussed previously, (http://www.adobeforums.com/webx/.3c05af0b/12) but the topic is now archived so I wondered if there are any new thoughts on the matter. Images with clipping paths that work perfectly in CS and CS2 are co

  • HT1695 Would a iPad wi-fi be converted  to a iPad (cellular model) so that I can get it on the go  anywhere ?

    Would a iPad wi-fi be converted to a iPad (cellular model) so that I can get  it on the go anywhere , not just wi- fi.