Java自学者论坛

 找回密码
 立即注册

手机号码,快捷登录

恭喜Java自学者论坛(https://www.javazxz.com)已经为数万Java学习者服务超过8年了!积累会员资料超过10000G+
成为本站VIP会员,下载本站10000G+会员资源,会员资料板块,购买链接:点击进入购买VIP会员

JAVA高级面试进阶训练营视频教程

Java架构师系统进阶VIP课程

分布式高可用全栈开发微服务教程Go语言视频零基础入门到精通Java架构师3期(课件+源码)
Java开发全终端实战租房项目视频教程SpringBoot2.X入门到高级使用教程大数据培训第六期全套视频教程深度学习(CNN RNN GAN)算法原理Java亿级流量电商系统视频教程
互联网架构师视频教程年薪50万Spark2.0从入门到精通年薪50万!人工智能学习路线教程年薪50万大数据入门到精通学习路线年薪50万机器学习入门到精通教程
仿小米商城类app和小程序视频教程深度学习数据分析基础到实战最新黑马javaEE2.1就业课程从 0到JVM实战高手教程MySQL入门到精通教程
查看: 9537|回复: 0

解决myeclipse过期问题

[复制链接]
  • TA的每日心情
    奋斗
    2024-4-6 11:05
  • 签到天数: 748 天

    [LV.9]以坛为家II

    2034

    主题

    2092

    帖子

    70万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    积分
    705612
    发表于 2021-4-8 11:28:31 | 显示全部楼层 |阅读模式

    一般myeclise使用期限为30天,超过之后,会频繁的提醒你,购买软件,很讨厌,有个这个小工具,,以后再也不怕啦!!!

    使用方法:

    1:将这个类导入到myeclipse包中

    2:运行main方法,提示输入注册用户名:随便输入,然后回车

    生成序列号,

    3:然后将用户名和序列号填入菜单栏myeclipse——subscription information(订购信息),ok了

     

    工具代码如下:

     1 package day01;
     2 import java.io.BufferedReader;
     3 import java.io.IOException;
     4 import java.io.InputStreamReader;
     5 
     6 public class MyEclipseGen {
     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     public String getSerial(String userId, String licenseNum) {
    10         java.util.Calendar cal = java.util.Calendar.getInstance();
    11         cal.add(1, 3);
    12         cal.add(6, -1);
    13         java.text.NumberFormat nf = new java.text.DecimalFormat("000");
    14         licenseNum = nf.format(Integer.valueOf(licenseNum));
    15         String verTime = new StringBuilder("-").append(
    16                 new java.text.SimpleDateFormat("yyMMdd").format(cal.getTime()))
    17                 .append("0").toString();
    18         String type = "YE3MP-";
    19         String need = new StringBuilder(userId.substring(0, 1)).append(type)
    20                 .append("300").append(licenseNum).append(verTime).toString();
    21         String dx = new StringBuilder(need).append(LL).append(userId)
    22                 .toString();
    23         int suf = this.decode(dx);
    24         String code = new StringBuilder(need).append(String.valueOf(suf))
    25                 .toString();
    26         return this.change(code);
    27     }
    28 
    29     private int decode(String s) {
    30         int i;
    31         char[] ac;
    32         int j;
    33         int k;
    34         i = 0;
    35         ac = s.toCharArray();
    36         j = 0;
    37         k = ac.length;
    38         while (j < k) {
    39             i = (31 * i) + ac[j];
    40             j++;
    41         }
    42         return Math.abs(i);
    43     }
    44 
    45     private String change(String s) {
    46         byte[] abyte0;
    47         char[] ac;
    48         int i;
    49         int k;
    50         int j;
    51         abyte0 = s.getBytes();
    52         ac = new char[s.length()];
    53         i = 0;
    54         k = abyte0.length;
    55         while (i < k) {
    56             j = abyte0;
    57             if ((j >= 48) && (j <= 57)) {
    58                 j = (((j - 48) + 5) % 10) + 48;
    59             } else if ((j >= 65) && (j <= 90)) {
    60                 j = (((j - 65) + 13) % 26) + 65;
    61             } else if ((j >= 97) && (j <= 122)) {
    62                 j = (((j - 97) + 13) % 26) + 97;
    63             }
    64             ac = (char) j;
    65             i++;
    66         }
    67         return String.valueOf(ac);
    68     }
    69 
    70     public MyEclipseGen() {
    71         super();
    72     }
    73 
    74     public static void main(String[] args) {
    75         try {
    76             System.out.println("please input register name:");
    77             BufferedReader reader = new BufferedReader(new InputStreamReader(
    78                     System.in));
    79             String userId = null;
    80             userId = reader.readLine();
    81             MyEclipseGen myeclipsegen = new MyEclipseGen();
    82             String res = myeclipsegen.getSerial(userId, "5");
    83             System.out.println("Serial:" + res);
    84             reader.readLine();
    85         } catch (IOException ex) {
    86         }
    87     }
    88 
    89 }

     

    哎...今天够累的,签到来了1...
    回复

    使用道具 举报

    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    QQ|手机版|小黑屋|Java自学者论坛 ( 声明:本站文章及资料整理自互联网,用于Java自学者交流学习使用,对资料版权不负任何法律责任,若有侵权请及时联系客服屏蔽删除 )

    GMT+8, 2024-5-17 00:15 , Processed in 0.070626 second(s), 29 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2021, Tencent Cloud.

    快速回复 返回顶部 返回列表