5

我已经多次遇到这个问题。每当我使用 JD-GUI 反编译某些东西并保存所有源代码时,它都会在每一行前面加上一个块注释,并在方法体中插入代码的行号。这是我刚刚反编译的 jar 中的一个示例:

/*    */   public void onEnable()
/*    */   {
/* 25 */     List DropList = new ArrayList();
/* 26 */     DropList.add(Integer.valueOf(264));
/* 27 */     DropList.add(Integer.valueOf(57));
/* 28 */     DropList.add(Integer.valueOf(278));
/*    */ 
/* 30 */     this.config = getConfig();
/*    */ 
/* 32 */     this.config.addDefault("GiftDrops", DropList);
/* 33 */     this.config.addDefault("DropRate", Integer.valueOf(0));
/* 34 */     this.config.addDefault("GiftBoxPlayerSkin", "lol768");
/* 35 */     this.config.addDefault("CraftingRecipe.LineOne", "339,339,339");
/* 36 */     this.config.addDefault("CraftingRecipe.LineTwo", "339,264,339");
/* 37 */     this.config.addDefault("CraftingRecipe.LineThree", "339,339,339");
/*    */ 
/* 39 */     this.config.options().copyDefaults(true);
/* 40 */     saveConfig();
/*    */ 
/* 43 */     SkullMeta giftboxskull = (SkullMeta)this.giftbox.getItemMeta();
/*    */ 
/* 45 */     giftboxskull.setOwner(this.config.getString("GiftBoxPlayerSkin"));
/* 46 */     giftboxskull.setDisplayName(ChatColor.GREEN + "Gift Box");
/* 47 */     this.giftbox.setItemMeta(giftboxskull);
/*    */ 
/* 49 */     this.giftboxrecipe = new ShapedRecipe(this.giftbox);
/* 50 */     this.giftboxrecipe.shape(new String[] { "123", "456", "789" });
/*    */ 
/* 52 */     String[] LineOne = getConfig().getString("CraftingRecipe.LineOne").split(",");
/* 53 */     String[] LineTwo = getConfig().getString("CraftingRecipe.LineTwo").split(",");
/* 54 */     String[] LineThree = getConfig().getString("CraftingRecipe.LineThree").split(",");
/*    */ 
/* 56 */     this.giftboxrecipe.setIngredient('1', new ItemStack(Integer.parseInt(LineOne[0])).getData());
/* 57 */     this.giftboxrecipe.setIngredient('2', new ItemStack(Integer.parseInt(LineOne[1])).getData());
/* 58 */     this.giftboxrecipe.setIngredient('3', new ItemStack(Integer.parseInt(LineOne[2])).getData());
/* 59 */     this.giftboxrecipe.setIngredient('4', new ItemStack(Integer.parseInt(LineTwo[0])).getData());
/* 60 */     this.giftboxrecipe.setIngredient('5', new ItemStack(Integer.parseInt(LineTwo[1])).getData());
/* 61 */     this.giftboxrecipe.setIngredient('6', new ItemStack(Integer.parseInt(LineTwo[2])).getData());
/* 62 */     this.giftboxrecipe.setIngredient('7', new ItemStack(Integer.parseInt(LineThree[0])).getData());
/* 63 */     this.giftboxrecipe.setIngredient('8', new ItemStack(Integer.parseInt(LineThree[1])).getData());
/* 64 */     this.giftboxrecipe.setIngredient('9', new ItemStack(Integer.parseInt(LineThree[2])).getData());
/*    */ 
/* 66 */     getServer().addRecipe(this.giftboxrecipe);
/*    */ 
/* 68 */     getServer().getPluginManager().registerEvents(new GiftBoxEventListener(this), this);
/*    */   }

这似乎是 JD-GUI 必须阻止人们使用他们通过编译获得的源文件的功能。我可以使用 bash 命令相当轻松地删除所有这些注释,但这仍然很烦人。有没有办法禁用此功能?

4

1 回答 1

13

在“帮助”->“首选项”中,在“源保存”组下,取消选中“显示行号”

于 2014-08-06T02:08:58.217 回答