intellij-ghidra
intellij-ghidra copied to clipboard
Help wanted about IDEA Project
I'm a newbie to java development, now I'm trying to develop a ghidra script with IDEA. Thank you in advance for your development of this plug-in🥰.
Now that I have done "Add a Ghidra Facets to Project Structure" and "Add a new Ghidra Launcher in Configurations, " I can get a fully completion suggestion and script result in Ghidra Script Manager.
But when I run my script in IDEA, it first show can't find a class about Log4j , after I manually add the log4j-core and log4j-api to my project, I have rerun the script in IDEA's Ghidra Launcher, it just stuck on (LoggingInitialization), like this:
I have no idea what to do to solve this, sorry for my pool English, any suggestion would be aprreciate😘😘😘😘😘
PS: I'm running Ghidra on Fedora39 with KDE Plasma
Hey,
It shouldn't be necessary to add the log4j dependencies to your own project, the plugin should be handling that for you. Could you share a bit more information about your project (i.e. do you have a standalone Java project containing scripts, or are you opening your ghidra_scripts folder)?
Though one thing to mention is that intellij-ghidra currently can't run scripts directly. What it can do instead is launch Ghidra with a debugger attached and allow you to set breakpoints on your scripts.
I'm sorry for my lack of description!
I have IDEA Ultimate 2023.2.6 and intellj-idea 0.5.0 installed.
- Step to produce:
- Create a new project in idea, like this:
- Using
File->Project Structure->Facets
add ghidra to current project and choose a right Ghidra Install Location. - Add a Ghidra Launcher in
Run/Debug Configuration Window
. - Write some code with GhidraScript and Run it with Ghidra Launcher
- Got
ClassNotFound
Error!
Is there anything I have missed? Thank you for being so helpful!
Nothing wrong with your approach, that should be working. Looks like potentially a bug in the plugin. I'll reproduce your steps and get back to you.
Hi, I have the same problem. I am using IntelliJ 2024.1.1 Ultimate Edition. I have tested it with OpenJDK 17 but also other JDKs. @Yatogaii have you found any workaround?
@lcian Sorry, I haven't found a solution either🥹🥹🥹.
The same behaviour
- Ghidra 11.0.3 & 10.3.2
- OpenJDK 21
- Windows 10
Looks like plugin unproperly import third-party libs. As example log4j from "Ghidra/Framework/Generic/lib/log4j-core-x.y.z.jar" or flatlaf from "Ghidra/Framework/Gui/lib/flatlaf-x.y.z.jar". If I manually import flatlaf, then 2 more lines of logs appear in the console
@deniska-iriska I encountered the same situation. Are there any solutions available at the moment?
@cong0221, nope. I just started using IDA Pro