Enigma - a tool for deobfuscation of Java bytecode
I'm here this time to announce a new tool for Minecraft modding. It's called Enigma and it helps modders deobfuscate Java code. It's not specific to Minecraft really, but I figured it would be helpful for Minecraft modding.
Enigma is fully open source Java application that supports browsing decompiled sources from a Jar file. The source browser highlights the obfuscated class/field/method/argument names and allows easy renaming. All the mappings are saved internally to an efficient data structure which can be saved/loaded. Enigma also includes many code browsing features such as declaration lookup, call graph searches, and inheritance hierarchy browsing.
Development status: Backburner'd!
Since I'm taking a break from Tall Worlds Mod, there's not much drive to keep developing M3L and Enigma, so I'm going to take a break from those projects too. The short version is, I'm one modder trying to do too many things in limited hobby time. So far the result has been I'm not getting much done on any one of these projects The donation money just isn't there to give me more hobby time, so if I want to get anything done at all, I need to become more focused.
The entire project is open source of course. Contributions are always welcome from other modders. None of this
technology is disappearing any time soon, it's just going to start gathering dust.
Now I'm going to focus all of my energy into my Ships Mod and make that mod the best mod it can be. Since I'm no longer splitting my time among too many projects, I should be able to make some real progress, so look forward to some exciting new features there!
Enigma is powered by the Procyon Java decompiler which is supremely awesome and easy to use! Procyon is also distributed using a very permissive software license so I don't have to resort to cloak and dagger schemes to make this tool available or try to keep Enigma hidden.
This tool is currently beta quality. Most of the stuff works and it works pretty well, but there still may be some bugs that get in the way, or some annoyances about the user interface. If you like, you can help improve Enigma by reporting bugs, papercuts, and other issues on the issue tracker: https://bitbucket.org/cuchaz/enigma/issues?status=new&status=open
If you're into IRC, you can also hang out in the #enigma channel on esper.net
If you are interested in helping to deobfuscate Minecraft:
We are currently using Enigma to build deobfuscation mappings for Minecraft 1.8.3
Before you dive into deobfuscating anything with Enigma, please make sure you are coordinating your efforts with other deobfuscators. I'd hate to see someone do a bunch of work only to have it obsoleted by another person. I've made a Mercurial repo to host mappings for Minecraft jars here: https://bitbucket.org/cuchaz/minecraft-mappings
Mappings for each version of Minecraft lives in its own branch. Make sure you switch to the branch in the repo that corresponds to the version of Minecraft you want to deobfuscate. I tried to find a way to make the repo writable by anyone, but there doesn't seem to be an option for that. I suppose that could be a security issue. If you want to push to the repo, just send me a request with your BitBucket account name, and I'll give you write access. The goal is to let anyone contribute mappings if they want to. Before you start a deobfuscating session, make sure you've pulled the latest mappings from the repo. When you're done, merge/push your changes back to the repo. The file format I've chosen for the mappings is a human-readable line-by-line text format, so hopefully Mercurial will be a useful tool for synchronizing the mappings. We'll see how this works. =)
If you're into IRC, you can also hang out in the #enigma-mappings channel on esper.net. It might be helpful to hang out there to coordinate efforts with other modders working on deobufscation. The mappings that everyone is helping build are released under a Creative Commons Attribution-ShareAlike 4.0 International license. It basically means you can use the mappings for anything you want. If you distribute copies of the mappings (modified or unmodified), then you have to use the same license. That should be pretty permissive so people can use these mappings in whatever their favorite project may be. Just be sure to abide by the terms of the Minecraft EULA. Let's stay white hat here, folks.
DISCLAIMER: Please only deobfuscate code for which you have the legal right to do so.
Very nice project. I'm still available for mappings if you need it.
Great! Let me get Enigma into a stable and usable state and then we can start building our mappings database.
I still need to figure out how take mappings from multiple people and merge them together. I'm tempted to just do something very simple like most-recent-mapping wins.
Also, to avoid duplication of effort, we'll need a central place to host the mappings, merge them, and make sure each deobfuscation session starts with the latest mappings. I was thinking maybe using a mercurial repo to host the mappings themselves and then people can push/pull/merge to stay synchronized. This approach might benefit from a human-readable format for the mappings where line-by-line merging makes some kind of sense.
Okie dokie, I switched the mappings writer to use a human readable format. It should be manually mergable so it might make sense to keep the mappings in a Mercurial repo. =)
The Meaning of Life, the Universe, and Everything.
Join Date:
7/2/2013
Posts:
45
Member Details
Woah this is interesting, I'll see what I can do with this. Proceeds to decompile a mod... Anyway in all seriousness this project actually looks pretty cool I'm looking forward to using the full version
I got an error while trying to build. I feel like i am overlooking something. I ran gradle build in the folder, without changing anything, and it gave me this error.
* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --info or --debug option to get more log output.
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':compile
Java'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.ex
ecuteActions(ExecuteActionsTaskExecuter.java:69)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.ex
ecute(ExecuteActionsTaskExecuter.java:46)
at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExec
uter.execute(PostExecutionAnalysisTaskExecuter.java:35)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.exec
ute(SkipUpToDateTaskExecuter.java:64)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execut
e(ValidatingTaskExecuter.java:58)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecu
ter.execute(SkipEmptySourceFilesTaskExecuter.java:42)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter
.execute(SkipTaskWithNoActionsExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execut
e(SkipOnlyIfTaskExecuter.java:53)
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter
.execute(ExecuteAtMostOnceTaskExecuter.java:43)
at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailur
e(AbstractTask.java:296)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorW
orker.executeTask(AbstractTaskPlanExecutor.java:79)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorW
orker.processTask(AbstractTaskPlanExecutor.java:63)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorW
orker.run(AbstractTaskPlanExecutor.java:51)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(Defaul
tTaskPlanExecutor.java:23)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(Defau
ltTaskGraphExecuter.java:86)
at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTask
ExecutionAction.java:29)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecute
r.java:61)
at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExec
uter.java:23)
at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecu
ter.java:67)
at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildEx
ecutionAction.java:32)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecute
r.java:61)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecute
r.java:54)
at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(Default
GradleLauncher.java:148)
at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradle
Launcher.java:105)
at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLaun
cher.java:85)
at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildCon
troller.run(InProcessBuildActionExecuter.java:81)
at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.jav
a:33)
at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.jav
a:24)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProce
ssBuildActionExecuter.java:39)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProce
ssBuildActionExecuter.java:29)
at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:50)
at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.jav
a:171)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.
execute(CommandLineActionFactory.java:237)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.
execute(CommandLineActionFactory.java:210)
at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRunti
meValidationAction.java:35)
at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRunti
meValidationAction.java:24)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(
CommandLineActionFactory.java:206)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(
CommandLineActionFactory.java:169)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionRep
ortingAction.java:33)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionRep
ortingAction.java:22)
at org.gradle.launcher.Main.doAction(Main.java:33)
at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBoots
trap.java:54)
at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.j
ava:35)
at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
Caused by: org.gradle.api.internal.tasks.compile.CompilationFailedException: Com
pilation failed; see the compiler error output for details.
at org.gradle.api.internal.tasks.compile.jdk6.Jdk6JavaCompiler.execute(J
dk6JavaCompiler.java:47)
at org.gradle.api.internal.tasks.compile.jdk6.Jdk6JavaCompiler.execute(J
dk6JavaCompiler.java:38)
at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.delegat
eAndHandleErrors(NormalizingJavaCompiler.java:96)
at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.execute
(NormalizingJavaCompiler.java:49)
at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.execute
(NormalizingJavaCompiler.java:35)
at org.gradle.api.internal.tasks.compile.DelegatingJavaCompiler.execute(
DelegatingJavaCompiler.java:29)
at org.gradle.api.internal.tasks.compile.DelegatingJavaCompiler.execute(
DelegatingJavaCompiler.java:20)
at org.gradle.api.internal.tasks.compile.CleaningJavaCompilerSupport.exe
cute(CleaningJavaCompilerSupport.java:33)
at org.gradle.api.internal.tasks.compile.CleaningJavaCompilerSupport.exe
cute(CleaningJavaCompilerSupport.java:24)
at org.gradle.api.tasks.compile.JavaCompile.performCompilation(JavaCompi
le.java:87)
at org.gradle.api.tasks.compile.JavaCompile.compile(JavaCompile.java:65)
at org.gradle.api.tasks.compile.JavaCompile.compile(JavaCompile.java:53)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:63)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskF
actory$IncrementalTaskAction.doExecute(AnnotationProcessingTaskFactory.java:235)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskF
actory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:211)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskF
actory$IncrementalTaskAction.execute(AnnotationProcessingTaskFactory.java:222)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskF
actory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:200)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.ex
ecuteAction(ExecuteActionsTaskExecuter.java:80)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.ex
ecuteActions(ExecuteActionsTaskExecuter.java:61)
... 44 more
BUILD FAILED
Total time: 13.277 secs
C:\Users\Maury\Downloads\cuchaz-enigma-c02ee353e760\cuchaz-enigma-c02ee353e760>g
radle build -debug -info
Starting Build
Settings evaluated using empty settings script.
Projects loaded. Root project using build file 'C:\Users\Maury\Downloads\cuchaz-
enigma-c02ee353e760\cuchaz-enigma-c02ee353e760\build.gradle'.
Included projects: [root project 'cuchaz-enigma-c02ee353e760']
Evaluating root project 'cuchaz-enigma-c02ee353e760' using build file 'C:\Users\
Maury\Downloads\cuchaz-enigma-c02ee353e760\cuchaz-enigma-c02ee353e760\build.grad
le'.
All projects evaluated.
Selected primary task 'DefaultTaskParameter{taskName='build',projectPath='null'}
'
Tasks to be executed: [task ':compileJava', task ':processResources', task ':cla
sses', task ':jar', task ':assemble', task ':compileTestJava', task ':processTes
tResources', task ':testClasses', task ':test', task ':check', task ':build']
:compileJava (Thread[main,5,main]) started.
:compileJava
Executing task ':compileJava' (up-to-date check took 0.688 secs) due to:
No history is available.
All input files are considered out-of-date for incremental task ':compileJava'.
Compiling with JDK Java compiler API.
warning: [options] bootstrap class path not set in conjunction with -source 1.6
C:\Users\Maury\Downloads\cuchaz-enigma-c02ee353e760\cuchaz-enigma-c02ee353e760\s
rc\cuchaz\enigma\gui\Gui.java:605: error: inconvertible types
showClassEntryPair( (EntryPair<? extends ClassEntry>)pai
r );
^
required: EntryPair<? extends ClassEntry>
found: EntryPair<Entry>
C:\Users\Maury\Downloads\cuchaz-enigma-c02ee353e760\cuchaz-enigma-c02ee353e760\s
rc\cuchaz\enigma\gui\Gui.java:609: error: inconvertible types
showFieldEntryPair( (EntryPair<? extends FieldEntry>)pai
r );
^
required: EntryPair<? extends FieldEntry>
found: EntryPair<Entry>
C:\Users\Maury\Downloads\cuchaz-enigma-c02ee353e760\cuchaz-enigma-c02ee353e760\s
rc\cuchaz\enigma\gui\Gui.java:613: error: inconvertible types
showMethodEntryPair( (EntryPair<? extends MethodEntry>)p
air );
^
I got an error while trying to build. I feel like i am overlooking something. I ran gradle build in the folder, without changing anything, and it gave me this error.
Please tell me what went wrong.
Thanks, nightscout01
Looks like a compiler inconsistency. I usually build using the Eclipse compiler which doesn't complain about that cast. Looks like javac does though. I'll have to find another way to solve that problem.
That means the gradle build won't work for you (It doesn't work for me either). In the meantime, you can just run/debug in Eclipse and it should work. If you're using eclipse, that is. =P
When I hit run on eclipse, it wants me to use an some "ant" thing, I don't have any idea what that is, and it doesn't want to run. I feel like compilers don't like me
When I hit run on eclipse, it wants me to use an some "ant" thing, I don't have any idea what that is, and it doesn't want to run. I feel like compilers don't like me
I'm not using Ant (which is yet another build system) at all in this project. You shouldn't have to use ant either. The built-in Eclipse java runner should work just fine if you point it at the Main class.
Compilers use a lot of "syntactic sugar" to make some language features work. Meaning, some language features (like for each loops) are compiled into other language features behind the scenes. Enums are a huge example of this too. Enums are just compiled into classes with a lot of static members.
Well... more precisely, the compiler maps the language features to JVM features. It just so happens that enum and class language features map to to the same JVM class feature.
When you decompile bytecode, you're trying to map whatever JVM features the compiler chose back to language features. It's a hard problem because there's no nice 1-to-1 mapping. One JVM feature could map to one of many possible language features. Since I have a super duper awesome decompiler, it's nice enough to tell us when the compiler did something weird behind the scenes by leaving /*synthetic*/ comments in the decompiled source.
In a nutshell, /*synthetic*/ means the original source code probably didn't have that thing, but the compiler added it to make some language feature work.
Enigma - a tool for deobfuscation of Java bytecode
I'm here this time to announce a new tool for Minecraft modding. It's called Enigma and it helps modders deobfuscate Java code. It's not specific to Minecraft really, but I figured it would be helpful for Minecraft modding.
Enigma is fully open source Java application that supports browsing decompiled sources from a Jar file. The source browser highlights the obfuscated class/field/method/argument names and allows easy renaming. All the mappings are saved internally to an efficient data structure which can be saved/loaded. Enigma also includes many code browsing features such as declaration lookup, call graph searches, and inheritance hierarchy browsing.
Development status: Backburner'd!
Since I'm taking a break from Tall Worlds Mod, there's not much drive to keep developing M3L and Enigma, so I'm going to take a break from those projects too. The short version is, I'm one modder trying to do too many things in limited hobby time. So far the result has been I'm not getting much done on any one of these projects The donation money just isn't there to give me more hobby time, so if I want to get anything done at all, I need to become more focused.
The entire project is open source of course. Contributions are always welcome from other modders. None of this
technology is disappearing any time soon, it's just going to start gathering dust.
Now I'm going to focus all of my energy into my Ships Mod and make that mod the best mod it can be. Since I'm no longer splitting my time among too many projects, I should be able to make some real progress, so look forward to some exciting new features there!
Current Enigma release:
The current version of Enigma is v0.10 beta. Get it here: http://www.cuchazinteractive.com/enigma/
Enigma is powered by the Procyon Java decompiler which is supremely awesome and easy to use! Procyon is also distributed using a very permissive software license so I don't have to resort to cloak and dagger schemes to make this tool available or try to keep Enigma hidden.
Enigma is open source! You can check out the project over on BitBucket: https://bitbucket.org/cuchaz/enigma
This tool is currently beta quality. Most of the stuff works and it works pretty well, but there still may be some bugs that get in the way, or some annoyances about the user interface. If you like, you can help improve Enigma by reporting bugs, papercuts, and other issues on the issue tracker: https://bitbucket.org/cuchaz/enigma/issues?status=new&status=open
If you're into IRC, you can also hang out in the #enigma channel on esper.net
If you are interested in helping to deobfuscate Minecraft:
We are currently using Enigma to build deobfuscation mappings for Minecraft 1.8.3
https://bitbucket.org/cuchaz/minecraft-mappings/src/ad8e6e4e9f3302649d94861be1651015f244f9e3/?at=1.8.3
We also just started a branch for Minecraft 1.9, starting with snapshot 15w31c.
https://bitbucket.org/cuchaz/minecraft-mappings/src/3c5d07d8e784ef042b4ebec3d77d7a0fad4bf1c5/?at=1.9-15w31c
Before you dive into deobfuscating anything with Enigma, please make sure you are coordinating your efforts with other deobfuscators. I'd hate to see someone do a bunch of work only to have it obsoleted by another person. I've made a Mercurial repo to host mappings for Minecraft jars here: https://bitbucket.org/cuchaz/minecraft-mappings
Mappings for each version of Minecraft lives in its own branch. Make sure you switch to the branch in the repo that corresponds to the version of Minecraft you want to deobfuscate. I tried to find a way to make the repo writable by anyone, but there doesn't seem to be an option for that. I suppose that could be a security issue. If you want to push to the repo, just send me a request with your BitBucket account name, and I'll give you write access. The goal is to let anyone contribute mappings if they want to. Before you start a deobfuscating session, make sure you've pulled the latest mappings from the repo. When you're done, merge/push your changes back to the repo. The file format I've chosen for the mappings is a human-readable line-by-line text format, so hopefully Mercurial will be a useful tool for synchronizing the mappings. We'll see how this works. =)
If you're into IRC, you can also hang out in the #enigma-mappings channel on esper.net. It might be helpful to hang out there to coordinate efforts with other modders working on deobufscation. The mappings that everyone is helping build are released under a Creative Commons Attribution-ShareAlike 4.0 International license. It basically means you can use the mappings for anything you want. If you distribute copies of the mappings (modified or unmodified), then you have to use the same license. That should be pretty permissive so people can use these mappings in whatever their favorite project may be. Just be sure to abide by the terms of the Minecraft EULA. Let's stay white hat here, folks.
DISCLAIMER: Please only deobfuscate code for which you have the legal right to do so.
I've used a couple of these tools before, but none have really met my needs. Hopefully this one will be like no other!
btw: For those who do not already know, Cuchaz is the author of the { Ships Mod }, the { Power Tools Mod } and the upcoming cubic chunks height mod { Tall Worlds Mod }. He is also the creator of the in-development { Magic Mojo Mod Loader }. All of these are open source on Bitbucket.
He also has a personal website you can visit that has more info about these mods as well.
- The Cubic Chunks Mod is back! Be a part of it's rebirth and Development.
-- Robinton's Mods: [ Mirror ] for some of his Mods incl Cubic Chunks Mod, due to DropBox broken links.
- Dungeon Generator for the Open Cubic Chunks Mod
- QuickSAVE-QuickLOAD for the Open Cubic Chunks Mod
So...many...links....
So many mods and projects, heh heh.
- The Cubic Chunks Mod is back! Be a part of it's rebirth and Development.
-- Robinton's Mods: [ Mirror ] for some of his Mods incl Cubic Chunks Mod, due to DropBox broken links.
- Dungeon Generator for the Open Cubic Chunks Mod
- QuickSAVE-QuickLOAD for the Open Cubic Chunks Mod
Great! Let me get Enigma into a stable and usable state and then we can start building our mappings database.
I still need to figure out how take mappings from multiple people and merge them together. I'm tempted to just do something very simple like most-recent-mapping wins.
Also, to avoid duplication of effort, we'll need a central place to host the mappings, merge them, and make sure each deobfuscation session starts with the latest mappings. I was thinking maybe using a mercurial repo to host the mappings themselves and then people can push/pull/merge to stay synchronized. This approach might benefit from a human-readable format for the mappings where line-by-line merging makes some kind of sense.
I miss XCommands...
It's useful for modding Minecraft from scratch. =)
^
required: EntryPair<? extends ArgumentEntry>
found: EntryPair<Entry>
4 errors
1 warning
:compileJava FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --info or --debug option to get more log output.
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':compile
Java'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.ex
ecuteActions(ExecuteActionsTaskExecuter.java:69)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.ex
ecute(ExecuteActionsTaskExecuter.java:46)
at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExec
uter.execute(PostExecutionAnalysisTaskExecuter.java:35)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.exec
ute(SkipUpToDateTaskExecuter.java:64)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execut
e(ValidatingTaskExecuter.java:58)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecu
ter.execute(SkipEmptySourceFilesTaskExecuter.java:42)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter
.execute(SkipTaskWithNoActionsExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execut
e(SkipOnlyIfTaskExecuter.java:53)
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter
.execute(ExecuteAtMostOnceTaskExecuter.java:43)
at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailur
e(AbstractTask.java:296)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorW
orker.executeTask(AbstractTaskPlanExecutor.java:79)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorW
orker.processTask(AbstractTaskPlanExecutor.java:63)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorW
orker.run(AbstractTaskPlanExecutor.java:51)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(Defaul
tTaskPlanExecutor.java:23)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(Defau
ltTaskGraphExecuter.java:86)
at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTask
ExecutionAction.java:29)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecute
r.java:61)
at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExec
uter.java:23)
at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecu
ter.java:67)
at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildEx
ecutionAction.java:32)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecute
r.java:61)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecute
r.java:54)
at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(Default
GradleLauncher.java:148)
at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradle
Launcher.java:105)
at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLaun
cher.java:85)
at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildCon
troller.run(InProcessBuildActionExecuter.java:81)
at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.jav
a:33)
at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.jav
a:24)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProce
ssBuildActionExecuter.java:39)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProce
ssBuildActionExecuter.java:29)
at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:50)
at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.jav
a:171)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.
execute(CommandLineActionFactory.java:237)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.
execute(CommandLineActionFactory.java:210)
at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRunti
meValidationAction.java:35)
at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRunti
meValidationAction.java:24)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(
CommandLineActionFactory.java:206)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(
CommandLineActionFactory.java:169)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionRep
ortingAction.java:33)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionRep
ortingAction.java:22)
at org.gradle.launcher.Main.doAction(Main.java:33)
at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBoots
trap.java:54)
at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.j
ava:35)
at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
Caused by: org.gradle.api.internal.tasks.compile.CompilationFailedException: Com
pilation failed; see the compiler error output for details.
at org.gradle.api.internal.tasks.compile.jdk6.Jdk6JavaCompiler.execute(J
dk6JavaCompiler.java:47)
at org.gradle.api.internal.tasks.compile.jdk6.Jdk6JavaCompiler.execute(J
dk6JavaCompiler.java:38)
at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.delegat
eAndHandleErrors(NormalizingJavaCompiler.java:96)
at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.execute
(NormalizingJavaCompiler.java:49)
at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.execute
(NormalizingJavaCompiler.java:35)
at org.gradle.api.internal.tasks.compile.DelegatingJavaCompiler.execute(
DelegatingJavaCompiler.java:29)
at org.gradle.api.internal.tasks.compile.DelegatingJavaCompiler.execute(
DelegatingJavaCompiler.java:20)
at org.gradle.api.internal.tasks.compile.CleaningJavaCompilerSupport.exe
cute(CleaningJavaCompilerSupport.java:33)
at org.gradle.api.internal.tasks.compile.CleaningJavaCompilerSupport.exe
cute(CleaningJavaCompilerSupport.java:24)
at org.gradle.api.tasks.compile.JavaCompile.performCompilation(JavaCompi
le.java:87)
at org.gradle.api.tasks.compile.JavaCompile.compile(JavaCompile.java:65)
at org.gradle.api.tasks.compile.JavaCompile.compile(JavaCompile.java:53)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:63)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskF
actory$IncrementalTaskAction.doExecute(AnnotationProcessingTaskFactory.java:235)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskF
actory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:211)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskF
actory$IncrementalTaskAction.execute(AnnotationProcessingTaskFactory.java:222)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskF
actory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:200)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.ex
ecuteAction(ExecuteActionsTaskExecuter.java:80)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.ex
ecuteActions(ExecuteActionsTaskExecuter.java:61)
... 44 more
BUILD FAILED
Total time: 13.277 secs
C:\Users\Maury\Downloads\cuchaz-enigma-c02ee353e760\cuchaz-enigma-c02ee353e760>g
radle build -debug -info
Starting Build
Settings evaluated using empty settings script.
Projects loaded. Root project using build file 'C:\Users\Maury\Downloads\cuchaz-
enigma-c02ee353e760\cuchaz-enigma-c02ee353e760\build.gradle'.
Included projects: [root project 'cuchaz-enigma-c02ee353e760']
Evaluating root project 'cuchaz-enigma-c02ee353e760' using build file 'C:\Users\
Maury\Downloads\cuchaz-enigma-c02ee353e760\cuchaz-enigma-c02ee353e760\build.grad
le'.
All projects evaluated.
Selected primary task 'DefaultTaskParameter{taskName='build',projectPath='null'}
'
Tasks to be executed: [task ':compileJava', task ':processResources', task ':cla
sses', task ':jar', task ':assemble', task ':compileTestJava', task ':processTes
tResources', task ':testClasses', task ':test', task ':check', task ':build']
:compileJava (Thread[main,5,main]) started.
:compileJava
Executing task ':compileJava' (up-to-date check took 0.688 secs) due to:
No history is available.
All input files are considered out-of-date for incremental task ':compileJava'.
Compiling with JDK Java compiler API.
warning: [options] bootstrap class path not set in conjunction with -source 1.6
C:\Users\Maury\Downloads\cuchaz-enigma-c02ee353e760\cuchaz-enigma-c02ee353e760\s
rc\cuchaz\enigma\gui\Gui.java:605: error: inconvertible types
showClassEntryPair( (EntryPair<? extends ClassEntry>)pai
r );
^
required: EntryPair<? extends ClassEntry>
found: EntryPair<Entry>
C:\Users\Maury\Downloads\cuchaz-enigma-c02ee353e760\cuchaz-enigma-c02ee353e760\s
rc\cuchaz\enigma\gui\Gui.java:609: error: inconvertible types
showFieldEntryPair( (EntryPair<? extends FieldEntry>)pai
r );
^
required: EntryPair<? extends FieldEntry>
found: EntryPair<Entry>
C:\Users\Maury\Downloads\cuchaz-enigma-c02ee353e760\cuchaz-enigma-c02ee353e760\s
rc\cuchaz\enigma\gui\Gui.java:613: error: inconvertible types
showMethodEntryPair( (EntryPair<? extends MethodEntry>)p
air );
^
required: EntryPair<? extends MethodEntry>
found: EntryPair<Entry>
C:\Users\Maury\Downloads\cuchaz-enigma-c02ee353e760\cuchaz-enigma-c02ee353e760\s
rc\cuchaz\enigma\gui\Gui.java:617: error: inconvertible types
showArgumentEntryPair( (EntryPair<? extends ArgumentEntr
y>)pair );
^
required: EntryPair<? extends ArgumentEntry>
found: EntryPair<Entry>
4 errors
1 warning
:compileJava FAILED
:compileJava (Thread[main,5,main]) completed. Took 3.979 secs.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to
get more log output.
BUILD FAILED
Total time: 13.623 secs
Stopped 0 compiler daemon(s).
C:\Users\Maury\Downloads\cuchaz-enigma-c02ee353e760\cuchaz-enigma-c02ee353e760>g
radle build --debug -info
Starting Build
Settings evaluated using empty settings script.
Projects loaded. Root project using build file 'C:\Users\Maury\Downloads\cuchaz-
enigma-c02ee353e760\cuchaz-enigma-c02ee353e760\build.gradle'.
Included projects: [root project 'cuchaz-enigma-c02ee353e760']
Evaluating root project 'cuchaz-enigma-c02ee353e760' using build file 'C:\Users\
Maury\Downloads\cuchaz-enigma-c02ee353e760\cuchaz-enigma-c02ee353e760\build.grad
le'.
All projects evaluated.
Selected primary task 'DefaultTaskParameter{taskName='build',projectPath='null'}
'
Tasks to be executed: [task ':compileJava', task ':processResources', task ':cla
sses', task ':jar', task ':assemble', task ':compileTestJava', task ':processTes
tResources', task ':testClasses', task ':test', task ':check', task ':build']
:compileJava (Thread[main,5,main]) started.
:compileJava
Executing task ':compileJava' (up-to-date check took 0.928 secs) due to:
No history is available.
All input files are considered out-of-date for incremental task ':compileJava'.
Compiling with JDK Java compiler API.
warning: [options] bootstrap class path not set in conjunction with -source 1.6
C:\Users\Maury\Downloads\cuchaz-enigma-c02ee353e760\cuchaz-enigma-c02ee353e760\s
rc\cuchaz\enigma\gui\Gui.java:605: error: inconvertible types
showClassEntryPair( (EntryPair<? extends ClassEntry>)pai
r );
^
required: EntryPair<? extends ClassEntry>
found: EntryPair<Entry>
C:\Users\Maury\Downloads\cuchaz-enigma-c02ee353e760\cuchaz-enigma-c02ee353e760\s
rc\cuchaz\enigma\gui\Gui.java:609: error: inconvertible types
showFieldEntryPair( (EntryPair<? extends FieldEntry>)pai
r );
^
required: EntryPair<? extends FieldEntry>
found: EntryPair<Entry>
C:\Users\Maury\Downloads\cuchaz-enigma-c02ee353e760\cuchaz-enigma-c02ee353e760\s
rc\cuchaz\enigma\gui\Gui.java:613: error: inconvertible types
showMethodEntryPair( (EntryPair<? extends MethodEntry>)p
air );
^
required: EntryPair<? extends MethodEntry>
found: EntryPair<Entry>
C:\Users\Maury\Downloads\cuchaz-enigma-c02ee353e760\cuchaz-enigma-c02ee353e760\s
rc\cuchaz\enigma\gui\Gui.java:617: error: inconvertible types
showArgumentEntryPair( (EntryPair<? extends ArgumentEntr
y>)pair );
^
required: EntryPair<? extends ArgumentEntry>
found: EntryPair<Entry>
4 errors
1 warning
:compileJava FAILED
:compileJava (Thread[main,5,main]) completed. Took 3.829 secs.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to
get more log output.
BUILD FAILED
Total time: 13.464 secs
Stopped 0 compiler daemon(s).
C:\Users\Maury\Downloads\cuchaz-enigma-c02ee353e760\cuchaz-enigma-c02ee353e760>do
Please tell me what went wrong.
Thanks, nightscout01
Looks like a compiler inconsistency. I usually build using the Eclipse compiler which doesn't complain about that cast. Looks like javac does though. I'll have to find another way to solve that problem.
That means the gradle build won't work for you (It doesn't work for me either). In the meantime, you can just run/debug in Eclipse and it should work. If you're using eclipse, that is. =P
I'm not using Ant (which is yet another build system) at all in this project. You shouldn't have to use ant either. The built-in Eclipse java runner should work just fine if you point it at the Main class.
Compilers use a lot of "syntactic sugar" to make some language features work. Meaning, some language features (like for each loops) are compiled into other language features behind the scenes. Enums are a huge example of this too. Enums are just compiled into classes with a lot of static members.
Well... more precisely, the compiler maps the language features to JVM features. It just so happens that enum and class language features map to to the same JVM class feature.
When you decompile bytecode, you're trying to map whatever JVM features the compiler chose back to language features. It's a hard problem because there's no nice 1-to-1 mapping. One JVM feature could map to one of many possible language features. Since I have a super duper awesome decompiler, it's nice enough to tell us when the compiler did something weird behind the scenes by leaving /*synthetic*/ comments in the decompiled source.
In a nutshell, /*synthetic*/ means the original source code probably didn't have that thing, but the compiler added it to make some language feature work.