Konloch / Konloch/bytecode-viewer
Error while compiling edited ByteCode
- Dominant language
- Java
- Stars
- 15.6k
- Forks
- 1.3k
- PR merge metrics
- No merged PRs in 30d
Description
### Can you help me with compilation after editing ByteCode in jar file?
Here is error message
```
Error compiling class fun/rich/license/LicenseService
Keep in mind most decompilers cannot produce compilable classes
Suggested Fix: Try View>Pane>Krakatau>Bytecode and enable Editable.
java.io.FileNotFoundException: /home/user/.local/share/.Bytecode-Viewer/bcv_temp/czVZStIpgRWPjyoizOkhcSrSAfmQeyEY/fun/rich/license/LicenseService.j (No such file or directory)
at java.base/java.io.FileOutputStream.open0(Native Method)
at java.base/java.io.FileOutputStream.open(FileOutputStream.java:289)
at java.base/java.io.FileOutputStream.(FileOutputStream.java:230)
at com.konloch.disklib.DiskWriter.write(DiskWriter.java:361)
at com.konloch.disklib.DiskWriter.write(DiskWriter.java:344)
at com.konloch.disklib.DiskWriter.write(DiskWriter.java:285)
at com.konloch.disklib.DiskWriter.write(DiskWriter.java:257)
at com.konloch.disklib.DiskWriter.write(DiskWriter.java:271)
at com.konloch.disklib.DiskWriter.write(DiskWriter.java:244)
at the.bytecode.club.bytecodeviewer.compilers.impl.KrakatauAssembler.compile(KrakatauAssembler.java:67)
at the.bytecode.club.bytecodeviewer.gui.resourceviewer.BytecodeViewPanel.compile(BytecodeViewPanel.java:88)
at the.bytecode.club.bytecodeviewer.BytecodeViewer.compile(BytecodeViewer.java:519)
at the.bytecode.club.bytecodeviewer.BytecodeViewer.autoCompileSuccessful(BytecodeViewer.java:493)
at the.bytecode.club.bytecodeviewer.resources.exporting.impl.RunnableJarExporter.lambda$promptForExport$0(RunnableJarExporter.java:47)
at java.base/java.lang.Thread.run(Thread.java:1583)
```
Contributor guide
Research direction
Reproduce the edited ByteCode export and start with the stack-trace entry points in KrakatauAssembler.compile, BytecodeViewPanel.compile, and RunnableJarExporter.promptForExport. Trace how the temporary path is created and written, then verify that compiling and exporting the edited class completes without the FileNotFoundException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100