教你如何破解Aptana 1.5

最近在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这个文件,把下边的代码覆盖进去即可:

 

Java代码 复制代码
  1. /*     */ package com.aptana.ide.core.licensing;   
  2. /*     */    
  3. /*     */ import java.util.Calendar;   
  4. /*     */ import java.util.TimeZone;   
  5. /*     */    
  6. /*     */ public final class ClientKey   
  7. /*     */   implements ILicenseKey   
  8. /*     */ {   
  9. /*     */   public static final String BEGIN_LICENSE_MARKER = "--begin-aptana-license--";   
  10. /*     */   public static final String END_LICENSE_MARKER = "--end-aptana-license--";   
  11. /*  53 */   private static final TimeZone GMT = TimeZone.getTimeZone("GMT");   
  12. /*     */   public static final String EMAILS_NON_MATCHING = "EMAILS_NON_MATCHING";   
  13. /*     */   private String email;   
  14. /*     */   private long expiration;   
  15. /*     */   private int type;   
  16. /*     */    
  17. /*     */   public ClientKey(int type, String email, long expiration)   
  18. /*     */   {   
  19. /*  63 */     this.type = type;   
  20. /*  64 */     this.email = email;   
  21. /*  65 */     this.expiration = expiration;   
  22. /*     */   }   
  23. /*     */    
  24. /*     */   public boolean isCloseToExpiring()   
  25. /*     */   {   
  26. /*  73 */     //Calendar currentCalendar = Calendar.getInstance(GMT);   
  27. /*  74 */     //currentCalendar.add(2, 1);   
  28. /*  75 */     //return getExpiration().before(currentCalendar);   
  29. /*     */       return false;   
  30. /*     */   }   
  31. /*     */    
  32. /*     */   public boolean isValid()   
  33. /*     */   {   
  34. /*  83 */     return true;//((this.email == null) || (this.email == "EMAILS_NON_MATCHING"));   
  35. /*     */   }   
  36. /*     */    
  37. /*     */   public boolean isCloseToMatching()   
  38. /*     */   {   
  39. /*  91 */     return false;//(this.email != "EMAILS_NON_MATCHING");   
  40. /*     */   }   
  41. /*     */    
  42. /*     */   public boolean isExpired()   
  43. /*     */   {   
  44. /*  99 */     //Calendar currentCalendar = Calendar.getInstance(GMT);   
  45. /* 100 */     return false;//currentCalendar.after(getExpiration());   
  46. /*     */   }   
  47. /*     */    
  48. /*     */   public String getEmail()   
  49. /*     */   {   
  50. /* 108 */     return this.email;   
  51. /*     */   }   
  52. /*     */    
  53. /*     */   public Calendar getExpiration()   
  54. /*     */   {   
  55. /* 116 */     Calendar expirationCal = Calendar.getInstance(GMT);   
  56. /* 117 */     //expirationCal.setTimeInMillis(this.expiration);   
  57. /*     */     expirationCal.add(Calendar.YEAR,50);   
  58. /* 118 */     return expirationCal;   
  59. /*     */   }   
  60. /*     */    
  61. /*     */   public boolean isTrial()   
  62. /*     */   {   
  63. /* 126 */     return false;//(this.type != 1);   
  64. /*     */   }   
  65. /*     */    
  66. /*     */   public boolean isPro()   
  67. /*     */   {   
  68. /* 134 */     return (!(isTrial()));   
  69. /*     */   }   
  70. /*     */    
  71. /*     */   public static String trimEncryptedLicense(String encrypted)   
  72. /*     */   {   
  73. /* 157 */     String newEncrypted = encrypted;   
  74. /* 158 */     newEncrypted = newEncrypted.trim();   
  75. /* 159 */     newEncrypted = newEncrypted.replaceAll("--begin-aptana-license--""");   
  76. /* 160 */     newEncrypted = newEncrypted.replaceAll("--end-aptana-license--""");   
  77. /* 161 */     newEncrypted = newEncrypted.replaceAll("//s+""");   
  78. /* 162 */     return newEncrypted;   
  79. /*     */   }   
  80. /*     */ }  
/*     */ 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下看看结果。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值