I'm trying to run an application but this is giving error

Java runtime not found. Please refer to the Ghidra Installation Guide's Troubleshooting section.

I already installed the jdk version 8 and 11

Also there is a search box on the top navigation bar of the forums that you can use to check if this was already discussed previously.

@[deleted] I removed your comment because it's flat out incorrect. The Help Center article is quite clear on how to set this up.

    • [deleted]

    • Edited

    DataDrake
    Really ? I don't think so.
    Content of /usr/share/defaults/etc/profile.d
    ...
    if [ -d /etc/profile.d ] ; then
    for script in /etc/profile.d/*.sh
    do
    source $script
    done
    unset script
    fi
    ...
    That is, if you create a folder profile.d and inide this folder a sh script, it gets executed
    Content of .profile in home folder (lines2, 3 are new):
    source /usr/share/defaults/etc/profile
    export JAVA_HOME=/opt/java/jdk-15.0.1
    export PATH=$PATH:$JAVA_HOME/bin

    Content of .bashrc in home folder:
    source ~/.profile

    There is no symbolic link of the java executable into /usr/bin
    And now the results:
    kibu@linus ~ $ which java
    /opt/java/jdk-15.0.1/bin/java
    kibu@linus ~ $ java -version
    openjdk version "15.0.1" 2020-10-20
    OpenJDK Runtime Environment (build 15.0.1+9-18)
    OpenJDK 64-Bit Server VM (build 15.0.1+9-18, mixed mode, sharing)
    kibu@linus ~ $ java -fullversion
    openjdk full version "15.0.1+9-18"
    kibu@linus ~ $ echo $JAVA_HOME
    /opt/java/jdk-15.0.1
    kibu@linus ~ $ echo $PATH
    /sbin:/bin:/usr/sbin:/usr/bin:/snap/bin:/opt/java/jdk-15.0.1/bin

    IMHO this looks good. And it works.
    And you can have as many java installations on your system as you like. This is the pro using JAVA_HOME and PATH
    The only thing what was wrong in my posting was a typo: '.' instead of '~'

    If the description in the wiki is sufficient, who so many users don't know how to setup java? Are they not smart enough to understand the wiki?

    Just for completeness:

      [deleted] I'm not asking for receipts. Your instructions started with a first step of running java -version which was never going to work since java isn't on the PATH by default. Even if it did, the version surely wouldn't be 15.0.1. This would have just confused someone even further. The rest of your instructions are 100% redundant when the Help Center article has already been linked.

      [deleted] If the description in the wiki is sufficient, who so many users don't know how to setup java? Are they not smart enough to understand the wiki?

      False assumption. They have to know that the Help Center exists to even start looking for answers there. I've been providing support for Solus for over 4 years now and an astounding number of people don't know it's there to begin with, despite it being linked to in several easy to find locations. If they come back with questions after reading the article, that's a sign it could be improved.

        • [deleted]

        DataDrake
        I don't want to start a new thread about how to install Java or how to write concise wiki entries. If you remove a posting from a user, and then you say this posting was incorrect with regards to its content then you have to expect answers. Other readers just see your answer but no my initial posting and thus cannot judge your claims.
        I've just read the wiki. The claim JAVA_HOME is best GUIs makes no sense. JAVA_HOME is just another way to find the java executable. Mostly applied by development tools. Linking the java executable into /usr/bin has no benefit, because you recommend to add the execualbe to the PATH.
        I wrote, the result of java -version will look like... I think it should be clear what I wanted to say.
        Even if my posting 100% was redundant, its not incorrect. Finally if you are in fear to get confused users: the wiki just recommends to set up a script for PATH and JAVA_HOME, but not how to achieve it. My suggestion was to extend .profile and .bashrc. That works for the current user. But what if the runtime should be avl. for all users? No answer in the wiki.

          [deleted] I don't want to start a new thread about how to install Java or how to write concise wiki entries.

          I'm not asking you to. If you have a problem with the Help Center article, you are welcome to file suggestions with the Github repo: https://github.com/getsolus/help-center-docs/issues

          [deleted] If you remove a posting from a user, and then you say this posting was incorrect with regards to its content then you have to expect answers. Other readers just see your answer but no my initial posting and thus cannot judge your claims.

          It's in everyone's best interest to remove bad instructions because it lessens confusion for future users. Beyond that, I'm a moderator. Removing content can be done at my discretion and I've already given you more than enough justification for this. I don't care what other people think: this is between you and me. And frankly you've derailed this thread enough and I'm getting tired of having to mop up after your bad advice here.

          [deleted] The claim JAVA_HOME is best GUIs makes no sense. JAVA_HOME is just another way to find the java executable.

          You're placing emphasis on the wrong part of the sentence. .desktop files are what they are referring to as the best option for GUIs. Most comonly, these applications are started with wrapper scripts which look for JAVA_HOME before trying to use a java from somewhere on PATH. It's a fair assumption.

          [deleted] Linking the java executable into /usr/bin has no benefit, because you recommend to add the execualbe to the PATH.

          Some programs explicitly look for /usr/bin/java. I agree that the PATH option should be higher in the list, but it's not unreasonable to symlink it in those cases.

          [deleted] I wrote, the result of java -version will look like... I think it should be clear what I wanted to say.
          Even if my posting 100% was redundant, its not incorrect.

          You used a numbered list and put those as the first steps. Of course I wouldn't think that you had intended something else, there's no other way to interpret that.

          [deleted] Finally if you are in fear to get confused users: the wiki just recommends to set up a script for PATH and JAVA_HOME, but not how to achieve it. My suggestion was to extend .profile and .bashrc. That works for the current user. But what if the runtime should be avl. for all users? No answer in the wiki.

          Again, if you have suggestions on improving the article, file a Github issue. Don't take it out on me in a thread where a user is trying to get help.

          At this point, you've completely derailed the conversation and forced me to derail it further to address all of this. I've given you options for what you can do at this point. Please stop responding to this thread until we hear back from the user. If you can't play nice with my perfectly reasonable requests, I have no problem issuing a ban.