Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No sources given error while running from command line #445

Open
Nismirno opened this issue Jul 5, 2022 · 2 comments
Open

No sources given error while running from command line #445

Nismirno opened this issue Jul 5, 2022 · 2 comments
Assignees

Comments

@Nismirno
Copy link

Nismirno commented Jul 5, 2022

I tried to run BCV from command line to decompile some jars but kept running into error: no sources given message.
After getting into the source code and running it in debug mode I have noticed that this line of code

JarUtils.saveAsJarClassesOnly(BytecodeViewer.getLoadedClasses(), tempZip.getAbsolutePath());

runs before BCV has loaded any classes as it is happens in BytecodeViewer::openFiles().

After changing the code in that way I got decompilation from command line working

BytecodeViewer.openFiles(new File[]{input}, false);
Thread.sleep(5 * 1000);
JarUtils.saveAsJarClassesOnly(BytecodeViewer.getLoadedClasses(), tempZip.getAbsolutePath());

Is this a bug or am I using CLI in some wrong way?

@Konloch Konloch self-assigned this Feb 21, 2023
@pmorange
Copy link

Hi,
Any news on this?
I can't decompile anything from command line because of this...
Thanks.

@Konloch
Copy link
Owner

Konloch commented May 21, 2024

Hi, Any news on this? I can't decompile anything from command line because of this... Thanks.

Will try to come up with a fix for this, cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants