myeclipse trial expired解决,注册码自动生成

来源:互联网 发布:淘宝店铺动态评分4.6 编辑:程序博客网 时间:2024/06/02 03:09
  1. import java.io.*;      
  2.   
  3.      
  4.   
  5. public class MyEclipseGen      
  6.   
  7.     private static final String LL "Decompiling this copyrighted software is violation of both your license agreement and the Digital Millenium Copyright Act of 1998 (http://www.loc.gov/copyright/legislation/dmca.pdf). Under section 1204 of the DMCA, penalties range up to $500,000 fine or up to five years imprisonment for first offense. Think about it; pay for license, avoid prosecution, and feel better about yourself."     
  8.   
  9.      
  10.   
  11.     public String getSerial(String userId, String licenseNum)      
  12.   
  13.         java.util.Calendar cal java.util.Calendar.getInstance();      
  14.   
  15.         cal.add(13);      
  16.   
  17.         cal.add(6-1);      
  18.   
  19.                       java.text.NumberFormat nf new java.text.DecimalFormat("000");      
  20.   
  21.                       licenseNum nf.format(Integer.valueOf(licenseNum));      
  22.   
  23.                       String verTime new StringBuilder("-").append(      
  24.   
  25.                               new java.text.SimpleDateFormat("yyMMdd").format(cal.getTime()))      
  26.   
  27.                               .append("0").toString();      
  28.   
  29.                       String type "YE3MP-"     
  30.   
  31.                       String need new StringBuilder(userId.substring(01)).append(type)      
  32.   
  33.                               .append("300").append(licenseNum).append(verTime).toString();      
  34.   
  35.                       String dx new StringBuilder(need).append(LL).append(userId)      
  36.   
  37.                               .toString();      
  38.   
  39.                       int suf this.decode(dx);      
  40.   
  41.                       String code new StringBuilder(need).append(String.valueOf(suf))      
  42.   
  43.                              .toString();      
  44.   
  45.                       return this.change(code);      
  46.   
  47.                        
  48.   
  49.                    
  50.   
  51.                   private int decode(String s)      
  52.   
  53.                       int i;      
  54.   
  55.                       char[] ac;      
  56.   
  57.                       int j;      
  58.   
  59.                       int k;      
  60.   
  61.                       0     
  62.   
  63.                       ac s.toCharArray();      
  64.   
  65.                       0     
  66.   
  67.                       ac.length;      
  68.   
  69.                       while (j k)      
  70.   
  71.                           (31 i) ac[j];      
  72.   
  73.                           j++;      
  74.   
  75.                            
  76.   
  77.                       return Math.abs(i);      
  78.   
  79.                        
  80.   
  81.                    
  82.   
  83.                  private String change(String s)      
  84.   
  85.                       byte[] abyte0;      
  86.   
  87.                       char[] ac;      
  88.   
  89.                       int i;      
  90.   
  91.                       int k;      
  92.   
  93.                       int j;      
  94.   
  95.                       abyte0 s.getBytes();      
  96.   
  97.                       ac new char[s.length()];      
  98.   
  99.                       0     
  100.   
  101.                       abyte0.length;      
  102.   
  103.                       while (i k)      
  104.   
  105.                           abyte0[i];      
  106.   
  107.                           if ((j >= 48&& (j <= 57))      
  108.   
  109.                               (((j 4851048     
  110.   
  111.                           else if ((j >= 65&& (j <= 90))      
  112.   
  113.                               (((j 65132665     
  114.   
  115.                           else if ((j >= 97&& (j <= 122))      
  116.   
  117.                               (((j 97132697     
  118.   
  119.                                
  120.   
  121.                           ac[i] (charj;      
  122.   
  123.                           i++;      
  124.   
  125.                            
  126.   
  127.                       return String.valueOf(ac);      
  128.   
  129.                        
  130.   
  131.                    
  132.   
  133.                   public MyEclipseGen()      
  134.   
  135.                       super();      
  136.   
  137.                        
  138.   
  139.                    
  140.   
  141.                   public static void main(String[] args)      
  142.   
  143.                       try      
  144.   
  145.                           System.out.println("please input register name:");      
  146.   
  147.                           BufferedReader reader new BufferedReader(new InputStreamReader(      
  148.   
  149.                                   System.in));      
  150.   
  151.                           String userId null     
  152.   
  153.                           userId reader.readLine();      
  154.   
  155.                           MyEclipseGen myeclipsegen new MyEclipseGen();      
  156.   
  157.                           String res myeclipsegen.getSerial(userId, "0");      
  158.   
  159.                           System.out.println("Serial:" res);      
  160.   
  161.                           reader.readLine();      
  162.   
  163.                       catch (IOException ex)      
  164.   
  165.                            
  166.   
  167.                        
  168.   
  169.               }  

运行后效果如下:

 

 

修改String res = myeclipsegen.getSerial(userId, "20"); "20""0"可以变成Number of LicensesUnlimited.

 

然后

然后将刚才生成的序列号输入

 

点击下面的Finish即可

代码测试过了,可行!(转)


方法亲测,简单靠谱

0 0