简体   繁体   中英

JDK for Ghidra give me Error: "Could not find or load main class LaunchSupport"

I downloaded JDK 15 for my windows 10 64 bit pc and put the environment variable JAVA-HOME correct and the PATH also. This give me in cmd:

    C:\Users\patpin>java -version
    java version "15.0.2" 2021-01-19
    Java(TM) SE Runtime Environment (build 15.0.2+7-27)
    Java HotSpot(TM) 64-Bit Server VM (build 15.0.2+7-27, mixed mode, sharing)

When I start Ghidra (even as admin) I get:

    Error: Could not find or load main class LaunchSupport
    Caused by: java.lang.ClassNotFoundException: LaunchSupport
    Error: Could not find or load main class LaunchSupport
    Caused by: java.lang.ClassNotFoundException: LaunchSupport
    Error: Could not find or load main class LaunchSupport
    Caused by: java.lang.ClassNotFoundException: LaunchSupport

Failed to find a supported JDK. Please refer to the Ghidra Installation Guide's Troubleshooting section.

Maybe this issue can be solved by updating the lunch.properties file.

First, try to fullfil their minimal requirements. According to ghidra's documentation

  • Current Ghidra 9.2.2 need Java 11 64-bit Runtime and Development Kit (JDK)
  • So, it is better to install java 11 64 bit.

If ghidra fails to locate the jdk, then force it by-

  • To launch with a specific version of Java, set the JAVA_HOME_OVERRIDE property in the support/launch.properties file. If this property is set to an incompatible version of Java, Ghidra will revert to automatically locating a compatible version.

This may be because you're using the release from github, and these releases are not built and only contain the source code. Source: https://github.com/NationalSecurityAgency/ghidra/issues/2872

To fix the issue, you can try download ghidra from here https://www.ghidra-sre.org/

Usen este comando en power shell

winget install Microsoft.OpenJDK.17

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM