public void readFile(String str){
    	JObjective obj = null;
		boolean unit=false;
    	try{
    		FileReader fr = new FileReader(str);
    		BufferedReader br = new BufferedReader(fr);
    		StreamTokenizer st = new StreamTokenizer(br);
    		st.whitespaceChars(44, 44);
    		int count2 = 0;		//running count to add alternative data
    		int last_line = 1;
    		HashMap alt_data = null;
    		while(st.nextToken() != StreamTokenizer.TT_EOF) {
    			// read first line into objective list
    			if(st.lineno()==1){

     				if(st.ttype==StreamTokenizer.TT_WORD){
     					//if = unit set flag to true then have anotherit that processes i flag is true then set flag to false
     					//can also determine domain here
     					if (unit){
     						obj.setUnit(st.sval);
     						obj.setDomainType(JObjective.CONTINUOUS);
     						unit = false;
     					}
     					else if ((st.sval).equals("unit")){
     						unit =	true;
     					}
     					else{
	    					obj = new JObjective(st.sval);
	    					obj.setDomainType(JObjective.DISCRETE);	//default to discrete, change to continuous if unit found
	    					obj.origin = JObjective.FROM_FILE;
	    					obj_list.add(obj);
     					}
    				}
    			}
    			
    		    // read second line to determine domain type        
    			else {
				if (last_line!=st.lineno()){
					if(st.lineno()!=2)	
						alts.add(alt_data);
					alt_data = new HashMap();
					count2=0;
					last_line = st.lineno();    					
				}
				JObjective temp = (JObjective)obj_list.get(count2);
				if (temp.getType()==1)
					alt_data.put(temp.getName(), st.sval);   						
				else{
					alt_data.put(temp.getName(), Double.valueOf(st.nval));
				}
					
				count2++;
    			}    			
    		}    		
    		alts.add(alt_data);	//add last alternative    		
    		//for debugging
    		//for (int i=0; i<alts.size(); i++)
    		//	System.out.println("alts HERE" + alts.get(i));
    		fr.close();
    	}catch(Exception e) {
    		System.out.println("Exception: " + e);
    	}
    	pnlObjectives.setFileObjectives(obj_list);
    	pnlAlternatives.setFileAlternatives(obj_list, alts);
    	
    }