import java.io.*;
public class Www
{
public static void main(String args[]) throws IOException
{  int i=0,j,k=0,m,count = 0;
   char []a=new char[15];
   
FileReader f=new FileReader("bb.txt");
BufferedReader br=new BufferedReader(f);

 
  int b[]=new int[100];
  
  
 String str ,s; 
      str=br.readLine();
   
    
      int k1=0;
       int k2=0;
       String[] str1=new String[100];
      
       for(j=0;j<100;j++) 
        
       {
   k1=str.indexOf("www.",k); 
           k2=str.indexOf("www.",k1+1); 
          if(k2==-1)
         {
          
        str1[j]=str.substring(k1);
        System.out.println(str1[j]);
            break;
        }
    
             str1[j]=str.substring(k1,k2-1);
             
             System.out.println(str1[j]);
             k+=str1[j].length();
              count++;
        }
       for(j=0;j<=count;j++)
       {
         s=str1[j].substring(str1[j].indexOf(".") + 1, str1[j].indexOf(".", 4));
            b[j]=s.length();
            
            
           // System.out.println(b[j]);
        }
      
    BufferedReader read1=new BufferedReader(new InputStreamReader(System.in)); 
     m=Integer.parseInt(read1.readLine());
          
     String string="";
        for(j=0;j<=count;j++){
     if(m==b[j])
// System.out.println(str1[j]);
  
    {  
      
      System.out.println(str1[j]);
   string=string+" "+str1[j];
 

   }
  
   
   }
      FileOutputStream fos=new FileOutputStream("bbb.txt");
      OutputStreamWriter  bj=new OutputStreamWriter(fos);
      BufferedWriter fl=new BufferedWriter(bj);
     fl.write(string);


fl.close();
    
    }
     }

解决方案 »

  1.   

    我一般都只打成jar就行了,exe4j还真没怎么用过
    up
      

  2.   

    老紫竹的blog里有图文并茂的文章,你去看看吧。再说也不难,你一步一步按照提示来,就搞定了。
      

  3.   

    Exe4j 生成Exe文件系列(三) - 生成最简单的测试程序
      

  4.   

    http://www.blogjava.net/y6cn/archive/2007/12/26/170403.html
    去这看看吧,写的很详细,肯定会让你满意的
      

  5.   

    InstallAnywhere can satisfy you
      

  6.   


    用MyEclipse  第一个菜单下面,直接有个生成.jar文件, 生成完后,再用exe4j打包即可,