0

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.

Joachim Sauer
  • 302,674
  • 57
  • 556
  • 614
patpin
  • 11
  • 1
  • 4

2 Answers2

0

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.
Md Kawser Habib
  • 1,966
  • 2
  • 10
  • 25
  • I installed 64 bit jdk-11.0.10 (jdk-11.0.10_windows-x64_bin.exe) and put in environment AND launch.properties unther the ..-overrride: the path C:\Program Files\Java\jdk-11.0.10\ ... Still the same problem. – patpin Feb 07 '21 at 14:29
  • in cmd-> java -version gives: ...java version "11.0.10" 2021-01-19 LTS Java(TM) SE Runtime Environment 18.9 (build 11.0.10+8-LTS-162) Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.10+8-LTS-162, mixed mode)... – patpin Feb 07 '21 at 14:36
  • my user environment gives: java version "11.0.10" 2021-01-19 LTS Java(TM) SE Runtime Environment 18.9 (build 11.0.10+8-LTS-162) Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.10+8-LTS-162, mixed mode) – patpin Feb 07 '21 at 14:37
  • my system variables: PATH: C:\Program Files\Common Files\Oracle\Java\javapath – patpin Feb 07 '21 at 14:39
  • Did you add bin? Like C:\Program Files\....\jdk-11.0.10\bin . If not then add it. – Md Kawser Habib Feb 07 '21 at 14:44
  • For user var JAVA_HOME or system var Path or at JAVA-HOME_OVERRIDE in launch.properties? – patpin Feb 07 '21 at 15:18
  • Is this problem still exist? Then run it at debug mode. Go and run support/ghidraDebug.bat file. Read and locate the log files. If possible send it, it helps to figure out the problem. – Md Kawser Habib Feb 08 '21 at 04:14
  • Where are the log files located? (And how to view?) – patpin Feb 08 '21 at 22:31
  • when you run at debugging mode, a cmd prompt will appear. You will find details like log location, jdk version there. – Md Kawser Habib Feb 09 '21 at 11:15
  • When I run Ghidradebug.bat I receive also the same error message saying: 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. Press any key to continue . . . – patpin Feb 09 '21 at 22:39
  • my version is: java version "11.0.10" 2021-01-19 LTS Java(TM) SE Runtime Environment 18.9 (build 11.0.10+8-LTS-162) Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.10+8-LTS-162, mixed mode) – patpin Feb 09 '21 at 22:51
0

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/

Lou
  • 277
  • 1
  • 5
  • 15