ingokegel / jclasslib Goto Github PK
View Code? Open in Web Editor NEWjclasslib bytecode editor is a tool that visualizes all aspects of compiled Java class files and the contained bytecode.
License: Other
jclasslib bytecode editor is a tool that visualizes all aspects of compiled Java class files and the contained bytecode.
License: Other
The logic of function 'filterFalseNegatives' seems no problem, but jclasslib prints several "[INVALID BRANCH]" , is this a issue?
FinallyGraphHelper.zip
com.intellij.diagnostic.PluginException: Cannot load class org.gjt.jclasslib.idea.BytecodeToolWindowPanel (
error: org/gjt/jclasslib/browser/BrowserServices,
classLoader=PluginClassLoader(plugin=PluginDescriptor(name=jclasslib Bytecode Viewer, id=jclasslib, descriptorPath=plugin.xml, path=D:\Program Files\JetBrains\Toolbox\apps\IDEA-U\ch-0\221.5080.210.plugins\idea-6.0.4.jar, version=6.0.4, package=null, isBundled=false), packagePrefix=null, instanceId=222, state=active)
)
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClassInsideSelf(PluginClassLoader.java:412)
at com.intellij.ide.plugins.cl.PluginClassLoader.tryLoadingClass(PluginClassLoader.java:240)
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:212)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
at org.gjt.jclasslib.idea.ToolWindowKt.showClassFile(ToolWindow.kt:65)
at org.gjt.jclasslib.idea.ClassFileLocationKt$openClassFile$1.onSuccess(ClassFileLocation.kt:67)
at com.intellij.openapi.progress.impl.CoreProgressManager.finishTask(CoreProgressManager.java:585)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.finishTask(ProgressManagerImpl.java:155)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsynchronously$6(CoreProgressManager.java:508)
at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:215)
at com.intellij.openapi.application.TransactionGuardImpl.access$100(TransactionGuardImpl.java:22)
at com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:197)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:873)
at com.intellij.openapi.application.impl.ApplicationImpl$3.run(ApplicationImpl.java:511)
at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:69)
at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:112)
at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:42)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:898)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:746)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:439)
at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:803)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:438)
at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:106)
at com.intellij.ide.IdeEventQueue.performActivity(IdeEventQueue.java:604)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:436)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:873)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:484)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)
Caused by: java.lang.NoClassDefFoundError: org/gjt/jclasslib/browser/BrowserServices
at java.base/java.lang.ClassLoader.defineClass2(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1109)
at com.intellij.util.lang.UrlClassLoader.consumeClassData(UrlClassLoader.java:263)
at com.intellij.util.lang.ZipResourceFile.findClass(ZipResourceFile.java:111)
at com.intellij.util.lang.JarLoader.findClass(JarLoader.java:63)
at com.intellij.util.lang.ClassPath.findClassInLoader(ClassPath.java:246)
at com.intellij.util.lang.ClassPath.findClass(ClassPath.java:179)
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClassInsideSelf(PluginClassLoader.java:404)
... 39 more
Caused by: java.lang.ClassNotFoundException: org.gjt.jclasslib.browser.BrowserServices PluginClassLoader(plugin=PluginDescriptor(name=jclasslib Bytecode Viewer, id=jclasslib, descriptorPath=plugin.xml, path=D:\Program Files\JetBrains\Toolbox\apps\IDEA-U\ch-0\221.5080.210.plugins\idea-6.0.4.jar, version=6.0.4, package=null, isBundled=false), packagePrefix=null, instanceId=222, state=active)
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:215)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
... 47 more
We are getting exceptions from the jclasslib IDEA plugin.
update failed for AnAction(org.gjt.jclasslib.idea.ShowBytecodeAction) with ID=ShowByteCodeJclasslib
java.lang.IllegalStateException: Must not call from EDT
at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runWithWriteActionPriority(ProgressIndicatorUtils.java:99)
at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runInReadActionWithWriteActionPriority(ProgressIndicatorUtils.java:72)
at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runInReadActionWithWriteActionPriority(ProgressIndicatorUtils.java:93)
at org.jetbrains.kotlin.idea.ProgressUtilKt.runInReadActionWithWriteActionPriority(ProgressUtil.kt:34)
at org.jetbrains.kotlin.idea.ProgressUtilKt.runInReadActionWithWriteActionPriorityWithPCE(ProgressUtil.kt:26)
at org.jetbrains.kotlin.idea.debugger.evaluate.KotlinDebuggerCaches$Companion.createTypeMapperForSourceFile(KotlinDebuggerCaches.kt:196)
at org.jetbrains.kotlin.idea.debugger.evaluate.KotlinDebuggerCaches$Companion.getOrCreateTypeMapper(KotlinDebuggerCaches.kt:168)
at org.gjt.jclasslib.idea.KotlinClassNameProvider.getNameForNonLocalClass(KotlinClassNameProvider.kt:113)
at org.gjt.jclasslib.idea.KotlinClassNameProvider.access$getNameForNonLocalClass(KotlinClassNameProvider.kt:24)
at org.gjt.jclasslib.idea.KotlinClassNameProvider$getClassNameForRelevantElement$2.invoke(KotlinClassNameProvider.kt:83)
at org.gjt.jclasslib.idea.KotlinClassNameProvider$getClassNameForRelevantElement$2.invoke(KotlinClassNameProvider.kt:24)
at org.gjt.jclasslib.idea.KotlinClassNameProviderKt$sam$com_intellij_openapi_util_Computable$0.compute(KotlinClassNameProvider.kt)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:917)
at org.gjt.jclasslib.idea.KotlinClassNameProviderKt.runReadAction(KotlinClassNameProvider.kt:134)
at org.gjt.jclasslib.idea.KotlinClassNameProviderKt.access$runReadAction(KotlinClassNameProvider.kt:1)
at org.gjt.jclasslib.idea.KotlinClassNameProvider.getClassNameForRelevantElement$idea(KotlinClassNameProvider.kt:82)
at org.gjt.jclasslib.idea.KotlinClassNameProvider.getClassName(KotlinClassNameProvider.kt:56)
at org.gjt.jclasslib.idea.ClassFileLocationKt.getContainingClassName(ClassFileLocation.kt:118)
at org.gjt.jclasslib.idea.ShowBytecodeAction.update(Action.kt:27)
at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareUpdate(ActionUtil.java:176)
at com.intellij.openapi.actionSystem.impl.ActionUpdater.doUpdate(ActionUpdater.java:378)
at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$null$1(ActionUpdater.java:78)
at com.intellij.openapi.actionSystem.impl.ActionUpdater.callAction(ActionUpdater.java:106)
at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$new$2(ActionUpdater.java:79)
at com.intellij.openapi.actionSystem.impl.ActionUpdater.update(ActionUpdater.java:364)
at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandGroupChild(ActionUpdater.java:231)
at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$doExpandActionGroup$19(ActionUpdater.java:215)
at com.intellij.util.containers.ContainerUtil.concat(ContainerUtil.java:1609)
at com.intellij.openapi.actionSystem.impl.ActionUpdater.doExpandActionGroup(ActionUpdater.java:215)
at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandGroupChild(ActionUpdater.java:258)
at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$doExpandActionGroup$19(ActionUpdater.java:215)
at com.intellij.util.containers.ContainerUtil.concat(ContainerUtil.java:1609)
at com.intellij.openapi.actionSystem.impl.ActionUpdater.doExpandActionGroup(ActionUpdater.java:215)
at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandActionGroup(ActionUpdater.java:139)
at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandActionGroup(ActionUpdater.java:131)
at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$expandActionGroupWithTimeout$11(ActionUpdater.java:148)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$3(CoreProgressManager.java:185)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:169)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:591)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:537)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:59)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:156)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:185)
at com.intellij.openapi.progress.util.ProgressIndicatorUtils.withTimeout(ProgressIndicatorUtils.java:260)
at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandActionGroupWithTimeout(ActionUpdater.java:147)
at com.intellij.openapi.actionSystem.impl.Utils.fillMenu(Utils.java:66)
at com.intellij.openapi.actionSystem.impl.ActionMenu.fillMenu(ActionMenu.java:286)
at com.intellij.openapi.actionSystem.impl.ActionMenu$MenuListenerImpl.menuSelected(ActionMenu.java:244)
at java.desktop/javax.swing.JMenu.fireMenuSelected(JMenu.java:1036)
at java.desktop/javax.swing.JMenu$MenuChangeListener.stateChanged(JMenu.java:1116)
at java.desktop/javax.swing.DefaultButtonModel.fireStateChanged(DefaultButtonModel.java:352)
at java.desktop/javax.swing.DefaultButtonModel.setSelected(DefaultButtonModel.java:234)
at java.desktop/javax.swing.JMenu.setSelected(JMenu.java:291)
at java.desktop/com.apple.laf.ScreenMenu$2.run(ScreenMenu.java:136)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:303)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:751)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:749)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:748)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:817)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:766)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:405)
at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:704)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:404)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Exceptions reproduce both in IDEA (2019.1/2) and Android Studio.
Can you please take a look at it?
Java 15 added a PermittedSubclasses attribute.
This tool does not know how to display that attribute.
Jclasslib startup on mac throws the following illegal access error even though java8
is in PATH
and set as JAVA_HOME
.
java.lang.IllegalAccessError: class org.gjt.jclasslib.browser.MacEventHandler (in unnamed module @0x318ba8c8) cannot access class com.apple.eawt.Application (in module java.desktop) because module java.desktop does not export com.apple.eawt to unnamed module @0x318ba8c8
at org.gjt.jclasslib.browser.MacEventHandler.init(MacEventHandler.kt:14)
at org.gjt.jclasslib.browser.BrowserApplication.main(Main.kt:45)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-ea/Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@9-ea/NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-ea/DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(java.base@9-ea/Method.java:535)
at com.exe4j.runtime.LauncherEngine.launch(LauncherEngine.java:65)
at com.install4j.runtime.launcher.MacLauncher.main(MacLauncher.java:67)
OS: Mac OSX Sierra v 10.12
Xcode 8.2.1, Build version 8C1002
java version "1.8.0_111"
JAVA_HOME: /Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home
Note - I do have JDK9 installed, but is not the default JDK.
The bitmask in ConstantPoolInfo#getLong() is not correct
return (long)highBytes << 32 | ((long)lowBytes & 0x7FFFFFFF);
The bitmask should be 0xFFFFFFFF since lowBytes describe the full lower 32 bits of the long.
The bitmask in ConstantPoolInfo#setLong() is also not correct
lowBytes = (int)(number & 0x0000FFFF);
The bitmask should also be 0xFFFFFFFF for the same reason.
The patch: https://gist.github.com/llkiwi2006/1e052748a0a281288ae2
Every once in a while (haven't figured out what causes this exactly. However, it seems to have to do with switching projects and opening IntelliJ), IntelliJ shows this error:
com.intellij.diagnostic.PluginException: Do not use toolWindow.setAvailable() as part of ToolWindowFactory.init().
Use ToolWindowFactory.shouldBeAvailable() instead. [Plugin: jclasslib]
at com.intellij.openapi.wm.impl.ToolWindowManagerImpl.registerToolWindow$intellij_platform_ide_impl(ToolWindowManagerImpl.kt:991)
at com.intellij.toolWindow.ToolWindowSetInitializer.createAndLayoutToolWindows(ToolWindowSetInitializer.kt:186)
at com.intellij.toolWindow.ToolWindowSetInitializer.access$createAndLayoutToolWindows(ToolWindowSetInitializer.kt:83)
at com.intellij.toolWindow.ToolWindowSetInitializer$initUi$1.accept(ToolWindowSetInitializer.kt:147)
at com.intellij.toolWindow.ToolWindowSetInitializer$initUi$1.accept(ToolWindowSetInitializer.kt:83)
at java.base/java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:714)
at java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:478)
at com.intellij.toolWindow.ToolWindowSetInitializer$initUi$2.execute(ToolWindowSetInitializer.kt:154)
at java.base/java.util.concurrent.CompletableFuture.uniAcceptNow(CompletableFuture.java:750)
at java.base/java.util.concurrent.CompletableFuture.uniAcceptStage(CompletableFuture.java:731)
at java.base/java.util.concurrent.CompletableFuture.thenAcceptAsync(CompletableFuture.java:2117)
at com.intellij.toolWindow.ToolWindowSetInitializer.initUi(ToolWindowSetInitializer.kt:141)
at com.intellij.openapi.wm.impl.ToolWindowManagerImpl.doInit(ToolWindowManagerImpl.kt:446)
at com.intellij.openapi.wm.impl.ToolWindowManagerImpl.init(ToolWindowManagerImpl.kt:419)
at com.intellij.toolWindow.InitToolWindowSetActivity$runActivity$2.run(ToolWindowSetInitializer.kt:72)
at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:215)
at com.intellij.openapi.application.TransactionGuardImpl.access$100(TransactionGuardImpl.java:22)
at com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:197)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:873)
at com.intellij.openapi.application.impl.ApplicationImpl$3.run(ApplicationImpl.java:511)
at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:69)
at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:112)
at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:42)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:898)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:746)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:439)
at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:803)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:438)
at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:106)
at com.intellij.ide.IdeEventQueue.performActivity(IdeEventQueue.java:604)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:436)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:873)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:484)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)
Caused by: java.lang.IllegalStateException: Do not use toolWindow.setAvailable() as part of ToolWindowFactory.init().
Use ToolWindowFactory.shouldBeAvailable() instead.
at com.intellij.openapi.wm.impl.ToolWindowImpl.setAvailable(ToolWindowImpl.kt:353)
at com.intellij.ide.impl.ContentManagerWatcher.watchContentManager(ContentManagerWatcher.java:23)
at org.gjt.jclasslib.idea.ByteCodeToolWindowFactory.createToolWindowContent(ToolWindow.kt:181)
at com.intellij.openapi.wm.impl.ToolWindowImpl.createContentIfNeeded$intellij_platform_ide_impl(ToolWindowImpl.kt:528)
at com.intellij.openapi.wm.impl.ToolWindowImpl.getContentManager(ToolWindowImpl.kt:404)
at org.gjt.jclasslib.idea.ToolWindowKt.addInfoPanel(ToolWindow.kt:173)
at org.gjt.jclasslib.idea.ToolWindowKt.access$addInfoPanel(ToolWindow.kt:1)
at org.gjt.jclasslib.idea.ByteCodeToolWindowFactory.init(ToolWindow.kt:186)
at com.intellij.openapi.wm.impl.ToolWindowManagerImpl.registerToolWindow$intellij_platform_ide_impl(ToolWindowManagerImpl.kt:988)
... 45 more
Hello, I come from China. My English is not very good!My ide is a AndroidStudio.
Operation: "View--->Show Bytecode with jclasslib", Abnormal on the newspaper! How does this work out? Thank you
The class browser does not support the NestHost or NestMembers attributes added in JDK 11.
Hi,
Thanks for your great tool.
And I'm trying to use the lib to read class files, but I know little about kotlin. Could you help to tell me how it performs in multi-threads env.
Hello Ingo, thank you so much for this great software!!!
Is there a documentation on how to use the library that enables developers to read and write Java class files and bytecode?
Thanks in advance.
Search for strings and usages of specific constant pool entries
I can download this plug-in, but my idea does not display restart. After I restart, there is no show related menu in the view. My idea version is version 2020. I downloaded version 2020 on the official website and put it in the local plugin folder, but it is still invalid. Are there other configuration solutions to enable my plug-in to start?
Currently, jclasslib is localized into German, Simplified Chinese and Polish.
I'm looking for further localizations. If you are interested, please comment on this issue.
The localization process is as follows:
Browser.properties
to Browser_zh_CN.properties
, with the appropriate locale code in the file name.{0}
must be preserved.{0,number,integer}
must not be translated.{0,choice,1#class was|1<classes were}
, the numbers describe limits for the associated numerical placeholder and the text after the #
characters must be translated to form grammatically correct sentences.key.
include technical terms that may not have to be fully translated.\n
should be included in the same place and frequency in the translated message.:
are located before a UI element. In the translation, add an appropriate character (or none) for all messages consistently.SupportedLocale
class for the new locale.bytecode viewer
run configuration in IntelliJ IDEA.Thank you! 💚
Maybe the line 33 of file "LocalVariableAttributeDetailPane.kt" should change from
"override fun createValue(row: LocalVariableEntry) = row.length"
to
"override fun createValue(row: LocalVariableEntry) = row.targetLength"
class import org.gjt.jclasslib.structures.CPInfo does not exists in jclasslib-library.jar
I found the plugin of jclasslib in JetBrain Plugin website.
https://plugins.jetbrains.com/plugin/9248-jclasslib-bytecode-viewer
but when I download the latest plugin, and install from disk, the IntelJ IDEA tell me that it doesn't support this plugin.
hope you can fix it ASAP, thanks for ur contribution.
os:mac os 10.11.3
after double click installer is nothing
I want to locate the unique text in the byte code,but I didn't find the function.(like ctrl + F).
Can you add this function ? Thank you!
IDEA supports opening .class files directly (and decompiles them using Fernflower).
The built-in bytecode viewer has no problem viewing the bytecode for such files.
However, attempting to view them using the jclasslib plugin results in an error dialog: "Class file could not be found: ".
It would be really nice to be able to view those using jclasslib from within the IDE.
My use case is class files generated by a build task - they are not part of the project, nor do they have a corresponding source file in the project.
Java 14 added a Record attribute.
This tool does not know how to display that attribute.
It would be really awesome if jclasslib (actually the IJ plugin in my case) would allow editing of bytecode and then saving as class file like CafeBabe used to support.
This looks similar to issue #13 in that the same package (com.apple.eawt
) seems to be involved, but is probably a different issue.
Using Java build 9+181, I get a NoClassDefFoundError
when I start jclasslib 5.2 under macOS 10.10.5
java.lang.NoClassDefFoundError: com/apple/eawt/AboutHandler
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(Unknown Source)
at java.base/java.security.SecureClassLoader.defineClass(Unknown Source)
at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(Unknown Source)
at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(Unknown Source)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(Unknown Source)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
at org.gjt.jclasslib.browser.MacEventHandler.init(MacEventHandler.kt:15)
at org.gjt.jclasslib.browser.BrowserApplication.main(Main.kt:45)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at com.exe4j.runtime.LauncherEngine.launch(LauncherEngine.java:81)
at com.install4j.runtime.launcher.MacLauncher.main(MacLauncher.java:53)
Caused by: java.lang.ClassNotFoundException: com.apple.eawt.AboutHandler
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
... 17 more
I created a package for JClassLib: https://www.npackd.org/p/jclasslib64 , but the silent installation options does not work:
"%setup%" -q -dir "%CD%" && del /f /q "%setup%"
java.lang.IllegalAccessError: class org.gjt.jclasslib.browser.MacEventHandler (in unnamed module @0x55a1c291) cannot access class com.apple.eawt.Application (in module java.desktop) because module java.desktop does not export com.apple.eawt to unnamed module @0x55a1c291
at org.gjt.jclasslib.browser.MacEventHandler.init(MacEventHandler.kt:14)
at org.gjt.jclasslib.browser.BrowserApplication.main(Main.kt:45)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at com.exe4j.runtime.LauncherEngine.launch(LauncherEngine.java:65)
at com.install4j.runtime.launcher.MacLauncher.main(MacLauncher.java:67)
System: macOS Sierra 10.12.3
JDK: 1.8.0_121-b13
Previous version of jclasslib just has this behavior, which is very convenient to user, so suggest also add this feature to latest 5.0 version of jclasslib.
Thanks for this useful tool.
Regards,
Tao
com.intellij.diagnostic.PluginException: Do not use toolWindow.setAvailable() as part of ToolWindowFactory.init().
Use ToolWindowFactory.shouldBeAvailable() instead. [Plugin: jclasslib]
at com.intellij.openapi.wm.impl.ToolWindowManagerImpl.registerToolWindow$intellij_platform_ide_impl(ToolWindowManagerImpl.kt:991)
at com.intellij.toolWindow.ToolWindowSetInitializer.createAndLayoutToolWindows(ToolWindowSetInitializer.kt:188)
at com.intellij.toolWindow.ToolWindowSetInitializer.access$createAndLayoutToolWindows(ToolWindowSetInitializer.kt:83)
at com.intellij.toolWindow.ToolWindowSetInitializer$initUi$1.accept(ToolWindowSetInitializer.kt:147)
at com.intellij.toolWindow.ToolWindowSetInitializer$initUi$1.accept(ToolWindowSetInitializer.kt:83)
at java.base/java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:714)
at java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:478)
at com.intellij.toolWindow.ToolWindowSetInitializer$initUi$2.execute(ToolWindowSetInitializer.kt:156)
at java.base/java.util.concurrent.CompletableFuture.uniAcceptNow(CompletableFuture.java:750)
at java.base/java.util.concurrent.CompletableFuture.uniAcceptStage(CompletableFuture.java:731)
at java.base/java.util.concurrent.CompletableFuture.thenAcceptAsync(CompletableFuture.java:2117)
at com.intellij.toolWindow.ToolWindowSetInitializer.initUi(ToolWindowSetInitializer.kt:141)
at com.intellij.openapi.wm.impl.ToolWindowManagerImpl.doInit(ToolWindowManagerImpl.kt:446)
at com.intellij.openapi.wm.impl.ToolWindowManagerImpl.init(ToolWindowManagerImpl.kt:419)
at com.intellij.toolWindow.InitToolWindowSetActivity$runActivity$2.run(ToolWindowSetInitializer.kt:72)
at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:215)
at com.intellij.openapi.application.TransactionGuardImpl.access$100(TransactionGuardImpl.java:22)
at com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:197)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:873)
at com.intellij.openapi.application.impl.ApplicationImpl$3.run(ApplicationImpl.java:511)
at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:69)
at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:112)
at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:42)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:898)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:746)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:439)
at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:803)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:438)
at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:106)
at com.intellij.ide.IdeEventQueue.performActivity(IdeEventQueue.java:604)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:436)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:873)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:484)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)
Caused by: java.lang.IllegalStateException: Do not use toolWindow.setAvailable() as part of ToolWindowFactory.init().
Use ToolWindowFactory.shouldBeAvailable() instead.
at com.intellij.openapi.wm.impl.ToolWindowImpl.setAvailable(ToolWindowImpl.kt:353)
at com.intellij.ide.impl.ContentManagerWatcher.watchContentManager(ContentManagerWatcher.java:23)
at org.gjt.jclasslib.idea.ByteCodeToolWindowFactory.createToolWindowContent(ToolWindow.kt:181)
at com.intellij.openapi.wm.impl.ToolWindowImpl.createContentIfNeeded$intellij_platform_ide_impl(ToolWindowImpl.kt:528)
at com.intellij.openapi.wm.impl.ToolWindowImpl.getContentManager(ToolWindowImpl.kt:404)
at org.gjt.jclasslib.idea.ToolWindowKt.addInfoPanel(ToolWindow.kt:173)
at org.gjt.jclasslib.idea.ToolWindowKt.access$addInfoPanel(ToolWindow.kt:1)
at org.gjt.jclasslib.idea.ByteCodeToolWindowFactory.init(ToolWindow.kt:186)
at com.intellij.openapi.wm.impl.ToolWindowManagerImpl.registerToolWindow$intellij_platform_ide_impl(ToolWindowManagerImpl.kt:988)
... 45 more
There have a way to add constants directly from a "notepad"? such as modifying methods you set up, it would be nice to have something similar, but setting each constant line by line, to add everything one by one for "big projects"
help, what's the problme?
and i found when out cursor on the last line code, view menu "show bytecode with jClasslib" will be disappear.
All values in key-value panels should be selectable
could you please release the latest version which supports copying of method signatures.
error message: invalid constant pool entry with unknown tag 18
Exception in thread "main" org.gjt.jclasslib.structures.InvalidByteCodeException: invalid constant pool entry with unknown tag 18
at org.gjt.jclasslib.structures.CPInfo.create(CPInfo.java:110)
at
When a class file is modified (externally) while being opened, one has to reopen the file to see changes because the Reload class file
button doesn't work.
DELETE IT THANK
Runtime Info:
IntelliJ IDEA 2022.1 (Ultimate Edition)
Runtime version: 11.0.14.1+1-b2043.25 amd64
------------------------------------------------error-------------------------------------------------------
com.intellij.diagnostic.PluginException: Do not use toolWindow.setAvailable() as part of ToolWindowFactory.init().
Use ToolWindowFactory.shouldBeAvailable() instead. [Plugin: jclasslib]
at com.intellij.openapi.wm.impl.ToolWindowManagerImpl.registerToolWindow$intellij_platform_ide_impl(ToolWindowManagerImpl.kt:991)
at com.intellij.toolWindow.ToolWindowSetInitializer.createAndLayoutToolWindows(ToolWindowSetInitializer.kt:188)
at com.intellij.toolWindow.ToolWindowSetInitializer.access$createAndLayoutToolWindows(ToolWindowSetInitializer.kt:83)
at com.intellij.toolWindow.ToolWindowSetInitializer$initUi$1.accept(ToolWindowSetInitializer.kt:147)
at com.intellij.toolWindow.ToolWindowSetInitializer$initUi$1.accept(ToolWindowSetInitializer.kt:83)
at java.base/java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:714)
at java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:478)
at com.intellij.toolWindow.ToolWindowSetInitializer$initUi$2.execute(ToolWindowSetInitializer.kt:156)
at java.base/java.util.concurrent.CompletableFuture.uniAcceptNow(CompletableFuture.java:750)
at java.base/java.util.concurrent.CompletableFuture.uniAcceptStage(CompletableFuture.java:731)
at java.base/java.util.concurrent.CompletableFuture.thenAcceptAsync(CompletableFuture.java:2117)
at com.intellij.toolWindow.ToolWindowSetInitializer.initUi(ToolWindowSetInitializer.kt:141)
at com.intellij.openapi.wm.impl.ToolWindowManagerImpl.doInit(ToolWindowManagerImpl.kt:446)
at com.intellij.openapi.wm.impl.ToolWindowManagerImpl.init(ToolWindowManagerImpl.kt:419)
at com.intellij.toolWindow.InitToolWindowSetActivity$runActivity$2.run(ToolWindowSetInitializer.kt:72)
at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:215)
at com.intellij.openapi.application.TransactionGuardImpl.access$100(TransactionGuardImpl.java:22)
at com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:197)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:873)
at com.intellij.openapi.application.impl.ApplicationImpl$3.run(ApplicationImpl.java:511)
at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:69)
at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:112)
at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:42)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:898)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:746)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:439)
at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:803)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:438)
at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:106)
at com.intellij.ide.IdeEventQueue.performActivity(IdeEventQueue.java:604)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:436)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:873)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:484)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)
Caused by: java.lang.IllegalStateException: Do not use toolWindow.setAvailable() as part of ToolWindowFactory.init().
Use ToolWindowFactory.shouldBeAvailable() instead.
at com.intellij.openapi.wm.impl.ToolWindowImpl.setAvailable(ToolWindowImpl.kt:353)
at com.intellij.ide.impl.ContentManagerWatcher.watchContentManager(ContentManagerWatcher.java:23)
at org.gjt.jclasslib.idea.ByteCodeToolWindowFactory.createToolWindowContent(ToolWindow.kt:181)
at com.intellij.openapi.wm.impl.ToolWindowImpl.createContentIfNeeded$intellij_platform_ide_impl(ToolWindowImpl.kt:528)
at com.intellij.openapi.wm.impl.ToolWindowImpl.getContentManager(ToolWindowImpl.kt:404)
at org.gjt.jclasslib.idea.ToolWindowKt.addInfoPanel(ToolWindow.kt:173)
at org.gjt.jclasslib.idea.ToolWindowKt.access$addInfoPanel(ToolWindow.kt:1)
at org.gjt.jclasslib.idea.ByteCodeToolWindowFactory.init(ToolWindow.kt:186)
at com.intellij.openapi.wm.impl.ToolWindowManagerImpl.registerToolWindow$intellij_platform_ide_impl(ToolWindowManagerImpl.kt:988)
... 45 more
While there were no changes in the class format for Java 10, the major version was bumped.
When I used the Jclasslib plugin for IDEA, I found that there was a problem with the location of the variables in the LocalVariableTable.
eg:
demo:
`public class Test{
public static void main(String[] a){
}
public void test1(int a){
System.out.println(this);
if(a==0){
int c=0;
System.out.println(c);
}
}
}
`
result:
in jlcasslib:
Decompiled to bytecode:
public void test1(int);
descriptor: (I)V
flags: ACC_PUBLIC
Code:
stack=2, locals=3, args_size=2
0: getstatic #5 // Field java/lang/System.out:Ljava/io/PrintStream;
3: aload_0
4: invokevirtual #6 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
7: iload_1
8: ifne 20
11: iconst_0
12: istore_2
13: getstatic #5 // Field java/lang/System.out:Ljava/io/PrintStream;
16: iload_2
17: invokevirtual #7 // Method java/io/PrintStream.println:(I)V
20: return
LineNumberTable:
line 17: 0
line 18: 7
line 19: 11
line 20: 13
line 22: 20
StackMapTable: number_of_entries = 1
frame_type = 20 /* same */
}
As shown above, the first variable in the method's LocalVariableTable should be THIS instead of C
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.