Konloch/bytecode-viewer · error · RuntimeException
No launch strategy for extension %s (%s)
Error message
No launch strategy for extension %s (%s)
What it means
PluginManager.runPlugin(File) looks up a PluginLaunchStrategy keyed by the file's extension in LAUNCH_STRATEGIES (e.g. for compiled Java/Groovy plugins). If no strategy is registered for the extension it throws RuntimeException with the extension and full path. Only known plugin formats can be launched from the plugin system.
Source
Thrown at src/main/java/the/bytecode/club/bytecodeviewer/plugin/PluginManager.java:130
PLUGIN_INSTANCES.add(newPluginInstance);
//start the plugin thread
newPluginInstance.start();
}
/**
* Starts and runs a plugin from file
*
* @param f the file of the plugin
* @throws Exception
*/
public static void runPlugin(File f) throws Throwable
{
String ext = f.getName().substring(f.getName().lastIndexOf('.') + 1);
PluginLaunchStrategy strategy = LAUNCH_STRATEGIES.get(ext);
if (strategy == null)
throw new RuntimeException(String.format("No launch strategy for extension %s (%s)",
ext, f.getAbsolutePath()));
Plugin p = strategy.run(f);
if (p != null)
runPlugin(p);
}
/**
* Add an active console from a plugin being ran
*/
public static void addExceptionUI(ExceptionUI ui)
{
if (activePlugin == null)
{
ui.setLocationRelativeTo(BytecodeViewer.viewer);
ui.setVisible(true);
return;View on GitHub (pinned to 31430e0033)
Solutions
- Use a supported plugin format: .java compiled with the matching strategy (CompiledJavaPluginLaunchStrategy) or a Groovy script (.gy/.groovy).
- Check the file extension and rename it to the correct supported one if it was misnamed.
- Extend LAUNCH_STRATEGIES in PluginManager to register a custom PluginLaunchStrategy for your format.
- Compile your plugin per the Bytecode Viewer plugin documentation before running it.
Example fix
// before
PluginManager.runPlugin(new File("myplugin.py")); // throws: no strategy for py
// after
PluginManager.runPlugin(new File("MyPlugin.groovy")); // supported strategy exists Defensive patterns
Strategy: try-catch
Try / catch
try {
PluginManager.runPlugin(pluginFile);
} catch (RuntimeException e) {
if (e.getMessage().startsWith("No launch strategy"))
showError("Unsupported plugin format. Use a compiled Java or Groovy (.gy/.groovy) plugin.");
else
throw e;
} Prevention
- Only pass files with extensions registered in PluginManager.LAUNCH_STRATEGIES.
- Compile plugins to a supported format before running.
- Never rename plugin files to arbitrary extensions.
- Register a custom PluginLaunchStrategy when adding a new format.
When it happens
Trigger: Calling PluginManager.runPlugin(File) (or using the plugin launcher UI) with a file whose extension has no registered launch strategy — e.g. .jar without a strategy variant, .txt, .py, or a renamed plugin.
Common situations: Selecting a random file via 'run plugin'; a plugin packaged in an unsupported format; typos or renamed extensions (.GY vs .gy handled differently elsewhere); using a plugin format from a different Bytecode Viewer version.
Related errors
- Multiple plugin subclasses.
- Cannot find Groovy script engine! Please contact Konloch.
- Unknown implementation
AI-assisted analysis of Konloch/bytecode-viewer@31430e0033 (2026-09-05).
Data as JSON: /api/errors/8643f147e6dd39b0.
Report an issue: GitHub.