发布网友 发布时间:2022-12-21 03:03
共2个回答
热心网友 时间:2023-10-03 02:30
在线生成:http://www.sojson.com/myeclipse8.5/
import java.util.Calendar;
/**
*
* 开发公司:sojson.com
* 版权:sojson.com
* 根据subscriber 生成MyEclipse 8.5 序列号,每次生成3年有效期
* 区分 责任人 日期 说明
* 创建 soゝso 2016年4月14日
* @author zhou-cheng
* @email json@sojson.com
* @version 1.0,2016年4月14日
* @代码地址{@link http://www.sojson.com/blog/119}
*/
public class MyEclipseKeyGenerate {
static String CODE;
//静态块加载
static{
StringBuffer sb = new StringBuffer();
sb.append("Decompiling this copyrighted software is a violation of both your license");
sb.append(" agreement and the Digital Millenium Copyright Act of 1998 ");
sb.append("(http://www.loc.gov/copyright/legislation/dmca.pdf). Under section 1204 of the DMCA,");
sb.append(" penalties range up to a $500,000 fine or up to five years imprisonment for a first offense.");
sb.append(" Think about it; pay for a license, avoid prosecution, and feel better about yourself.");
CODE = sb.toString();
}
/**
* 根据帐号生成
* @param subscriber 帐号
* @return subscription code 序列号
*/
public String getSubscription(String subscriber) {
Calendar calendar = Calendar.getInstance();
calendar.add(1, 3);
calendar.add(6,-1);
String verTime = new StringBuilder("-").append(
new java.text.SimpleDateFormat("yyMMdd").format(calendar.getTime()))
.append("0").toString();
String type = "YE3MP-";
String need = new StringBuilder(subscriber.substring(0, 1)).append(type)
.append("300005").append(verTime).toString();
String dx = new StringBuilder(need).append(CODE).append(subscriber)
.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[] sojson;
char[] ac;
int i;
int k;
int j;
sojson = s.getBytes();
ac = new char[s.length()];
i = 0;
k = sojson.length;
while (i < k) {
j = sojson[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);
}
/**
* 测试
* @param args
*/
public static void main(String[] args) {
String userId = "www.sojson.com";
MyEclipseKeyGenerate myeclipsekeygen = new MyEclipseKeyGenerate();
String code = myeclipsekeygen.getSubscription(userId);
System.out.printf("subscriber: www.sojson.com \nsubscription code: %s \n", code);
}
}
热心网友 时间:2023-10-03 02:31
MyEclipse,是在eclipse 基础上加上自己的插件开发而成的功能强大的企业级集成开发环境,主要用于Java、Java EE以及移动应用的开发。MyEclipse的功能非常强大,支持也十分广泛,尤其是对各种开源产品的支持相当不错。