Hashmap Troubles

Hi All,
I'm having trouble with a HashMap in my program. It is replacing all values when a key value pair is inserted. My HashMap is declared as HashMap<Integer,ArrayList<WrapperObject>>. . When I print out the values of the HashMap the following behavior is observed:
This pair is added: {4=[Wrapper Object ID: 5], 5=[]}
This is the full hashmap: {4=[Wrapper Object ID: 5], 3=[], 5=[]}
This pair is added : {6=[Wrapper Object  ID: 7], 7=[]}
This is the full hashmap:{4=[Wrapper Object  ID: 7], 6=[Job Wrapper ID: 7], 3=[], 7=[], 5=[]}
Does anybody have any idea why this is occuring?
TIA,
Adam

Then how might I get around this issue? Could I
overide hashCode?The Key is integer, so I don't think hashcode is ever called on your value object (Wrapper).
How should I appropriately
copy/create a new object with the internal variables?You might want two keys pointing to the same object (which is what you have now). If you want more than one object in the map you have to do something other than add the same object again and again.
How to create a new one is up to you. (Why can't you do it the same way you created the first object?)

Similar Messages

  • Serious HashMap trouble

    Hi All
    I am really puzzled by this problem. When I run the following code:
    import java.util.*;
    public class HM
        public static void main (String [] args)
            HashMap hmap = new HashMap ();
    }I get the message ERROR: Type HashMap was not found. Do I need to import some other class? Is there some version of JDK that does not include the HashMap???
    I tested it using the JDK I downloaded and the one included with JBuilder.
    I hope to hear from someone soon.
    Regards,
    Comlink

    HashMap was introduced in java version 1.2.
    If you can compile that code but not run it, I can't help wondering if you have an improperly installed java installation, such that you invoke a recent javac but the Windows default jvm, which I think is stuck on version 1.1.
    That's just a guess.

  • I'm having Trouble with a Simple Histogram

    The program as a whole is supposed to read a text file, count the number of words, and ouput it. For example, "The The The pineapple pineapple" should ouput "The 3, Pineapple 2" I've gotten as far as dumping the tokens into an array and creating 2 empty arrays of the same size(word, count), but I don't know how to do the double loop that's necessory for the count. Please see my "hist()" method, this is where I'm having trouble. Any suggestions at all would be greatly appreciated. import java.io.*;
    import java.util.*;
    /*class Entry {
        String word;
        int count;
    class main { 
        public static void main(String[] args){
         main h = new main();
         h.menu();
        String [] wrd;
        String [] words;
        int[] count;
        int wordcount = 0;
        int foundit = -1;
        int size;
        int numword = 0;
        int i = 0;
        int j = 0;
        int elements = 0;
        public void menu() {
          System.out.println("Welcome to Histogram 1.0");
          BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
          while(true){
              System.out.println("Please enter one of the following commands: open, hist, show, save, help, or quit");
              String s = null;
              try {s = in.readLine();} catch (IOException e) {}
              if (s.equals("open")) open();
              else if (s.equals("hist")) hist();
              else if (s.equals("show")) show();
              else if (s.equals("save")) save();
              else if (s.equals("help")) help();
              else if (s.equals("quit")) {
                  System.exit(0);
         public void open(){
         // prompt user for name of file and open it
         System.out.println("Enter Name Of File: ");
         BufferedReader in = new BufferedReader(new InputStreamReader (System.in));
         String filename = null;
         try{ filename = in.readLine();}
         catch(IOException e)  {}
         BufferedReader fin = null;
         try { fin = new BufferedReader (new FileReader(filename));}
         catch (FileNotFoundException e){
             System.out.println("Can't open file "+filename+" for reading, please try again.");
             return;
         // read file for 1st time to count the tokens
         String line = null;
         try{ line = fin.readLine();}
         catch(IOException e) {}
         StringTokenizer tk = new StringTokenizer(line);
         while(line!= null){
             try{ line = fin.readLine();}
             catch(IOException e) {}
             //tk = new StringTokenizer(line);
             wordcount += tk.countTokens();
             System.out.println("wordcount = " + wordcount);
         // close file
         try{fin.close();}
         catch(IOException e){
             System.out.println( filename+" close failed");
         // now go through file a second time and copy tokens into the new array
         wrd = new String [wordcount];
            BufferedReader fin2 = null;
            try{ fin2 = new BufferedReader (new FileReader(filename));}
            catch(FileNotFoundException e){
                System.out.println("Can't open file "+filename+" for reading, please try again.");
                return;
            String pop = null;
            try{ pop = fin2.readLine();}
            catch(IOException e) {}
            StringTokenizer tk2 = new StringTokenizer(pop);
         int nextindex = 0;
         while(pop!=null){
             while (tk2.hasMoreTokens()) {
              wrd[nextindex] = tk2.nextToken();
              nextindex++;
             try{ pop = fin2.readLine();}
             catch(IOException e) {}
             //tk2 = new StringTokenizer(pop);
         try{fin2.close();}
         catch(IOException e){
             System.out.println(filename+" close failed");
         for(int k=0;  k<wordcount; k++){
            System.out.println(wrd[k]);
        public void hist() {
            //prints out all the tokens
           words = new String[wordcount];
           count = new int[wordcount];
           //boolean test = false;
               for(int m=0; m<wordcount; m++){
                   if(words.equals(wrd[m])){
                       System.out.print("match");        
                   else{
                       words[m] = wrd[m];
                       count[m] = 1;
        public void show() {
         //shows all the tokens
         for(int j=0; j<wordcount; j++){
              System.out.print(words[j]);
              System.out.print(count[j]);
        public void save() {
            //Write the contents of the entire current histogram to a text file
            PrintWriter out = null;
            try { out = new PrintWriter(new FileWriter("outfile.txt"));}
            catch(IOException e) {}
            for (int i= 0; i<wordcount; i++) {
                out.println(words);
    out.println(count[i]);
    out.close();
    public void help() {
    System.out.println(" This help will tell you what each command will do.");
    System.out.println("");
    System.out.println(" open - this command will open a text file that must be in the same directory ");
    System.out.println(" as the program and scan through it counting how many words it has, ");
    System.out.println("");
    System.out.println(" hist - after you use the open command to open the text file the hist command will ");
    System.out.println(" make a tally sheet counting how many times each word has been used. ");
    System.out.println("");
    System.out.println(" show - after you have opened the file with the open command and created a histogram ");
    System.out.println(" with the hist command the show command will show a portion of or the entire h histogram. ");
    System.out.println("");
    System.out.println(" (show) just by itself will show the entire histogram. ");
    System.out.println("");
    System.out.println(" (show abc) will show the histogram count for the text abc if it exists. ");
    System.out.println(" If the text is not found it will display text not found. ");
    System.out.println("");
    System.out.println(" (show pr*) will show the histogram count for all text items that begin with ");
    System.out.println(" the letters pr, using * as a wild card character. ");
    System.out.println("");
    System.out.println(" save - after you have opened the file with the open command, and created the histogram ");
    System.out.println(" with the hist command the save command will save the contents of the entire current histogram. ");
    System.out.println(" to a text file that you choose the name of. If the file already exists the user will be prompted ");
    System.out.println(" for confirmation on if they want to pick another name or overwrite the file.");
    System.out.println("");
    System.out.println(" quit - will quit the program. " );

    Couple of points to begin with:
    1. Class names should begin with an upper case letter
    2. Class names should be descriptive
    3. You shouldn't call your class main (this kind of follows from the first two points).
    4. Always use {} around blocks of code, it will make your life, and those of the people who have to eventually maintain your code a lot easier.
    5. Never ignore exceptions, i.e. don't use an empty block to catch exceptions.
    6. Avoid assiging a local variable to null, especially if the only reason you are doing it is to "fix" a compilation error.
    7. Your method names should reflect everything that the method does, this should encourage you to break the application logic down into the smallest tasks possible (a general rule is that each method should do one task, and do it well). In the example below, I ignore this advice in the loadFile() method, but it's left as an exercise to you to fix this.
    8. You should use descriptive variable names (fin may make sense now, but will it in 6 months time?), and use camel case where the name uses multiple words, e.g. wordcount should be wordCount
    On the problem at hand, I'll post a cut down example of what you want, and you can look at the javadocs, and find out how it works.
    This code uses the auto-boxing feature of 1.5 (even though I don't like it, again it's left as an exercise for you to remove the auto-boxing ;) ) and some generics (you should be able to work out how to use this code in 1.4).
    import java.io.BufferedReader;
    import java.io.FileNotFoundException;
    import java.io.FileReader;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.util.HashMap;
    import java.util.Map;
    import java.util.StringTokenizer;
    public class Histogram {
        /** Map to box the words. */
        private Map<String, Integer> wordMap = new HashMap<String, Integer>();
         * Main method.
         * @param args
         *        Array of command line arguments
        public static void main(String[] args) {
            Histogram h = new Histogram();
            h.menu();
         * Display the menu, and enter program loop.
        public void menu() {
            System.out.println("Welcome to Histogram 1.0");
            BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
            while (true) {
                System.out.println("Please enter one of the following commands: open, hist, show, save, help, or quit");
                String s = null;
                try {
                    s = in.readLine();
                } catch (IOException e) {
                    System.out.println("Unable to interpret the input.");
                    continue;
                if (s.equals("open")) {
                    loadFile();
                } else if (s.equals("quit")) {
                    System.exit(0);
         * Ask the user for a file name and load it
        public void loadFile() {
            System.out.println("Enter Name Of File: ");
            BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
            String filename = null;
            try {
                filename = reader.readLine();
                reader = new BufferedReader(new FileReader(filename));
                loadWords(reader);
                reader.close();
            } catch (FileNotFoundException e) {
                System.out.println("Can't open file " + filename + " for reading, please try again.");
                return;
            } catch (IOException e) {
                System.out.println(filename + " close failed");
            displayHistogram();
         * Load the words from the file into the map.
         * @param reader
        private void loadWords(BufferedReader reader) {
            int wordCount = 0;
            try {
                String line = reader.readLine();
                while (line != null) {
                    StringTokenizer tk = new StringTokenizer(line);
                    wordCount += tk.countTokens();
                    while (tk.hasMoreTokens()) {
                        String next = tk.nextToken();
                        if (wordMap.containsKey(next)) {
                            wordMap.put(next, (wordMap.get(next).intValue() + 1));
                        } else {
                            wordMap.put(next, 1);
                    System.out.println("line: " + line + " word count = " + wordCount);
                    line = reader.readLine();
            } catch (IOException e) {
                System.out.println("Unable to read next line");
         * Display the words and their count.
        private void displayHistogram() {
            System.out.println("Map of words: " + wordMap);
    }

  • Trouble with TreeMap

    Hallo everyone,
    I have as a Input CSV-like text file with a names of Decathlon athletes who have 10 diffrent results of each compitition written after each name. I made two classes, one (for the athletes) with String name and one for the Results with int points and Method that converts the times into Decathlon points. I could get all the names and the their points outputed. So it works fine. Now the trouble is that I have to put them in ascending order of their places. So I have to save them some how to compare with each other. I tried to use TreeMap for that. But can not understand how it works, cuz both key and value have to be taken from the file. Not like this example shows:
    Map textFieldMap = new HashMap();
    textFieldMap.put("1", new JTextField());
    textFieldMap.put("2", new JTextField());
    JTextField textField = (JTextField)textFieldMap.get("1");
    textField.setText("some value"); // text field associated with "1"
    but so that the loop puts the points as the key and name as value into TreeMap so at the end I could output it in ascending order. I really was trying to fix the problem but couldnt fine the solution. Can someone explain me how it works. I paste my main method code whitch outputs:
    4197 Siim Susi
    3199 Beata Kana
    3493 Jaana Lind
    3101 Anti Loop
    so hier is the code:
    I import io*, util*, lang*
    public class Decathlon {
    public static void main(String args[]) throws Exception {
    //read data from file
    File f = new File("C:\\Dokumente und Einstellungen\\RT\\IdeaProjects\\HansaDecat\\src\\10v_tulemused.txt");
    BufferedReader source =
    new BufferedReader(new FileReader(f));
    String line; //input of one line
    Results oneResult = new Results();
    Sportsmen oneSportsman = new Sportsmen();
    Time2Double timeobject = new Time2Double();
    TreeMap map = new TreeMap();
    int z=0;
    while ((line = source.readLine()) != null) {
    for (int i = 0; i <= 10; i++) {
    String[] lineUnits = line.split(";");
    if (i == 10) {  // 10th competition
    String aeg = lineUnits[10];
    StringTokenizer st = new StringTokenizer(aeg, ".");
    for (int a = 0; a < 3; a++) { //devide last result into 3 parts to convert to double
    timeobject.ConvertTime(a, Double.valueOf(st.nextToken()));
    lineUnits[10] = String.valueOf(timeobject.Time); // String.valueof(return of time)
    if(i<1){
    oneSportsman.setName(String.valueOf(lineUnits));
    }else
    oneResult.countScore(i, Double.valueOf(lineUnits[i]));
    //System.out.println(lineUnits[i] + " index" + i);
    // map.put (new Integer(z), new Data(oneResult.getName()));
    // System.out.println(z++);
    // map.put(new Results(), new Sportsmen());
    Sportsmen Sportsman = (Sportsmen)map.get(oneResult.points);
    // Sportsman.setName(oneSportsman.getName()); // text field associated with "1"
    // System.out.println("All sportsmen in Hashtable:\n" + map);
    System.out.println(oneResult.points+" "+oneSportsman.getName());
    /** ( Results elem : map.keySet() )
    System.out.println( elem ); */
    source.close();
    Thank you for Help
    Tanja

    you can use TreeSet instead of TreeMap in that use Comparable interface and override equal and compare methods

  • Java Hashmaps in jdk 1.4

    Hi All,
    I am trying to work out on a previous jdk 1.5 code for hashmap to be converted to jdk 1.4,
    public HashMap<String, String> getDispalyLinkUrls() throws SQLException {
         HashMap<String, String> hashMapValues = new HashMap<String, String>();
    My code looks like above...
    I am getting an error, stating that invalide method declaration and return type required.. Please suggest me, in conversion of my code to jdk 1.4
    Many Thanks!!

    Hi All,
    I am somehow still facin trouble with array list, as it is retrieving only one value or not the appropriate values from the database. Please correct my Hashmap code, wherein I have an object on a jsp, upon which I place the mouse, I should get an object drop down from the database. My JSP code looks like this:
    <div id=Menu0 style="position: absolute; border: 1px solid #000000; visibility:hidden; z-ndex: 1">
    <table bgcolor=white cellspacing=0 cellpadding=0 style="border-collapse: collapse;">
    <%
    DisplayLinkUrls displayLinkUrl = new DisplayLinkUrls();
    HashMap<String, String> hmValues = displayLinkUrl.getDispalyLinkUrls();
    for(String strKey :hmValues.keySet()) {
         %>
    <tr height=25 onmouseout=menuOut(this,'#ffeecc') onmouseover=menuOver(this,'#FFFFFF')>
    <td bgcolor=white>   </td><td align=right>
    <a class=asd href="<%=hmValues.get(strKey)%>">  <%=strKey%>  </a>    </td></tr>
    <%
    %>
    </table>
    </div>
    My Servlet to which it calls when connecting DB looks like this:
         public HashMap<String, String> getDispalyLinkUrls() throws SQLException {
         HashMap<String, String> hashMapValues = new HashMap<String, String>();
         //Set set = hashMapValues.entrySet();
    //Iterator i=set.iterator();
              DisplayLinkUrls displayLinkUrl = new DisplayLinkUrls();     
              Statement stmt = displayLinkUrl.getDBConnection().createStatement();
              ResultSet rset = stmt.executeQuery("Select do.link_verbage, do.link_url from dw_user_group dug, dw_profile_object dpo, dw_object do where dug.user_id='AMAHAJAN' and dug.group_id=dpo.group_id and dpo.object_id=do.object_id and do.app_type_code='A' order by do.link_verbage");
              while (rset.next()) {
    System.out.println(rset.getString("LINK_VERBAGE"));
    hashMapValues.put(rset.getString("link_Verbage"), rset.getString("link_url"));
              stmt.close();
              return hashMapValues;
         public static void main(String args[]) throws SQLException {
         DisplayLinkUrls displayLinkUrl = new DisplayLinkUrls();
    for(String url : displayLinkUrl.getDispalyLinkUrls().keySet()) {
    System.out.println(url);
    // System.out.println(displayLinkUrl.getDispalyLinkUrls().get(url));
    Please suggest me.
    Many Thanks!!

  • Trouble understanding static objects

    Hello,
    I have trouble understanding static objects.
    1)
    class TestA
    public static HashMap h = new HashMap();
    So if I add to TestA.h from within a Servlet, this is not a good idea, right?
    But if I just read from it, that is ok, right?
    2)
    class TestB
    public static SimpleDateFormat df = new SimpleDateFormat();
    What about TestB.df from within a Servlet? Is this ok?
    example: TestB.df.format(new Date(1980, 1, 20));

    There is exactly one instance of a static member for every instance of a class. It is okay to use static members in a servlet if they are final, or will not change. If they may change, it is a bad idea. Every call to a servlet launches a new thread. When there are multiple calls, there are multiple threads. If each of these threads are trying to make changes to the static memeber, or use the static memeber while changes are being made, the servelt could give incorrect results.
    I hope that helped..
    Thanks
    Cardwell

  • Help with HashMap!!!

    Hi all,
    My program reads the data from the external file called: "long.txt" which consists of a million records...
    The file is loaded into a list called: "HashMap list" and also store the keys into a separate array. Search is done in HashMap for all the key in the array or also known as an exhaustive search.
    I have the files: "long.txt", "HashMapTestnew.java" and "MyData.java" in the same directory called: "tmp"...
    Everything looks okay but when I try to compile this, I get the following error...
    HashMapTestnew.java:38: cannot resolve symbol
    symbol : class MyData
    location: class MyData.HashMapTestnew
    MyData md = new MyData( sKey, Integer.parseInt(sVal) );
    ^
    HashMapTestnew.java:38: cannot resolve symbol
    symbol : class MyData
    location: class MyData.HashMapTestnew
    MyData md = new MyData( sKey, Integer.parseInt(sVal) );
    ^
    HashMapTestnew.java:55: cannot resolve symbol
    symbol : class MyData
    location: class MyData.HashMapTestnew
    MyData md;
    ^
    HashMapTestnew.java:66: cannot resolve symbol
    symbol : class MyData
    location: class MyData.HashMapTestnew
    md = (MyData) me.getValue();
    ^
    4 errors
    Tool completed with exit code 1
    import java.util.*;
    import java.io.*;
    public class HashMapTestnew
    public static HashMap getMapList()
         String MyData;
         Int sKey;
    String strLine;
    HashMap hm = new HashMap();
    try
    BufferedReader fBR = new BufferedReader( new FileReader("long.txt") );
    while ( fBR.ready() )
    strLine = fBR.readLine();
    if (strLine != null)
    StringTokenizer st = new StringTokenizer(strLine, "\t");
    String sKey = st.nextToken();
    String sVal = st.nextToken();
    MyData md = new MyData( sKey, Integer.parseInt(sVal) );
    hm.put(sKey, md);
    fBR.close();
    catch (IOException ioe)
    System.out.println("I/O Trouble ...");
    return hm;
    public static void showMapList(HashMap hashMap, int n)
    String strVal;
    String strNdx;
    MyData md;
    System.out.println("\nHashMap List (first 10 records):");
    Map.Entry me;
    Set shm = hashMap.entrySet();
    Iterator j = shm.iterator();
    int i = 0;
    while (j.hasNext() && (i++)< n)
    me = (Map.Entry) j.next();
    strVal = (String) me.getKey();
    md = (MyData) me.getValue();
    System.out.println(i + ": " + md.getVal() + "\t" + md.getNdx() );
    public static String[] getKeys(HashMap hashMap)
    String[] key = new String[hashMap.size()];
    Map.Entry me;
    Set shm = hashMap.entrySet();
    Iterator j = shm.iterator();
    int i = 0;
    while (j.hasNext())
    me = (Map.Entry) j.next();
    key[i] = (String) me.getKey();
    i++;
    return key;
    public static void searchMapList(HashMap hashMap, String[] key)
    int i,n=0;
    System.out.println("Search Started:");
    long tim1 = System.currentTimeMillis();
    for (i=0; i<key.length; i++)
    if (hashMap.containsKey(key))
    n++;
    long tim2 = System.currentTimeMillis();
    System.out.println("Search Ended After " + (tim2-tim1) + " miliseconds.");
    System.out.println("Searched for " + key.length + " keys.");
    System.out.println("Found " + n + " keys.");
    public static void main(String[] arg)
    HashMap hashMap = getMapList(); // Create the hash map list
    showMapList(hashMap, 10); // Display part of the hash map list
    String[] searchKey = getKeys(hashMap); // an array of all search keys
    searchMapList(hashMap, searchKey); // Search for all existing keys in the list
    Can anybody help me with this?
    I'm new to Java... What does the error message: "cannot resolve symbol
    symbol : class MyData" mean???
    P.S. When I compiled the file "MyData.java", it compiles without any error...
    Thanks,
    Lilian

    I moved the 3 files ("MyData.java", "long txt" and "HashMapTest.java") to a directory called "MyData" as well as added the code: "package MyData;"
    before the codes:
    import java.util.*;
    import java.io.*;
    just to see if it would make any difference but I still got the following error messages:
    C:\WINDOWS\DESKTOP\MyData\HashMapTest.java:38: cannot resolve symbol
    symbol : class MyData
    location: class MyData.HashMapTest
    MyData md = new MyData( sKey, Integer.parseInt(sVal) );
    ^
    C:\WINDOWS\DESKTOP\MyData\HashMapTest.java:38: cannot resolve symbol
    symbol : class MyData
    location: class MyData.HashMapTest
    MyData md = new MyData( sKey, Integer.parseInt(sVal) );
    ^
    C:\WINDOWS\DESKTOP\MyData\HashMapTest.java:55: cannot resolve symbol
    symbol : class MyData
    location: class MyData.HashMapTest
    MyData md;
    ^
    C:\WINDOWS\DESKTOP\MyData\HashMapTest.java:66: cannot resolve symbol
    symbol : class MyData
    location: class MyData.HashMapTest
    md = (MyData) me.getValue();
    ^
    4 errors
    Tool completed with exit code 1
    By the way, I'm compiling the java program using a Textpad editor and selecting Tools -->> Compile Java...
    Let me know if you have any questions...
    Thanks,
    Lilian
    location: class MyData.HashMapTestnewThis says that you have declared your HashMapTestnew
    class to be in package MyData.
    I have the files: "long.txt", "HashMapTestnew.java"and "MyData.java" in the same directory called:
    "tmp"...
    If you want HashMapTestnew to be in package MyData,
    then it should have been in a directory called MyData.
    But having a class with the same name as a package is
    very confusing, so I don't think you should do that.
    In fact, since you are new to Java I don't think you
    u should use packages at all until you can compile
    non-packaged classes correctly.
    I'm surprised I don't see the line "package MyData" at
    the top of the code you posted. But then I'm not
    surprised, because since your class isn't in the right
    directory for that package, you should have got
    different error messages. What exactly did you type
    at the command line to compile the class?

  • Looking for Hierarchical hashmap

    For resource handling I need to structure my resources :
    for example
    I want to define for key="name" in context="application1/module2/screen4" its value to "name of the customer"
    If the key is not found int this context I want the "hashmap" to search in "application1/module2" context and then in "application1" context.
    Is there a class somewhere that can do that ?

    The Java platform does not currently provide the ResourceBundle you require. However, you can create a custom bundle without too much trouble.
    Regards,
    John O'Conner

  • Vector and HashMap

    what is the complexity of doing a vector.get(position) (vector is a Vector object) ? is it implemented like and have to proceed through the vector til position, or does it jump strigth to the point?
    I have objects whose IDs are integer from 0 to n.
    do I have any advantage using HashMap with ID as key or gievn this property the cost when doing get/set (get/put) operation is the same?
    thanks,
    pao

    Yeah, people can continue to use Vector and ignore
    that someone went through the trouble to create
    something better and probably nothing will be
    affected. I just don't think it's a good way to use a
    tool. True. Though, someone also when through the trouble of making Vector compatible with the List interface. I do agree with you however.
    I also don't understand why HashMap has edged
    out Hashtable but people keep insisting on using
    Vector over ArrayList. I haven't seen where HashMap or Vector have edged out Hashtable or ArrayList respectively. But I suspect that many of the people who learned to use the former classes simply haven't made the leap (perhaps they are not even aware that there is a leap to be made).
    My main problem with Vector is
    that it contains a public interface that is well
    outside of the List interface. Junior developers that
    are not steered away from Vector are more likely to
    miss-out the List interface entirely.Agreed.
    >
    Also, the Java APIs are starting to show their age.
    If Sun decides to make the leap and create a Java
    2.0, they should clean up the JDK. If it were me,
    I'd ax the Vector class. There's no need for two
    array -backed list classes.True, except that it may be necessary for backwards compatibility.

  • Mini-Dvi-to-Video trouble

    I just bought a mini-dvi-to-video adapter so I could use my TV as a display. More specifically, so I could use my VCR to record what's on my Mac's display. I also bought a headphone-to-composite cable adapter. I'm using a double-headed (is that one male or female? It's male, isn't it?) composite cable from the video adapter to the VCR. The problem is, it doesn't show up. The sound plays (and records) fine, but the video neither shows up on the TV screen nor records onto the tape. What's the problem? Both adapters are Dynex, my computer's a Late 2006 iMac (I think), the cable is WireLogic, and both the VCR and TV are Sony. Please help, thanks.

    So if you eliminate the double headed splitter and plug straight into the TV, does the video still not show up?
    FYI, there have been reports in the past of trouble with the Dynex video adapter. You may need to purchase the Apple OEM one. The Dynex may lack having a ROM inside of it with a proper EDID in the ROM. This is crucial to the Mac.

  • Trouble Using Apple's Video Adapter

    I am having trouble getting my eMac to work with the Apple Mini-DVI to Video Adapter. There are no directions telling you how to use it or to even get it to work. I want to use it to import videos from my Sony Hi8 camcorder and was told by Apple's Live help that this is what I needed to import video and make DVDs. How do I get this adapter to work?

    Welcome aboard.
    I think the adapter you have is for video output, not input. To input video to the eMac you need a firewire connection. Sony cameras typically have a 4 wire connector which is smaller than the 6 wire plug on the mac, so you need a cable that has a 4 wire connector on one end and a 6 wire connector on the other. Cameras often (but not always) come with such a cable. You also need a digital camcorder- not just Hi8., although Sony does make cameras that will do both. If you camera does not have digital output, you need a convertor box.

  • Hi, I am having trouble MacBook Air crashing since Yosemite upgrade. I ran an Etresoft check but I don't know what it means... my system runs slowly and crashes. I have to force shutdown. Sometimes screen is black for a split second b/w webmail pages

    Hello,
    I am having trouble with my MacBook Air 13 inch June 2012 MacBook Air5, 2 4GB RAM  details below in Etresoft report. I recently upgraded to Yosemite and am having system trouble. My computer crashes and I have to force quit to restart. When using webmail there is a black screen for a split second between pages. This did not happen before. I am worried that it is not running properly and perhaps I need to revert to the previous operating system. I only have a MacBook Air and no need to share images between a tablet or phone so I did not need the new photo sharing software of Yosemite. I wonder if I don't have enough RAM to run it? I did not run time machine before I made the upgrade as I did not realise the significance of an upgrade as not very Mac literate. Any advice on whether my system is in danger... most appreciated! I am writing a book and making a back up but this machine is my lifeline and my work is conducted through it. It ran perfectly before... the Yosemite upgrade has perhaps highlighted some problems and it has unnerved me!
    Thanks ever so much for your advice!
    Lillibet
    EtreCheck version: 2.2 (132)
    Report generated 5/2/15, 9:53 PM
    Download EtreCheck from http://etresoft.com/etrecheck
    Click the [Click for support] links for help with non-Apple products.
    Click the [Click for details] links for more information about that line.
    Hardware Information: ℹ️
        MacBook Air (13-inch, Mid 2012) (Technical Specifications)
        MacBook Air - model: MacBookAir5,2
        1 1.8 GHz Intel Core i5 CPU: 2-core
        4 GB RAM Not upgradeable
            BANK 0/DIMM0
                2 GB DDR3 1600 MHz ok
            BANK 1/DIMM0
                2 GB DDR3 1600 MHz ok
        Bluetooth: Good - Handoff/Airdrop2 supported
        Wireless:  en0: 802.11 a/b/g/n
        Battery: Health = Normal - Cycle count = 694 - SN = D86218700K2DKRNAF
    Video Information: ℹ️
        Intel HD Graphics 4000
            Color LCD 1440 x 900
    System Software: ℹ️
        OS X 10.10.3 (14D136) - Time since boot: 0:22:41
    Disk Information: ℹ️
        APPLE SSD SM256E disk0 : (251 GB)
            EFI (disk0s1) <not mounted> : 210 MB
            Recovery HD (disk0s3) <not mounted>  [Recovery]: 650 MB
            Macintosh HD (disk1) / : 249.77 GB (167.35 GB free)
                Encrypted AES-XTS Unlocked
                Core Storage: disk0s2 250.14 GB Online
    USB Information: ℹ️
        Apple, Inc. Keyboard Hub
            Mitsumi Electric Apple Optical USB Mouse
            Apple Inc. Apple Keyboard
        Apple Inc. FaceTime HD Camera (Built-in)
        Apple Inc. BRCM20702 Hub
            Apple Inc. Bluetooth USB Host Controller
        Apple Internal Memory Card Reader
        Apple Inc. Apple Internal Keyboard / Trackpad
    Thunderbolt Information: ℹ️
        Apple Inc. thunderbolt_bus
    Gatekeeper: ℹ️
        Mac App Store and identified developers
    Kernel Extensions: ℹ️
            /Applications/WD +TURBO Installer.app
        [not loaded]    com.wdc.driver.1394HP (1.0.11 - SDK 10.4) [Click for support]
        [not loaded]    com.wdc.driver.1394_64HP (1.0.1 - SDK 10.6) [Click for support]
        [not loaded]    com.wdc.driver.USB-64HP (1.0.3) [Click for support]
        [not loaded]    com.wdc.driver.USBHP (1.0.14) [Click for support]
            /System/Library/Extensions
        [not loaded]    com.wdc.driver.1394.64.10.9 (1.0.1 - SDK 10.9) [Click for support]
        [loaded]    com.wdc.driver.USB.64.10.9 (1.0.1 - SDK 10.9) [Click for support]
    Problem System Launch Daemons: ℹ️
        [failed]    com.apple.mtrecorder.plist
    Launch Agents: ℹ️
        [running]    com.mcafee.menulet.plist [Click for support]
        [running]    com.mcafee.reporter.plist [Click for support]
        [loaded]    com.oracle.java.Java-Updater.plist [Click for support]
    Launch Daemons: ℹ️
        [running]    com.adobe.ARM.[...].plist [Click for support]
        [loaded]    com.adobe.fpsaud.plist [Click for support]
        [failed]    com.apple.spirecorder.plist
        [running]    com.mcafee.ssm.Eupdate.plist [Click for support]
        [running]    com.mcafee.ssm.ScanManager.plist [Click for support]
        [running]    com.mcafee.virusscan.fmpd.plist [Click for support]
        [loaded]    com.oracle.java.Helper-Tool.plist [Click for support]
    User Launch Agents: ℹ️
        [loaded]    com.adobe.ARM.[...].plist [Click for support]
        [loaded]    com.google.keystone.agent.plist [Click for support]
    User Login Items: ℹ️
        iTunesHelper    Application Hidden (/Applications/iTunes.app/Contents/MacOS/iTunesHelper.app)
        Dropbox    Application  (/Applications/Dropbox.app)
        AdobeResourceSynchronizer    Application Hidden (/Applications/Adobe Reader.app/Contents/Support/AdobeResourceSynchronizer.app)
        EvernoteHelper    Application  (/Applications/Evernote.app/Contents/Library/LoginItems/EvernoteHelper.app)
        TouchP-150M    Application  (/Applications/Canon P-150M/TouchP-150M.app)
        iPhoto    Application  (/Applications/iPhoto.app)
        WDDriveUtilityHelper    Application  (/Applications/WD Drive Utilities.app/Contents/WDDriveUtilityHelper.app)
        WDSecurityHelper    Application  (/Applications/WD Security.app/Contents/WDSecurityHelper.app)
    Internet Plug-ins: ℹ️
        FlashPlayer-10.6: Version: 17.0.0.169 - SDK 10.6 [Click for support]
        QuickTime Plugin: Version: 7.7.3
        AdobePDFViewerNPAPI: Version: 11.0.10 - SDK 10.6 [Click for support]
        AdobePDFViewer: Version: 11.0.10 - SDK 10.6 [Click for support]
        Flash Player: Version: 17.0.0.169 - SDK 10.6 [Click for support]
        Default Browser: Version: 600 - SDK 10.10
        JavaAppletPlugin: Version: Java 8 Update 45 Check version
    3rd Party Preference Panes: ℹ️
        Flash Player  [Click for support]
        FUSE for OS X (OSXFUSE)  [Click for support]
        Java  [Click for support]
        MacFUSE  [Click for support]
        NTFS-3G  [Click for support]
    Time Machine: ℹ️
        Skip System Files: NO
        Mobile backups: ON
        Auto backup: YES
        Volumes being backed up:
            Macintosh HD: Disk size: 249.77 GB Disk used: 82.42 GB
        Destinations:
            My Passport Edge for Mac [Local]
            Total size: 499.94 GB
            Total number of backups: 27
            Oldest backup: 2013-01-31 21:15:26 +0000
            Last backup: 2015-05-02 11:33:09 +0000
            Size of backup disk: Adequate
                Backup size 499.94 GB > (Disk used 82.42 GB X 3)
    Top Processes by CPU: ℹ️
             6%    WindowServer
             3%    fontd
             2%    VShieldScanManager
             0%    taskgated
             0%    notifyd
    Top Processes by Memory: ℹ️
        745 MB    Google Chrome Helper(8)
        439 MB    kernel_task
        246 MB    VShieldScanner(3)
        160 MB    Google Chrome
        127 MB    Finder
    Virtual Memory Information: ℹ️
        130 MB    Free RAM
        3.87 GB    Used RAM
        0 B    Swap Used
    Diagnostics Information: ℹ️
        May 2, 2015, 09:30:08 PM    Self test - passed
        May 2, 2015, 08:52:59 PM    /Users/[redacted]/Library/Logs/DiagnosticReports/soffice_2015-05-02-205259_[red acted].crash
        May 2, 2015, 09:28:53 AM    /Library/Logs/DiagnosticReports/backupd_2015-05-02-092853_[redacted].cpu_resour ce.diag [Click for details]
        May 1, 2015, 05:45:24 PM    /Users/[redacted]/Library/Logs/DiagnosticReports/EvernoteHelper_2015-05-01-1745 24_[redacted].crash
        May 1, 2015, 05:38:54 PM    /Library/Logs/DiagnosticReports/mds_2015-05-01-173854_[redacted].crash
        May 1, 2015, 05:38:43 PM    /Library/Logs/DiagnosticReports/mds_2015-05-01-173843_[redacted].crash
        May 1, 2015, 05:38:32 PM    /Library/Logs/DiagnosticReports/mds_2015-05-01-173832_[redacted].crash
        May 1, 2015, 05:38:27 PM    /Library/Logs/DiagnosticReports/mds_2015-05-01-173827_[redacted].crash
        May 1, 2015, 05:38:10 PM    /Library/Logs/DiagnosticReports/mds_2015-05-01-173810_[redacted].crash
        May 1, 2015, 05:38:00 PM    /Library/Logs/DiagnosticReports/mds_2015-05-01-173800_[redacted].crash
        May 1, 2015, 05:37:49 PM    /Library/Logs/DiagnosticReports/mds_2015-05-01-173749_[redacted].crash
        May 1, 2015, 05:37:38 PM    /Library/Logs/DiagnosticReports/mds_2015-05-01-173738_[redacted].crash
        May 1, 2015, 05:37:27 PM    /Library/Logs/DiagnosticReports/mds_2015-05-01-173727_[redacted].crash
        May 1, 2015, 05:37:22 PM    /Library/Logs/DiagnosticReports/mds_2015-05-01-173722_[redacted].crash
        May 1, 2015, 05:37:06 PM    /Library/Logs/DiagnosticReports/mds_2015-05-01-173706_[redacted].crash
        May 1, 2015, 05:36:55 PM    /Library/Logs/DiagnosticReports/mds_2015-05-01-173655_[redacted].crash
        May 1, 2015, 05:36:44 PM    /Library/Logs/DiagnosticReports/mds_2015-05-01-173644_[redacted].crash
        May 1, 2015, 05:36:33 PM    /Library/Logs/DiagnosticReports/mds_2015-05-01-173633_[redacted].crash
        May 1, 2015, 05:36:22 PM    /Library/Logs/DiagnosticReports/mds_2015-05-01-173622_[redacted].crash
        May 1, 2015, 05:36:17 PM    /Library/Logs/DiagnosticReports/mds_2015-05-01-173617_[redacted].crash
        May 1, 2015, 05:36:01 PM    /Library/Logs/DiagnosticReports/mds_2015-05-01-173601_[redacted].crash
        May 1, 2015, 05:35:50 PM    /Library/Logs/DiagnosticReports/mds_2015-05-01-173550_[redacted].crash
        May 1, 2015, 05:35:39 PM    /Library/Logs/DiagnosticReports/mds_2015-05-01-173539_[redacted].crash
        May 1, 2015, 05:35:28 PM    /Library/Logs/DiagnosticReports/mds_2015-05-01-173528_[redacted].crash
        May 1, 2015, 05:20:29 PM    /Users/[redacted]/Library/Logs/DiagnosticReports/soffice_2015-05-01-172029_[red acted].crash
        May 1, 2015, 04:55:05 PM    /Users/[redacted]/Library/Logs/DiagnosticReports/soffice_2015-05-01-165505_[red acted].crash
        May 1, 2015, 02:53:58 PM    /Library/Logs/DiagnosticReports/sharingd_2015-05-01-145358_[redacted].crash
        Apr 20, 2015, 09:31:20 PM    /Library/Logs/DiagnosticReports/Kernel_2015-04-20-213120_[redacted].panic [Click for details]

    When you have kernel panics, the pertinent information is in the panic report.
    These instructions must be carried out as an administrator. If you have only one user account, you are the administrator.
    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad and start typing the name.
    In the Console window, select
              DIAGNOSTIC AND USAGE INFORMATION ▹ System Diagnostic Reports
    (not Diagnostic and Usage Messages) from the log list on the left. If you don't see that list, select
              View ▹ Show Log List
    from the menu bar.
    There is a disclosure triangle to the left of the list item. If the triangle is pointing to the right, click it so that it points down. You'll see a list of reports. A panic report has a name that begins with "Kernel" and ends in ".panic". Select the most recent one. The contents of the report will appear on the right. Use copy and paste to post the entire contents—the text, not a screenshot.
    If you don't see any reports listed, but you know there was a panic, you may have chosen Diagnostic and Usage Messages from the log list. Choose DIAGNOSTIC AND USAGE INFORMATION instead.
    In the interest of privacy, I suggest that, before posting, you edit out the “Anonymous UUID,” a long string of letters, numbers, and dashes in the header of the report, if it’s present (it may not be.)
    Please don’t post other kinds of diagnostic report.
    I know the report is long, maybe several hundred lines. Please post all of it anyway.

  • I had a 1 TB Drive that was connected as a back up, but it is no longer recognized by the mac.  How may I trouble shoot to reconnect?

    how do I trouble shoot this?

    emanwine wrote:
    Got it to connect and it is my back up. ...
    Good News.
    If this is your only Backup would suggest getting a New EHD and creating another one... Preferably a Clone if you don't already have one.
    http://www.bombich.com/
    Can never have too many Backups...

  • I am having trouble printing to an Epson XP600.  It is a new printer and it has been replaced because we thought it was the printer.  Basically, when I print from Excel, only color will print.

    I am having trouble printing to an Epson XP600.  We have replaced the printer and we are still having the same problem.  When I try to print from Excel, only the color prints.  Any suggestions?

    Has anyone else had issues not being able to print black (such as a document)?  My photos print great, but when I try to print a simple black-ink document, it won't work. Any suggestions?

  • I have been having a lot of trouble with the latest itunes update and my ipod classic 80Gb i.e. being unable to sync songs, but now i have no files at all on my ipod, it is completely blank when i view it from my computer. I need help, please, anybody.

    As it says above, i have been having a lot f trouble with my ipod classic and the latest itunes update, i was unable to sync songs or anything to it and have tried every conceivable 'fix' i could find. i have run an itunes diagnostic and the results are posted below. a major problem is that when i try and view my ipod through my computer it displays nothing at all on the ipod, no files or anything, this may be the problem but i have no idea how it has happened or how i could resolve it.
    This ipod holds huge sentimental value and i am loathe to buy a new one! If anybody can help it is greatly appreciated, than kyou in advanced.
    Microsoft Windows 7 x64 Home Premium Edition Service Pack 1 (Build 7601)
    ASUSTeK Computer Inc. K50IJ
    iTunes 11.1.5.5
    QuickTime not available
    FairPlay 2.5.16
    Apple Application Support 3.0.1
    iPod Updater Library 11.1f5
    CD Driver 2.2.3.0
    CD Driver DLL 2.1.3.1
    Apple Mobile Device 7.1.1.3
    Apple Mobile Device Driver 1.64.0.0
    Bonjour 3.0.0.10 (333.10)
    Gracenote SDK 1.9.6.502
    Gracenote MusicID 1.9.6.115
    Gracenote Submit 1.9.6.143
    Gracenote DSP 1.9.6.45
    iTunes Serial Number 0038B8600B98D1E0
    Current user is not an administrator.
    The current local date and time is 2014-03-21 16:52:39.
    iTunes is not running in safe mode.
    WebKit accelerated compositing is enabled.
    HDCP is not supported.
    Core Media is supported.
    Video Display Information
    Intel Corporation, Mobile Intel(R) 4 Series Express Chipset Family
    Intel Corporation, Mobile Intel(R) 4 Series Express Chipset Family
    **** External Plug-ins Information ****
    No external plug-ins installed.
    Genius ID: 2fd81a1f13cf3ff25a8b4f0e8e725116
    **** Device Connectivity Tests ****
    iPodService 11.1.5.5 (x64) is currently running.
    iTunesHelper 11.1.5.5 is currently running.
    Apple Mobile Device service 3.3.0.0 is currently running.
    Universal Serial Bus Controllers:
    Intel(R) ICH9 Family USB Universal Host Controller - 2934.  Device is working properly.
    Intel(R) ICH9 Family USB Universal Host Controller - 2935.  Device is working properly.
    Intel(R) ICH9 Family USB Universal Host Controller - 2936.  Device is working properly.
    Intel(R) ICH9 Family USB Universal Host Controller - 2937.  Device is working properly.
    Intel(R) ICH9 Family USB Universal Host Controller - 2938.  Device is working properly.
    Intel(R) ICH9 Family USB Universal Host Controller - 2939.  Device is working properly.
    Intel(R) ICH9 Family USB2 Enhanced Host Controller - 293A.  Device is working properly.
    Intel(R) ICH9 Family USB2 Enhanced Host Controller - 293C.  Device is working properly.
    No FireWire (IEEE 1394) Host Controller found.

    Here is what worked for me:
      My usb hub, being usb2, was too fast. I moved the wire to a usb port directory on my pc. That is a usb1 port which is slow enough to run your snyc.

Maybe you are looking for

  • Photoshop CS2 won't let me open?

    I received Photoshop CS2 from Adobe because they shut down the CS server, killing my program. I installed the program using their serial number and when I open it, it says the serial number was not installed and then when I push 'ok' it shuts down. H

  • Chinese display improperly in Safari and Firefox after OSX 10.6.7 update

    After updating to 10.6.7 some Chinese websites don't display properly in both Safari and Firefox on my '08 book pro, while the '09 iMac has no such problem. On the book pro Chinese characters appear as unreadable squiggles. Other apps (word, mail, ph

  • I;ve bought an iphone 5s at a yard sale and its lock to ud,how can i unlicloock it

    i;ve purchase an iphone 5s at a yard sale an its lock to icloud

  • Price in intercompany STO.

    Hi All, We have intercompany STO.  The supplying plant is China and recieving Newzealand.  We have maintained Vendor for supplying plant with currency USD. But on STO, system takes valuation price for condtiion type (P101) in currency CNY.  Document

  • Scaling photos into Light Box or Slide show

    I will look for a tutorial on this but... I dont seem to be able to find a way that images (photos) of different sizes can be  correctly displayed to size and proportion in a Light Box or Slide Show. I have tried the "fit" and proportion" options to