您的位置:首页 > 移动开发 > 微信开发

[阅读笔记]CTO俱乐部第108期下午茶:电商在微信上的现状与未来

2013-08-27 05:58 295 查看
最近在eclipse上装了Aptana,本来只想装Radrails的,可总是不成功,到网上一查才知道,现在Radrails属于Aptana的了,
要装Radrails必须要装Aptana Studio,然后我费了九牛二虎之力终于把Aptana
Studio给装上了,然后装了Radrails,但试用期只有30天,看着那个日期我就觉得别扭,呵呵,然后网上找了一下,都是破解1.0,1.2
的,1.5的没找着,然后我就综合前辈们的方法,终于把这事给搞定,先截张图看看,呵呵。



 

我的环境:eclipse3.5-java-win32   aptana1.5插件安装


eclipse的plugins目录下找到com.aptana.ide.core_1.5.0.25443.jar,然后用下载个jad工具,此工具可
以将class的字节码发编译为java代码,从这儿下载http://java.decompiler.free.fr/jd-gui
/downloads/jd-gui-0.2.10.windows.zip

用jad工具吧整个jar保存成源码比
如:com.aptana.ide.core_1.5.0.25443.src.zip,然后解压到一个目录下,比如:解压到
D:\com.aptana.ide.core_1.5.0.25443.src,网上有的说只要把那个ClientKey.class这个文件反编译就
行,我发现不行,因为这个类实现了ILicenseKey这个接口,所以还是整个都反编译吧,呵呵,然后修改
D:\com.aptana.ide.core_1.5.0.25443.src\com\aptana\ide\core\licensing
\ClientKey.java这个文件,把下边的代码覆盖进去即可:

 

/*     */ package com.aptana.ide.core.licensing;
/*     */
/*     */ import java.util.Calendar;
/*     */ import java.util.TimeZone;
/*     */
/*     */ public final class ClientKey
/*     */   implements ILicenseKey
/*     */ {
/*     */   public static final String BEGIN_LICENSE_MARKER = "--begin-aptana-license--";
/*     */   public static final String END_LICENSE_MARKER = "--end-aptana-license--";
/*  53 */   private static final TimeZone GMT = TimeZone.getTimeZone("GMT");
/*     */   public static final String EMAILS_NON_MATCHING = "EMAILS_NON_MATCHING";
/*     */   private String email;
/*     */   private long expiration;
/*     */   private int type;
/*     */
/*     */   public ClientKey(int type, String email, long expiration)
/*     */   {
/*  63 */     this.type = type;
/*  64 */     this.email = email;
/*  65 */     this.expiration = expiration;
/*     */   }
/*     */
/*     */   public boolean isCloseToExpiring()
/*     */   {
/*  73 */     //Calendar currentCalendar = Calendar.getInstance(GMT);
/*  74 */     //currentCalendar.add(2, 1);
/*  75 */     //return getExpiration().before(currentCalendar);
/*	   */		return false;
/*     */   }
/*     */
/*     */   public boolean isValid()
/*     */   {
/*  83 */     return true;//((this.email == null) || (this.email == "EMAILS_NON_MATCHING"));
/*     */   }
/*     */
/*     */   public boolean isCloseToMatching()
/*     */   {
/*  91 */     return false;//(this.email != "EMAILS_NON_MATCHING");
/*     */   }
/*     */
/*     */   public boolean isExpired()
/*     */   {
/*  99 */     //Calendar currentCalendar = Calendar.getInstance(GMT);
/* 100 */     return false;//currentCalendar.after(getExpiration());
/*     */   }
/*     */
/*     */   public String getEmail()
/*     */   {
/* 108 */     return this.email;
/*     */   }
/*     */
/*     */   public Calendar getExpiration()
/*     */   {
/* 116 */     Calendar expirationCal = Calendar.getInstance(GMT);
/* 117 */     //expirationCal.setTimeInMillis(this.expiration);
/*     */     expirationCal.add(Calendar.YEAR,50);
/* 118 */     return expirationCal;
/*     */   }
/*     */
/*     */   public boolean isTrial()
/*     */   {
/* 126 */     return false;//(this.type != 1);
/*     */   }
/*     */
/*     */   public boolean isPro()
/*     */   {
/* 134 */     return (!(isTrial()));
/*     */   }
/*     */
/*     */   public static String trimEncryptedLicense(String encrypted)
/*     */   {
/* 157 */     String newEncrypted = encrypted;
/* 158 */     newEncrypted = newEncrypted.trim();
/* 159 */     newEncrypted = newEncrypted.replaceAll("--begin-aptana-license--", "");
/* 160 */     newEncrypted = newEncrypted.replaceAll("--end-aptana-license--", "");
/* 161 */     newEncrypted = newEncrypted.replaceAll("\\s+", "");
/* 162 */     return newEncrypted;
/*     */   }
/*     */ }

 

修改完后别忘记保存,然后用javac来编译,步骤:win+R==>cmd==>切换到D:\com.aptana.ide.core_1.5.0.25443.src\com\aptana\ide\core\licensing>

然后 javac -classpath D:\com.aptana.ide.core_1.5.0.25443.src ClientKey.java


成一个ClientKey.class文件,用winrar打开eclipse目录下plugins目录下的
com.aptana.ide.core_1.5.0.25443.jar,就是刚才反编译的那个jar文件,然后com\aptana\ide
\core\licensing这样下去,把刚才生成的class文件覆盖进去,别告诉我不知道怎么覆盖啊,直接拖到里面然后确定就行。

好了,这时候我们再启动eclipse看看,到window==>preferences==>aptana==>license下看看结果。

有问题请留言!

 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: