环境:Myeclipces8.5

1.安装Myeclipces8.5。

2.打开Myeclipces新建任意项目。

3.新建MyEclipseKeyGen.java类。点击运行,控制台输入您的注册名,单击回车,生成对应注册码。

import java.io.BufferedReader;

import java.io.IOException;

import java.io.InputStreamReader;

public class MyEclipseKeyGen {

    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.";

    public String getSerial(String userId, String licenseNum) {

        java.util.Calendar cal = java.util.Calendar.getInstance();

        cal.add(1, 3);

        cal.add(6, -1);

        java.text.NumberFormat nf = new java.text.DecimalFormat("000");

        licenseNum = nf.format(Integer.valueOf(licenseNum));

        String verTime = new StringBuilder("-").append(

                new java.text.SimpleDateFormat("yyMMdd").format(cal.getTime()))

                .append("0").toString();

        String type = "YE3MP-";

        String need = new StringBuilder(userId.substring(0, 1)).append(type)

                .append("300").append(licenseNum).append(verTime).toString();

        String dx = new StringBuilder(need).append(LL).append(userId)

                .toString();

        int suf = this.decode(dx);

        String code = new StringBuilder(need).append(String.valueOf(suf))

                .toString();

        return this.change(code);

    }

    private int decode(String s) {

        int i;

        char[] ac;

        int j;

        int k;

        i = 0;

        ac = s.toCharArray();

        j = 0;

        k = ac.length;

        while (j < k) {

            i = (31 * i) + ac[j];

            j++;

        }

        return Math.abs(i);

    }

    private String change(String s) {

        byte[] abyte0;

        char[] ac;

        int i;

        int k;

        int j;

        abyte0 = s.getBytes();

        ac = new char[s.length()];

        i = 0;

        k = abyte0.length;

        while (i < k) {

            j = abyte0[i];

            if ((j >= 48) && (j <= 57)) {

                j = (((j - 48) + 5) % 10) + 48;

            } else if ((j >= 65) && (j <= 90)) {

                j = (((j - 65) + 13) % 26) + 65;

            } else if ((j >= 97) && (j <= 122)) {

                j = (((j - 97) + 13) % 26) + 97;

            }

            ac[i] = (char) j;

            i++;

        }

        return String.valueOf(ac);

    }

    public MyEclipseKeyGen() {

        super();

    }

    public static void main(String[] args) {

        try {

            System.out.println("please input register name:");

            BufferedReader reader = new BufferedReader(new InputStreamReader(

                    System.in));

            String userId = null;

            userId = reader.readLine();

            MyEclipseKeyGen myeclipsekeygen = new MyEclipseKeyGen();

            String res = myeclipsekeygen.getSerial(userId, "5");

            System.out.println("Serial:" + res);

            reader.readLine();

        } catch (IOException ex) {

        }

    }

}

