Help, how to input Chinese in archlinux?

The chinese can always be displayed in mozilla.
i tried to run
LC_ALL=zh_CN.gb2312 LANG=zh_CN.gb2312 mozilla
but when press Ctrl-space, the chinese input method doesn't popup,
i've installed all KDE. Any particular module i need to install? tried to search on archlinux.org for package of chinese and cannot find one....

nkw wrote:
The chinese can always be displayed in mozilla.
i tried to run
LC_ALL=zh_CN.gb2312 LANG=zh_CN.gb2312 mozilla
but when press Ctrl-space, the chinese input method doesn't popup,
i've installed all KDE. Any particular module i need to install? tried to search on archlinux.org for package of chinese and cannot find one....
Currently, archlinux's support for Chinese is nil.
Which input method are you using?
I recommand scim.
So here is how I do it:
Install Chinese fonts
Install scim and input tables (check out scim site for more info)
In /etc/profile, add
export LC_CTYPE=zh_CN
and then you log in X, type scim in a terminal.  All set.
Also, if you can read Chinese ( I think you do), just go to www.linuxsir.com/bbs
and ask Chinese users there.

Similar Messages

  • How to input chinese in ipod touch?

    When I use safari to view some chinese web,I need input some chinese chars.
    So how to input chinese chars in ipod touch?
    Thanks.
    --Jones

    Don't try to jailbreak it 3d party software is not always 100% qualified stuff. E.g., yesterday I've put Russian localization pack on my iPod and got a lot of "surprises": crashing keyboards & iPod apps, crappy not smoothed fonts etc.
    There is also no Russian || Ukrainian keyboard on iPod. That's Ok, but adding / changing contact details in the Address Book or editing iCal event is a really weird thing. Why should I use translitaration or write everything non-native language?! That's stupid that localization doesn't include language inputs.

  • How to input chinese words with emulator?

    Netbeans6.8 is on stage now. But there is no downable plugin for WTK2.5.2. It means JavaME SDK 3.0 is offically mature. But I find there is no way to input chinese word with emulator.
    Any advice is welcome.

    Don't try to jailbreak it 3d party software is not always 100% qualified stuff. E.g., yesterday I've put Russian localization pack on my iPod and got a lot of "surprises": crashing keyboards & iPod apps, crappy not smoothed fonts etc.
    There is also no Russian || Ukrainian keyboard on iPod. That's Ok, but adding / changing contact details in the Address Book or editing iCal event is a really weird thing. Why should I use translitaration or write everything non-native language?! That's stupid that localization doesn't include language inputs.

  • How to configure my Firefox thus allowing me to input Chinese characters into the search box by using PenPower writing pad while this problem doesn't exist when I am using Internet Explorer?

    I am using the electronic writing pad made by PENPOWER Inc. to input Chinese characters onto my PC programs (e.g. Winword, Internet Explorer, Excel, etc.) But I can not make it happened on Firefox, please advice what I have to do with the configuration of the Firefox or using any other method to make it work. Thanking you guys in advance for helping me to solve this problem.

    cor-el,
    Thank you very much for your advice. The new software of Penpower works rightaway after I installed it on my pc. Thanks again.
    十分感激你的幫忙!

  • How can I input Chinese in the Playbook?

    How can I input Chinese in the Playbook?  such as in browers and contact

    I think the only way to do that is to download an app, that lets you input pinyin for instance, then copy and paste from there. The last time I checked, there are 3 apps in the app world, all by the same person. I've no idea what the difference between them is.

  • How to read and input Chinese through Blackberry wireless cell phone

    The way to read and input Chinese through Blackberry wireless cell phone
    My phone model  is Blackberry 8520.
    My Blackberry can read and input Chinese after these steps. 
    1. Go to the weblink http://na.blackberry.com/eng/support/downloads/download_sites.jsp
    2. Click "China Mobile Peoples Telephone" included in "Asia Pacific".
    3.Select a product from the drop down menu, for example, mine is BlackBerry 8520, and I select it.
    4.Click "next"
    5.Then select the "Download Software" on thebottom of the same webpage.
    6.Fill in all the information required on the following page, then "Next"
    7. Start download the software to you PC, computer or laptop.
    8.Install this downloaded software to your PC. The software is called "8520wifijEastAsia_PBr4.6.1_rel424_PL4.2.0.122_A4.6.1.286_China_Mobile_Hong_Kong_Co._Ltd"
    9.Link your wireless cell phone to your PC
    10.Then go to C:\Program Files\Common Files\Research In Motion\AppLoader
    11. Double click "Loader"
    12. Select all the languages you want to update to your cell, and then follow the information to the left steps.
    It will take about 20 minutes after Step 12 to finish the upload to the cell.
    Done.
    Now I am happy I can read and input both English and Chinese through my BlackBerry.
    If you have any questions, please leave message to me on this web.
    Good luck.
    Grace

    Hi Grace,
    I'd faced the same issue as KU.
    After all the installation.. it does not have any options for me to choose for the language.. can kindly assist me on this???
    it only showed those applications that i had in my mobile...
    Thanks
    -fei-

  • There si any trouble when I input Chinese to the JTextField in Applet.

    There si any trouble when I input Chinese to the JTextField in Applet.

    thanks for your help,
    my tool is form builder,
    my form version is 10.1.2.0.2
    and the field is set to CHAR ,
    when i run an easy form
    and switch the input method to chinese,
    there is no input window,the focus directly be in field, even doesn't complete input a Chinese character,
    in usually ,when switch the input to chinese,the focus will be in field when complete input a Chinese character
    i Try to do it in version is 9.0, there isn't wrong As above
    any one can tell me how to resolve it ,thanks

  • How to handle Chinese on WL 6.0 sp1

              Hi all,
              I got a strange experience when i'm trying to handle chinese character in
              JPS. I wrote a simple JSP (test.jsp) performing "FORM POST" to see whether i can
              get the "right" chinese character after FORM POST. The program is written as below:
              <%@ page info="test page" session="true" buffer="1024kb"
                   import="java.sql.*, java.util.*, java.lang.*" %>
              <%
              response.setContentType("text/html; charset=UTF-8");
              try {
                   String s1a = request.getParameter("field1");
                   String s2a = request.getParameter("field2");     
              %>
              <HTML>
              <HEAD>
              <TITLE>DUMMY No. 1 ^.^ </TITLE>
              </HEAD>
              <BODY>
              <BR>~~FORM POST TESTING~~<BR>
              <FORM name="frm1" action="test.jsp" method="post">
              Field 1: <INPUT type="text" name="field1"><BR>
              Field 2: <INPUT type="text" name="field2"><BR>
              <INPUT type="submit"><BR>
              </FORM>
              <%=s1a%> || <%=s2a%>
              </BODY>
              </HTML>
              <% } catch (Exception e) {
                   out.println("Error : " + e.getMessage());
              %>
              Everytime when i entered a chinese character, i got some strange character
              or even nothing after FORM POST. Do you know why or could you advise me how to
              fix it? I'm using Window 2000 professional english version, default locale is
              Hong Kong, and WebLogic 6.0sp1.
              Thanks in advance.
              Regards,
              Ralpho
              

    Hi Ralpho,
              check out
              http://e-docs.bea.com/wls/docs60///adminguide/config_web_app.html#100357
              , I think it should help.
              Cheers,
              Daniel
              > -----Ursprüngliche Nachricht-----
              > Von: Ralpho [mailto:[email protected]]
              > Bereitgestellt: Donnerstag, 21. Juni 2001 04:16
              > Bereitgestellt in: jsp
              > Unterhaltung: How to handle Chinese on WL 6.0 sp1
              > Betreff: How to handle Chinese on WL 6.0 sp1
              >
              >
              >
              > Hi all,
              >
              > I got a strange experience when i'm trying to handle
              > chinese character in
              > JPS. I wrote a simple JSP (test.jsp) performing "FORM POST"
              > to see whether i can
              > get the "right" chinese character after FORM POST. The
              > program is written as below:
              >
              > <%@ page info="test page" session="true" buffer="1024kb"
              >      import="java.sql.*, java.util.*, java.lang.*" %>
              > <%
              > response.setContentType("text/html; charset=UTF-8");
              >      
              > try {
              >      String s1a = request.getParameter("field1");
              >      String s2a = request.getParameter("field2");     
              > %>
              >
              > <HTML>
              > <HEAD>
              > <TITLE>DUMMY No. 1 ^.^ </TITLE>
              > </HEAD>
              > <BODY>
              > <BR>~~FORM POST TESTING~~<BR>
              > <FORM name="frm1" action="test.jsp" method="post">
              > Field 1: <INPUT type="text" name="field1"><BR>
              > Field 2: <INPUT type="text" name="field2"><BR>
              > <INPUT type="submit"><BR>
              > </FORM>
              > <%=s1a%> || <%=s2a%>
              > </BODY>
              > </HTML>
              > <% } catch (Exception e) {
              >      out.println("Error : " + e.getMessage());
              > }
              > %>
              >
              > Everytime when i entered a chinese character, i got some
              > strange character
              > or even nothing after FORM POST. Do you know why or could you
              > advise me how to
              > fix it? I'm using Window 2000 professional english version,
              > default locale is
              > Hong Kong, and WebLogic 6.0sp1.
              >
              > Thanks in advance.
              >
              > Regards,
              > Ralpho
              >
              

  • Display and Input Chinese conflict? +other qs.

    I have a Swing Application - and I want to have part of the GUI in Chinese. (List boxes etc.) In order to do this, I use Bitstream Cyberbit font and it works fine.
    In order to Input data in Chinese in a TextField, I use NJstar to do the data entry. This works fine on its own as well.
    - Now, when I have an application to do BOTH the above, it does'nt work (I cannot input Chinese AND display chinese)
    Do I need to use a font or something that comes with NJstar for DISPLAY as well?
    Is there an underlying conflict between NJStar and BitStream Cyberbit on when working together - i.e. one cannot use bitstream cyberbit for display and NJstar's font for data entry?
    - Data entered by entered by NJStar in chinese can be read by Java as Unicode? For example
    //if textfield1 contains chinese characters (as entered by njstar)
    String chineseString = jtextfield1.getText();
    do I need to do any change in encoding??
    - Sometimes NJstar enters rubbish (incorrect encoding) in my Swing window? Anyone had the same problem?
    Please advise. TIA,
    Carlos

    Hi Carlos,
    I'm yet to meet the Bitstream Cyberbit font, but one question sticks in my head. Is it a Unicode-based font?
    AFAIK, NJStar enters all its data in a Unicode format, so it's possible that while Swing knows how to handle NJStar's input, the Bitstream font doesn't know how to display it.
    As for the rest, the only other thing I can suggest is that every now and then CJK characters like to be converted over to UTF-16 in Java as opposed to UTF-8. I'm still not entirely sure why. :)
    From memory, you can change the encoding of the data you're entering with NJStar, so that might be worth a shot.
    Hope that helps!
    Martin Hughes

  • In program written with Java Swing, I can't input Chinese

    In program written with Java Swing, I can't input Chinese.
    But if I change my language first, then change the input method tu U.S, open the Java Swing application, finally I can input Chinese. I want to know how to fix this bug.
    My OS is Mac OS X 10.6.8.
    At the JDK version 1.6.0_29, I can input Chinese friendly in Java Swing applications. But after 1.6.0_31, I can't do it anymore. The input methods can input Chinese in other non Java Swing applications so the problem must create by JDK or JRE's Swing part. What's the different between 1.6.0_29's Swing and 1.6.0_31's ? Why ? I heard that Java Swing apps not support Chinese input methods seens 2009... Why haven't fix these yet?

    Chazza wrote:
    Perhaps you need to change your keyboard layout in Xorg?
    https://wiki.archlinux.org/index.php/Ke … ard_layout
    Thanks for your answer!
    I have tried to change the keyboard layout from "en" to "cn", but it is still not work.
    The input method coin on the righttop is right when I change the method.But it still output english even I use ibus-pinyin.There is not a box for my choosing chinese words.
    Last edited by Dilingg (2015-05-15 16:18:43)

  • When input chinese to  form's item,the data no finish but the focus move..

    when i input chinese data to a form's text item,
    i found a chinese character does's finish input ,
    but the focus move in item with the inputt chinese letter.
    Under normal circumstances:
    it should Complete input a chinese character,
    the focus will move with the input,
    any body can help me solve it ?
    thanks

    thanks for your help,
    my tool is form builder,
    my form version is 10.1.2.0.2
    and the field is set to CHAR ,
    when i run an easy form
    and switch the input method to chinese,
    there is no input window,the focus directly be in field, even doesn't complete input a Chinese character,
    in usually ,when switch the input to chinese,the focus will be in field when complete input a Chinese character
    i Try to do it in version is 9.0, there isn't wrong As above
    any one can tell me how to resolve it ,thanks

  • How to input data into an arraylist from a text file?

    I am trying to take data from a text file and put that data into an arraylist. First here is the text file:
    [item1, 10, 125.0, item2, 10, 12.0, item3, 20, 158.0]
    3
    4530.0
    [item5, 65, 555.5, item4, 29, 689.0]
    2
    56088.5
    [item7, 84, 34.5, item6, 103, 0.5, item8, 85, 1.36]
    3
    3065.1The text between the [ ] is the output from my arraylists. I have three arraylists. The first [ ] belongs to arraylist A, the second to arraylist B, and the third to arraylist C. The format of the arraylists is this:
    <item name>,<# in stock>,<value of one item>
    The first number below the arraylists in the text file represents the number of items in the list. The second number below the arraylists represents the total value of the items in the arraylists.
    Here is the class file I have (yes, it does everything):
    import java.io.*;
    import java.util.Scanner;
    import java.util.ArrayList;
    public class Inventory extends Object
         public int toAdd = 0;
         private boolean done = false;               //Are we done yet?
         public String strItemName;                    //The name of the item type.
         public int intNumInStock;                    //The number in stock of that type.      
         public double dblValueOfOneItem;          //The value of one item.
        public String strNumberInStock;               
        public double dblTotalValueA;               //The total value of warehouse A.
        public double dblTotalValueB;               //The total value of warehouse B.
        public double dblTotalValueC;               //The total value of warehouse C.
        public int intWarehouseAItemCount;          //Counter for items in warehouse A.
        public int intWarehouseBItemCount;          //Counter for items in warehouse B.
        public int intWarehouseCItemCount;          //Counter for items in warehouse C.
         ArrayList warehouseAList = new ArrayList();     //Create the Warehouse A ArrayList.                                   
         ArrayList warehouseBList = new ArrayList(); //Create the Warehouse B arrayList.
         ArrayList warehouseCList = new ArrayList(); //Create the Warehouse C arrayList.
         /** Construct a new Inventory object. */
         public Inventory()
              super();
         /**Add items to the Warehouse A ArrayList.*/
         private void createWareHouseA()
              System.out.println("!" + toAdd + " item types will be added to warehouse A.");
              //Cast
              String strNumInStock = Integer.toString(intNumInStock);
              String strValueOfOneItem = Double.toString(dblValueOfOneItem);
              this.strNumberInStock = strNumInStock;
              System.out.println("!Initial size of warehouseAList :  " +
                                                                warehouseAList.size());
              //Add items to the array List
              warehouseAList.add(this.strItemName);
              warehouseAList.add(this.strNumberInStock);
              warehouseAList.add(this.dblValueOfOneItem);
              System.out.println("!size of arrayList after additions " + warehouseAList.size());
         /**Add items to the Warehouse B ArrayList.*/
         private void createWareHouseB()
              System.out.println("!" + toAdd + " item types will be added to warehouse B.");
              //Cast
              String strNumInStock = Integer.toString(intNumInStock);
              String strValueOfOneItem = Double.toString(dblValueOfOneItem);
              this.strNumberInStock = strNumInStock;
              System.out.println("!Initial size of warehouseBList :  " +
                                                                warehouseBList.size());
              //Add items to the array List
              warehouseBList.add(this.strItemName);
              warehouseBList.add(this.strNumberInStock);
              warehouseBList.add(this.dblValueOfOneItem);
              System.out.println("!size of arrayList after additions " + warehouseBList.size());
         /**Add items to the Warehouse C ArrayList.*/
         private void createWareHouseC()
              System.out.println("!" + toAdd + " item types will be added to warehouse C.");
              //Cast
              String strNumInStock = Integer.toString(intNumInStock);
              String strValueOfOneItem = Double.toString(dblValueOfOneItem);
              this.strNumberInStock = strNumInStock;
              System.out.println("!Initial size of warehouseCList :  " +
                                                                warehouseCList.size());
              //Add items to the array List
              warehouseCList.add(this.strItemName);
              warehouseCList.add(this.strNumberInStock);
              warehouseCList.add(this.dblValueOfOneItem);
              System.out.println("!size of arrayList after additions " + warehouseCList.size());
         /**Interpret the commands entered by the user.*/
         public void cmdInterpreter()
              this.displayHelp();
              Scanner cin = new Scanner(System.in);
              while (!this.done)
                   System.out.print(">");
                   //"line" equals the next line of input.
                   String line = cin.nextLine();
                   this.executeCmd(line);
         /**Execute one line entered by the user.
          * @param cmdLN; The command entered by the user to execute. */
          private void executeCmd(String cmdLN)
               Scanner line = new Scanner(cmdLN);
               if (line.hasNext())
                    String cmd = line.next();
                    //What to do when users enter the various commands below.
                    if (cmd.equals("help"))
                         this.displayHelp();
                    else if (cmd.equals("Q!"))
                         this.done = true;
                    else if (cmd.equals("F") && line.hasNext())
                         this.inputFromFile(line.next());
                    else if (cmd.equals("K") && line.hasNext())
                         int numItemsToAdd = Integer.valueOf( line.next() ).intValue();
                         this.toAdd = numItemsToAdd;
                         this.inputFromKeyboard(numItemsToAdd);
          /**What to do if input comes from a file.
           *     @param inputFile; The name of the input file to process.*/
          private void inputFromFile(String inputFile)
               Scanner cin = new Scanner(System.in);
               System.out.println("!Using input file " + inputFile + ".");
               System.out.print("!Enter the name of the output file: ");
               String outputFile = cin.next();
               System.out.println("!Using output file " + outputFile + ".");
              try
                   BufferedReader in = new BufferedReader(new FileReader(inputFile));
                   //Scanner in = new Scanner(new File(inputFile));
                   //Initialize the String variables.
                   String line1 = null;
                   String line2 = null;
                   String line3 = null;
                   String line4 = null;
                   String line5 = null;
                   String line6 = null;
                   String line7 = null;
                   String line8 = null;
                   String line9 = null;
                   System.out.println(in.equals(",") + " see?");
                   //System.out.println((char)(char)in.read() + " experiment");
                   /**This loop assigns values to the string variables based on the
                    * values on each line in the input file. */
                   while(in.readLine() != null)
                        line1 = in.readLine();
                        line2 = in.readLine();
                        line3 = in.readLine();
                        line4 = in.readLine();
                        line5 = in.readLine();
                        line6 = in.readLine();
                        line7 = in.readLine();
                        line8 = in.readLine();
                        line9 = in.readLine();
                   //Print the contents of each line in the input file.
                   System.out.println("!value of line 1: " + line1);
                   System.out.println("!value of line 2: " + line2);
                   System.out.println("!value of line 3: " + line3);
                   System.out.println("!value of line 4: " + line4);
                   System.out.println("!value of line 5: " + line5);
                   System.out.println("!value of line 6: " + line6);
                   System.out.println("!value of line 7: " + line7);
                   System.out.println("!value of line 8: " + line8);
                   System.out.println("!value of line 9: " + line9);
                /**Add items to the warehouses.*/
                   warehouseAList.add(line1);
                   warehouseBList.add(line4);
                   warehouseCList.add(line7);
                /**Add the item count and total value for warehouse A.*/
                   int intLine2 = Integer.valueOf(line2).intValue();
                   this.intWarehouseAItemCount = intLine2;
                   double dblLine3 = Double.valueOf(line3).doubleValue();
                   this.dblTotalValueA = dblLine3;
                /**Add the item count and total value for warehouse B.*/
                   int intLine5 = Integer.valueOf(line5).intValue();
                   this.intWarehouseBItemCount = intLine5;
                   double dblLine6 = Double.valueOf(line6).doubleValue();
                   this.dblTotalValueB = dblLine6;
                /**Add the item count and total value for warehouse C.*/
                  int intLine8 = Integer.valueOf(line8).intValue();
                  this.intWarehouseCItemCount = intLine8;
                  double dblLine9 = Double.valueOf(line9).doubleValue();
                  this.dblTotalValueC = dblLine9;
                /**Ask the user how many items to add or delete from inventory.*/
                  System.out.print("Enter the number to add to inventory for " +
                                                               warehouseAList.get(0) + ":");
                  String toAddOrDel = cin.next();
                /**Print the contents of all the warehouses. */
                   System.out.println(" ");
                   //Print the contents of warehouse A.
                   System.out.println("!--------------------------------");
                   System.out.println("!----------Warehouse A:----------");
                   System.out.println("!--------------------------------");
                   //Print the item list for warehouse A.
                   System.out.println(warehouseAList);
                   //Print the total amount of items in warehouse A.
                   System.out.println("Total items: " + this.intWarehouseAItemCount);
                   //Print the total value of the items in warehouse A.
                   System.out.println("Total value: " + this.dblTotalValueA);
                   System.out.println("!--------------------------------");
                   System.out.println("!----------Warehouse B:----------");
                   System.out.println("!--------------------------------");
                   //Print the item list for warehouse B.
                   System.out.println("!warehouseB: " + warehouseBList);
                   //Print the total amount of items in warehouse B.
                   System.out.println("Total items: " + this.intWarehouseBItemCount);
                   //Print the total value of the items in warehouse B.
                   System.out.println("Total value: " + this.dblTotalValueB);
                   System.out.println("!--------------------------------");
                   System.out.println("!----------Warehouse C:----------");
                   System.out.println("!--------------------------------");
                   //Print the item list for warehouse C.
                   System.out.println("!warehouseC: " + warehouseCList);
                   //Print the total amount of items in warehouse C.
                   System.out.println("Total items: " + this.intWarehouseCItemCount);
                   //Print the total value of the items in warehouse C.
                   System.out.println("Total value: " + this.dblTotalValueC);
                   in.close();
              catch (FileNotFoundException e)
                   System.out.println("!Error: Unable to open file for reading.");
              catch (EOFException e)
                   System.out.println("!Error: EOF encountered, file may be corrupted.");
              catch (IOException e)
                   System.out.println("!Error: Cannot read from file.");
          /**What to do if input comes from the keyboard.
           *     @param numItems; The total number of items that will be added to the
           *                      Warehouse(s). */
          public void inputFromKeyboard(int numItems)
               System.out.println("!You will be adding " + numItems + " items to " +
                                             "inventory from the keyboard. ");
               this.toAdd = numItems;
               Scanner cin = new Scanner(System.in);
               //Prompt user for name of output file.
               System.out.print("!Enter the name of the output file: ");
               String outputFile = cin.next();
               /**This loop asks the user for information about the item(s) and inputs
                 *them into the appropriate array.*/
               int count = 0;
               while (numItems > count)
                    //Item name.
                    System.out.print("!Item name: ");
                    String addItemName = cin.next();
                    //Number in stock.
                    System.out.print("!Number in stock: ");
                    String addNumInStock = cin.next();
                    //Initial warehouse.
                    System.out.print("!Initial warehouse(A,B,C): ");
                    String addInitWarehouse = cin.next();
                    //Value of one item.
                    System.out.print("!Value of one item: ");
                    String addValueOfOneItem = cin.next();
                    //Add or delete from inventory
                    System.out.print("!Enter amount to add or delete from inventory: ");
                    String strAddOrDelete = cin.next();
                    System.out.println("!Amount to add or delete: " + strAddOrDelete);
                    //Cast
                    int intAddNumInStock = Integer.valueOf(addNumInStock).intValue();
                    double doubleAddValueOfOneItem = Double.valueOf(addValueOfOneItem).doubleValue();
                    int intAddOrDelete = Integer.valueOf(strAddOrDelete).intValue();
                    /**Add intAddNumInStock with intAddOrDelete to determine the amount
                     * to add or delete from inventory (If a user wishes to remove items
                     * from inventory simply add negative values). */
                    intAddNumInStock = intAddNumInStock + intAddOrDelete;
                    System.out.println("!Inventory after modifications: " + strAddOrDelete);
                    this.strItemName = addItemName;
                    this.intNumInStock = intAddNumInStock;
                    this.dblValueOfOneItem = doubleAddValueOfOneItem;
                    //Put items into warehouse A if appropriate.
                    if (intAddNumInStock < 25)
                        //Increment the warehouse A item count.
                        this.intWarehouseAItemCount = this.intWarehouseAItemCount + 1;
                        //Calculate the total value of warehouse A.
                        this.dblTotalValueA = this.dblTotalValueA + intAddNumInStock * doubleAddValueOfOneItem;
                        //Create the warehouse A array list.
                        this.createWareHouseA();
                    //Put items into warehouse B if appropriate.
                    if (intAddNumInStock >= 25)
                        if (intAddNumInStock < 75)
                             //Increment the warehouse B item count.
                             this.intWarehouseBItemCount = this.intWarehouseBItemCount + 1;
                             //Calculate the total value of warehouse B.
                             this.dblTotalValueB = this.dblTotalValueB + intAddNumInStock * doubleAddValueOfOneItem;
                             //Create the warehouse B array list.
                             this.createWareHouseB();
                    //Put items into warehouse C if appropriate.
                    if (intAddNumInStock >= 75)
                        //Increment the warehouse C item count.
                        this.intWarehouseCItemCount = this.intWarehouseCItemCount + 1;
                        //Calculate the total value of warehouse C.
                        this.dblTotalValueC = this.dblTotalValueC + intAddNumInStock * doubleAddValueOfOneItem;
                        //Create the warehouse C array list.
                        this.createWareHouseC();
                     //display helpful information.      
                    System.out.println("!--------------------------------");
                    System.out.println("!" + addItemName + " is the item name.");
                    System.out.println("!" + addNumInStock + " is the number in stock.");
                    System.out.println("!" + addInitWarehouse + " is the initial warehouse.");
                    System.out.println("!" + addValueOfOneItem + " is the value of one item.");
                    System.out.println("!--------------------------------------------------");
                   //Increment the counters.
                    count++;
               /**Create and write to the output file. */
               try
                     //Use the output file specified by the user.
                    PrintWriter out = new PrintWriter(outputFile);
                 /**Write warehouse A details.*/
                      //Blank the first line.
                      out.println(" ");
                    //Write the array list for warehouse A.
                    out.println(warehouseAList);
                    //Write the amount of items in warehouse A.
                    out.println(intWarehouseAItemCount);
                    //Write the total value for warehouse A.
                    out.println(dblTotalValueA);
                 /**Write warehosue B details.*/
                   //Write the array list for warehouse B.
                    out.println(warehouseBList);
                    //Write the amount of items in warehouse B.
                    out.println(intWarehouseBItemCount);
                    //Write the total value for warehouse B.
                    out.println(dblTotalValueB);
                 /**Write warehouse C details.*/
                      //Write the array list for warehouse C.
                    out.println(warehouseCList);
                    //Write the amount of items in warehouse C.
                    out.println(intWarehouseCItemCount);
                    //Write the total value for warehouse C.
                    out.println(dblTotalValueC);
                    //Close the output file.
                    out.close();     
                catch (FileNotFoundException e)
                   System.out.println("Error: Unable to open file for reading.");
               catch (IOException e)
                   System.out.println("Error: Cannot read from file.");
               /**View the contents and the value of each warehouse.*/
               System.out.println("!---------------Inventory Summary------------------");
               System.out.println("!--------------------------------------------------");
               System.out.println("!--------------------LEGEND:-----------------------");
               System.out.println("!<item type>, <amount in stock>,<value of one item>");
               System.out.println("!--------------------------------------------------");
               System.out.println("!------------------Warehouse A:--------------------");
               System.out.println("!--------------------------------------------------");
               //Display Items in warehouse A.
               System.out.println(warehouseAList);
               //Total items in warehouse A.
               System.out.println("Total items: " + intWarehouseAItemCount);
               //Display total value of warehouse A.
               System.out.println("Total value: " + "$" + dblTotalValueA);
               System.out.println("!--------------------------------------------------");
               System.out.println("!------------------Warehouse B:--------------------");
               System.out.println("!--------------------------------------------------");
               //Display Items in warehouse B.
               System.out.println(warehouseBList);
               //Total items in warehouse B.
               System.out.println("Total items: " + intWarehouseBItemCount);
               //Display total value of warehouse B.
               System.out.println("Total value: " + "$" + dblTotalValueB);
               System.out.println("!--------------------------------------------------");
               System.out.println("!------------------Warehouse C:--------------------");
               System.out.println("!--------------------------------------------------");
               //Display Items in warehouse C.
               System.out.println(warehouseCList);
               //Total items in warehouse C.
               System.out.println("Total items: " + intWarehouseCItemCount);
               //Display total value of warehouse C.
               System.out.println("Total value: " + "$" + dblTotalValueC);
         /**Display a help message.*/
         private void displayHelp()
              System.out.println("!--------------------------------");
              System.out.println("! General Help:");
              System.out.println("!--------------------------------");
              System.out.println("! ");
              System.out.println("!'help' display this help message.");
              System.out.println("!'Q!' quit this program.");
              System.out.println("!--------------------------------");
              System.out.println("! Input File Specific Commands:");
              System.out.println("!--------------------------------");
              System.out.println("! ");
              System.out.println("!'F' <name> type F followed by the name of the " +
                                       "file to be used for input.");
              System.out.println("!---------------------------------------");
              System.out.println("! Input From Keyboard Specific Commands:");
              System.out.println("!---------------------------------------");
              System.out.println("! ");
              System.out.println("!'K' <number> type K followed by the number of " +
                                        "items that will be added. ");
              System.out.println("! ");
    }Program file:
    public class InventoryProg
         public static void main(String[] args)
              //Create a new Inventory object.
              Inventory test = new Inventory();
              //Execute the command interpreter.
              test.cmdInterpreter();
    }Right now I am stuck on this and I cannot progress any further until I figure out how to input the data in the text file back into a arraylist.
    Thanks in advance.

    Thanks but I figured it out. Heres a sample of the code i used to solve my problem:
    try
                           //Warehouse A BufferedReader.
                   BufferedReader inA = new BufferedReader(new FileReader(inputFileWarehouseA));
                   //Warehouse B BufferedReader.
                   BufferedReader inB = new BufferedReader(new FileReader(inputFileWarehouseB));
                   //Warehouse C BufferedReader.
                   BufferedReader inC = new BufferedReader(new FileReader(inputFileWarehouseC));
                   //Warehouse details BufferedReader.
                   BufferedReader inDetails = new BufferedReader(new FileReader(inputFileDetails));
                   //Will hold values in warehouse arraylists.
                   String lineA = null;
                   String lineB = null;
                   String lineC = null;
                   //Will hold the details of each warehouse.
                   String line1 = null;
                   String line2 = null;
                   String line3 = null;
                   String line4 = null;
                   String line5 = null;
                   String line6 = null;
                   //Get the item count and total value for each warehouse.
                   while(inDetails.readLine() != null)
                        line1 = inDetails.readLine();
                        line2 = inDetails.readLine();
                        line3 = inDetails.readLine();
                        line4 = inDetails.readLine();
                        line5 = inDetails.readLine();
                        line6 = inDetails.readLine();
               /**Assign the item count and total value to warehouse A.*/
                  //Cast.
                   int intLine1 = Integer.valueOf(line1).intValue();
                   double dblLine2 = Double.valueOf(line2).doubleValue();
                   //Assign the values.
                   this.intWarehouseAItemCount = intLine1;
                   this.dblTotalValueA = dblLine2;
                /**Assign the item count and total value to warehouse B.*/
                     //Cast.
                   int intLine3 = Integer.valueOf(line3).intValue();
                   double dblLine4 = Double.valueOf(line4).doubleValue();
                     //Assign the values.
                   this.intWarehouseBItemCount = intLine3;
                   this.dblTotalValueB = dblLine4;
                /**Assign the item count and total value to warehouse C.*/
                     //Cast.
                     int intLine5 = Integer.valueOf(line5).intValue();
                   double dblLine6 = Double.valueOf(line6).doubleValue();
                   //Assign the values.
                   this.intWarehouseCItemCount = intLine5;
                   this.dblTotalValueC = dblLine6;
                /**Put the items back into the warehouses arraylists. */
                   //Add items to warehouse A.
                   while((lineA = inA.readLine()) != null)
                        warehouseAList.add(lineA);
                   //Add items to warehouse B.
                   while((lineB = inB.readLine()) != null)
                        warehouseBList.add(lineB);
                   //Add items to warehouse C.
                   while((lineC = inC.readLine()) != null)
                        warehouseCList.add(lineC);
                   }(this isn't the whole try statement its pretty long)

  • Jabber Client chat box input Chinese

    Hi all,
         I'm facing a problem with my Jabber client for Windows 8.1, the problem is that I can not input chinese in my chat box, but can use in other field like search or change Nick name.
         I have try to reinstall the Jabber client, or upgrade the Jabber Client from 9.2 to 9.6, but the problem still not fixed, and I test this two version on Windows 7, there's no problem like on Windows 8.1.
         BTW, I can copy the Chinese code from Notepad or other place, it can shown in chat box and can send it successfully.
         Is there anybody know why and how to resolve it?
    1. When I type somting in search field, it can show the chinese.
    2.In chat box, I try to input something but there is noting display

    Hi all,
         Anybody know about this problem?

  • Search help for a Input Field........

    Hi,
      I'm fairly new to BSP and I would like to know how to attach Search Help to the Input Field in BSP application.
    Thanks
    NP.

    Hi nagendra
                        Search Help for input field Provide using attribute of input field is showHelp and onvaluehelp
                      This is providing the search help .

  • Re:How to input database to java program

    Hi...anyone can briefly teach me how to input my Microsoft access(database) folder into my Java program?
    Or anyone have the java code to input data to the program?If i input do i need to declare a table first in it?
    Help Appreciated.Thanks...

    so far i only understand to hardcode...Can any one teach or give the source to input my text file and system output the data in a drop down list.
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    public class ProductTable extends JFrame {
         String[] colNames={"Product ID","Product Name","Product Information","Product Price $"};
         Object [][] friendList = {{"1","Brown Bear, Brown Bear,What Do You See","Bill Martin Jr.","7.95"},
    {"2","Moo Baa La La La","Sandra Boynton","5.99"},
    {"3","Going-To-Bed","Sandra Boynton","5.99"},
    {"4","Animal Kisses","Barney Saltzberg","7.95"},
    {"5","Polar Bear, Polar Bear, What Do You Hear?","Bill Martin Jr.","7.95"},
    {"6","Tigers At Twillight","Mary Pope Osbourne","3.99"},
    {"7","But Not The Hippopotamus","Sandra Boynton","5.99"},
    {"8","Best Word Book Ever!","Richard Scarry","11.19"},
    {"9","Big Red Barn Board Book","Margaret Wise Brown","7.99"},
    {"10","Pajama Time","Sandra Boynton","6.95"},
    {"11","Time For Bed","Jane Dyer","6.95"},
    {"12","Make Way For Ducklings","Robert McCloskey","12.59"},
    {"13","Bear Snores On!","Karma Wilson","11.19"},
    {"14","Giraffes Can't Dance","Giles Andreae","11.2"},
    {"15","From Head to Toe Board Book","Eric Carle","15.37"},
    {"16","Blue Hat, Green Hat","Sandra Boynton","3.25"},
    {"17","Tails","Matthew Van Fleet","11.17"},
    {"18","Richard Scarry's Day at the Airport","Richard Scarry","3.25"},
    {"19","Richard Scarry's Best Storybook Ever!","Richard Scarry","11.19"},
    {"20","Stellaluna","Janell Cannon","11.2"},
    {"21","Salamandastron (Redwall, Book 5)","Brian Jacques","6.99"},
    {"22","What Color Is Your Underwear?","Sam Lloyd","9.99"},
    {"23","The Grouchy Ladybug","Eric Carle","7.99"},
    {"24","Mr. Popper's Penguins","Richard And Florence Atwater","5.99"},
    {"25","So Big!","Dan Yaccarino","7.99"},
    {"26","On Noah's Ark","Jan Brett","10.95"},
    {"27","Hey! Wake Up!","Sandra Boynton","6.95"},
    {"28","Can You Cuddle Like a Koala?","John Buttler","5.99"},
    {"30","Somebunny Loves Me: A Fuzzy Board Book","Joan Holub","4.99"}};
         JTable table=new JTable(friendList,colNames);
         JScrollPane scrollPane=new JScrollPane(table);
         public ProductTable(){
              Container contentPane=getContentPane();
              contentPane.add(scrollPane);
              setSize(500,200);
              setVisible(true);
         public static void main( String args[] )
              ProductTable app = new ProductTable();
              app.addWindowListener(
         new WindowAdapter() {
         public void windowClosing( WindowEvent e )
         System.exit( 0 );

Maybe you are looking for

  • Managing multiple Office 365 accounts

    Hi Does anyone have a good solution to managing multiple Office 365/Exchange 365 accounts? I provide IT services to a number of small businesses, all unrelated and I am responsible for over 6 separate instances of Office 365 (mostly Exchange, a coupl

  • Tomcat 5 with SSL

    Hi, I am having trouble getting Tomcat to work with SSL. I have created a PKCS12 keystore with 1 entry. When I look at with keytool it says it has "Entry type: keyEntry" and "Certificate chain length: 1" In my server.xml file I have <Connector port="

  • Can't open Zip file

    I've been emailed a zip file with the extension .docx. I can't open this. When I click on it to unzip it, it turns into another zip file with the extension .cpgz. I've Stuffit Deluxe 8.0 on my Powermac G5.

  • Network Path Problem

    Hi,    I created a File System Repository following the steps in help. But with the network path it throws the following error in Component Monitor. Startup Error: The localroot does not exist: C:\usr\sap\IGTE\j2ee\j2ee_00\cluster\server\NWP My netwo

  • Can we avoid specifying User ID & password for connecting to LiveCycle server through code?

    Hi, I am developing a JAVA program that connects to the LiveCycle ES server to assemble two PDF files. Here is some part of the code I am using. The code works fine. Properties connectionProps = new Properties(); connectionProps.setProperty(ServiceCl