Your 30-day trial of MyEclipse has expired 解决方案

今天MyEclipse提示过期了,MyEclipse Trial Expired.

网上找到了一个注册类可以生成Myeclipse注册码.

 

[java]  view plain  copy
 
  1. import java.io.*;      
  2.   
  3.      
  4.   
  5. public class MyEclipseGen {      
  6.   
  7.     private static final String LL = "Decompiling this copyrighted software is a 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 a $500,000 fine or up to five years imprisonment for a first offense. Think about it; pay for a 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(1, 3);      
  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(0, 1)).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.                       i = 0;      
  62.   
  63.                       ac = s.toCharArray();      
  64.   
  65.                       j = 0;      
  66.   
  67.                       k = ac.length;      
  68.   
  69.                       while (j < k) {      
  70.   
  71.                           i = (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.                       i = 0;      
  100.   
  101.                       k = abyte0.length;      
  102.   
  103.                       while (i < k) {      
  104.   
  105.                           j = abyte0[i];      
  106.   
  107.                           if ((j >= 48) && (j <= 57)) {      
  108.   
  109.                               j = (((j - 48) + 5) % 10) + 48;      
  110.   
  111.                           } else if ((j >= 65) && (j <= 90)) {      
  112.   
  113.                               j = (((j - 65) + 13) % 26) + 65;      
  114.   
  115.                           } else if ((j >= 97) && (j <= 122)) {      
  116.   
  117.                               j = (((j - 97) + 13) % 26) + 97;      
  118.   
  119.                           }      
  120.   
  121.                           ac[i] = (char) j;      
  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 Licenses为Unlimited.

 

然后

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

点击下面的Finish即可

代码测试过了,可行!

从Myeclipse--》subscription information 即可进入update subscription界面。

ok,现在可以了吧?恭喜你!

原文地址:http://blog.csdn.net/yuyuyuyuy/article/details/5878122  感谢作者

转载于:https://www.cnblogs.com/Nico-luo/p/8481351.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值