Myeclipse8.5开发-安装一:Myeclipse8.5注册码生成程序的更多相关文章

  1. Maven安装配置及其插件m2e(Eclipse Indigo 和 MyEclipse8.5)的安装配置

    Maven安装配置及其插件m2e(Eclipse Indigo 和 MyEclipse8.5)的安装配置   系统:Windows7 使用软件: Maven3.0.3 + Eclipse Indigo ...

  2. 转:MyEclipse8.6插件安装方法

    通常,我们可以用update来直接安装.但是myeclipse限制了中国区的下载和更新.所以我们只能用插件配置的方法来实现. MyEclipse8.6插件安装同Eclipse插件安装方式大致相同,如下 ...

  3. MyEclipse8.5 中安装Spket插件

    MyEclipse8.5 中安装Spket插件 安装: 1. Myeclipse8.5安装和以前低版本有些不同(没有software updates). 点击help->Myeclipse Co ...

  4. npm全局安装和本地安装和本地开发安装(npm install --g/--save/--save-dev)

    详细说明参考:http://www.cnblogs.com/PeunZhang/p/5629329.html 我个人理解: 1.全局安装(npm install -g)是为了用命令行,比如在windo ...

  5. Windows Service 开发,安装与调试

    Visual Studio.net 2010 Windows Service 开发,安装与调试 本示例完成一个每隔一分钟向C:\log.txt文件写入一条记录为例,讲述一个Windows Servic ...

  6. React Native for Android on Windows 配置开发安装总结

    配置开发安装总结(由于当前react-native更新较快,目前是针对2015年11月底时的reacti-native android for windows版本,有些内容可能过时) 官方的安装指导在 ...

  7. Xamarin开发安装Visual Studio 2015 update2报错的解决办法

    Xamarin开发安装Visual Studio 2015 update2报错的解决办法错误信息:update 2 requires a member of the visual studio 201 ...

  8. Myeclipse8.5开发-插件安装二:安装findbugs方法

    环境:Myeclipse8.5 step 1:首先从官网下载findbugs插件:http://downloads.sourceforge.net/project/findbugs/findbugs% ...

  9. 已经安装了Myeclipse8.5 的情况下,激活myeclipse10.7要注意

    使用下载好的10.7的包里的激活文件和提供的激活方法激活,不成功,在网上搜索了很多方法试过也不成功,最后打开安装目录D:\MyEclipse 10下的myeclipse.ini文件,发现如下内容: . ...

随机推荐

  1. jeesite简单入口分析

    这两天要开新项目 , 准备使用比较受欢迎的 jeesite框架 . jeesite是一个写好的网站 , 用到的框架比较多 具体请看 -- > github链接 下载下来之后 , 手动把maven ...

  2. VUE2.0实现购物车和地址选配功能学习第二节

    第二节 创建VUE实例 购物车项目计划: 1.创建一个vue实例 2.通过v-for指令渲染产品数据 3.使用filter对金额和图片进行格式化 4.使用v-on实现产品金额动态计算 5.综合演示 ① ...

  3. 脚本之家 前端jQuery js 学习 网站

    http://www.jb51.net/books/ http:// www.3wschool.com/

  4. Spring框架---IOC装配Bean

    IOC装配Bean (1)Spring框架Bean实例化的方式提供了三种方式实例化Bean 构造方法实例化(默认无参数,用的最多) 静态工厂实例化 实例工厂实例化 下面先写这三种方法的applicat ...

  5. [BNUZOJ1261][ACM][2016北理校赛]方块消除(栈,字符串)

    玩过方块消除游戏吗?现在规定当有两个或两个以上相邻且颜色相同的方块在一起的时候,它们就会产生消除反应.当存在多个消除反应同时产生时,最下的反应先执行.现在只给你其中一列,求最后剩下的方块结果. 输入要 ...

  6. 轻松理解JavaScript闭包

    摘要 闭包机制是JavaScript的重点和难点,本文希望能帮助大家轻松的学习闭包 一.什么是闭包? 闭包就是可以访问另一个函数作用域中变量的函数. 下面列举出常见的闭包实现方式,以例子讲解闭包概念 ...

  7. SQL一次查出相关类容避免长时间占用表(上)

    /* server: db: EDI */ -- 以下案例多次查询同一张表,仅有组合条件Name+Direction不同 --可以使用一次查出相关类容避免长时间占用表 USE EDI GO DECLA ...

  8. Yii2 Pjax 与 ActionForm ,不刷新提交数据

    <?php yii\widgets\Pjax::begin(['id'=>'phoneDetail']);?> <?php $form = ActiveForm::begin( ...

  9. 3-15 JS基础知识02

    一.For循环: For (var i = 0;  i <= 10;  i++){ 循环体: } 注意:For循环中的表达式是可以省略的,省略以后是个死循环. odd:奇数   even : 偶 ...

  10. Django HTTP处理流程(自我总结)

    Django中由wsgi模块接管http请求,核心处理方法为get_wsgi_application,其定义如下: def get_wsgi_application(): ""&q ...