环境: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. BZOJ 3652: 大新闻(数位DP+概率论)

    不得不说数位DP和博弈论根本不熟啊QAQ,首先这道题嘛~~~可以分成两个子问题: 有加密:直接算出0~n中二进制每一位为0或为1分别有多少个,然后分位累加求和就行了= = 无加密:分别算出0~n中二进 ...

  2. JS中的onclick事件

    原文链接:https://segmentfault.com/q/1010000007955542?_ea=1503986 我自己做了一下测试. 这个是在html里面直接绑定onclick事件,我打印了 ...

  3. 微信公众平台开发-微信服务器IP接口实例(含源码)

    微信公众平台开发-access_token获取及应用(含源码)作者: 孟祥磊-<微信公众平台开发实例教程> 学习了access_token的获取及应用后,正式的使用access_token ...

  4. 一个想法照进现实-《IT连》创业项目:万事开头难

    前言: 之前是一个想法,现在已经进入创业阶段,所以这个系列的标题,改了. 众筹的事在今天也停止了. 7-9号会在深圳龙岗布吉参加一个风投对接的活动,今晚(6号)会出发. 因为:在深圳会呆几天,而且这个 ...

  5. UI设计需具备的几大素质

    近年来,IT产业对于高端技术人才需求加大,特别是北上广和知名企业对人才需求更为迫切,UI设计人员的正在接受UI培训的学员都赢认识到UI设计在未来要求将越来越高,交互设计越来越新颖也将对用户更加友好,兄 ...

  6. java 类与类之间的关系 及uml图

    类与接口之间的关系 : 继承 类与类之间的关系 :继承关系  包含关系 类与对象之间的关系 : 实例 UML 类图中类与类之间的关系: 泛化关系(generalization) 关联关系(associ ...

  7. 红黑树 C++实现

    #ifndef __RED_BLACK_TREE_H__ #define __RED_BLACK_TREE_H__ namespace lxf { template <typename Key, ...

  8. Hibernate二级缓存原理

    缓存:缓存是什么,解决什么问题? 位于速度相差较大的两种硬件/软件之间的,用于协调两者数据传输速度差异的结构,均可称之为缓存Cache.缓存目的:让数据更接近于应用程序,协调速度不匹配,使访问速度更快 ...

  9. 1684: [Usaco2005 Oct]Close Encounter

    1684: [Usaco2005 Oct]Close Encounter Time Limit: 5 Sec  Memory Limit: 64 MBSubmit: 387  Solved: 181[ ...

  10. 腾讯QQ会员技术团队:人人都可以做深度学习应用:入门篇(下)

    四.经典入门demo:识别手写数字(MNIST) 常规的编程入门有"Hello world"程序,而深度学习的入门程序则是MNIST,一个识别28*28像素的图片中的手写数字的程序 ...