LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-17-2022, 03:56 AM   #1
Peter_APIIT
Member
 
Registered: Dec 2006
Posts: 606

Rep: Reputation: 31
Problem Accessing javac with JAVA_HOME set


Dear executive,

I'm using Almalinux 9.

I had installed dnf install java-11-openjdk-devel and jre.
The file is located at /usr/lib/jvm/java-11/

And i set the JAVA_HOME using following method:
/etc/profile
export JAVA_HOME=“/usr/lib/jvm/java-11/”
export PATH=$PATH:$JAVA_HOME:$PATH

I can access the javac from cli but not from intellij.

The error message is Invalid Gradle JDK configuration found. There is no bin/javac in /usr/lib/jvm/java-openjdk

Please help me on this as i tried with many workaround but no solution found yet.

Thanks.
 
Old 09-18-2022, 09:45 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,753

Rep: Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983
Quote:
Originally Posted by Peter_APIIT View Post
Dear executive,
I'm using Almalinux 9.

I had installed dnf install java-11-openjdk-devel and jre. The file is located at /usr/lib/jvm/java-11/

And i set the JAVA_HOME using following method:
/etc/profile
export JAVA_HOME=“/usr/lib/jvm/java-11/”
export PATH=$PATH:$JAVA_HOME:$PATH

I can access the javac from cli but not from intellij. The error message is Invalid Gradle JDK configuration found. There is no bin/javac in /usr/lib/jvm/java-openjdk Please help me on this as i tried with many workaround but no solution found yet.
So did you go into the configuration panel in IntelliJ and set it to where your javac is located? Did you run "sudo find / -iname javac", to see where it installed things, or check the package you installed with "rpm -l"?

You say you've 'tried many workaround', but don't tell us what...here are some options: https://stackoverflow.com/questions/...guration-found

As you've been a member here for many years, you should be well familiar with how to find a file in Linux.
 
Old 11-09-2022, 02:21 AM   #3
Peter_APIIT
Member
 
Registered: Dec 2006
Posts: 606

Original Poster
Rep: Reputation: 31
This is the output of sudo find / -iname javac


find: ‘/proc/5048/task/5048/net’: Invalid argument
find: ‘/proc/5048/net’: Invalid argument
find: ‘/run/user/1000/doc’: Permission denied
find: ‘/run/user/1000/gvfs’: Permission denied
/etc/alternatives/javac
/var/lib/alternatives/javac
/var/lib/flatpak/app/com.jetbrains.IntelliJ-IDEA-Community/x86_64/stable/a0cca5c8dad69a028c43aaa395b32e820188ce8b537e8d626d4e08e10e827274/files/idea-IC/jbr/bin/javac
find: ‘/var/tmp/flatpak-cache-TCJ7U1/io.github.mimbrero.WhatsAppDesktop-0LNCV1’: Permission denied
/usr/bin/javac
/usr/lib/jvm/java-11-openjdk-11.0.17.0.8-2.el9_0.x86_64/bin/javac
/usr/share/bash-completion/completions/javac




Anyone please help me.
 
Old 11-10-2022, 07:41 AM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,753

Rep: Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983
Quote:
Originally Posted by Peter_APIIT View Post
This is the output of sudo find / -iname javac
Code:
find: ‘/proc/5048/task/5048/net’: Invalid argument
find: ‘/proc/5048/net’: Invalid argument
find: ‘/run/user/1000/doc’: Permission denied
find: ‘/run/user/1000/gvfs’: Permission denied
/etc/alternatives/javac
/var/lib/alternatives/javac
/var/lib/flatpak/app/com.jetbrains.IntelliJ-IDEA-Community/x86_64/stable/a0cca5c8dad69a028c43aaa395b32e820188ce8b537e8d626d4e08e10e827274/files/idea-IC/jbr/bin/javac
find: ‘/var/tmp/flatpak-cache-TCJ7U1/io.github.mimbrero.WhatsAppDesktop-0LNCV1’: Permission denied
/usr/bin/javac
/usr/lib/jvm/java-11-openjdk-11.0.17.0.8-2.el9_0.x86_64/bin/javac
/usr/share/bash-completion/completions/javac
Anyone please help me.
It's been almost two months now...you were given a command that tells you how to locate the file. You ran it, and it gave you locations. At this point, all you have to do is (again) tell intellij where it is...you do THAT by entering the path of the file you ALREADY FOUND.

And again, the thread looked up for you some time ago has several other solutions. You still don't bother telling us what the "many workarounds" you tried, so we have no idea what to tell you. Again, you've been here for several years...you need to ask a clear question and provide details.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem to set up the JAVA_HOME environment LinpusKelvin Linux - Newbie 3 06-14-2012 09:09 AM
Error: WARNING: the javac in your path is not from your $JAVA_HOME enviroment rgvinoth Linux - General 4 07-18-2007 11:29 AM
gcj javac instead of jdk javac rvindiola Linux - Newbie 2 03-29-2006 08:18 PM
How to set JAVA_HOME in REDHAT 9.0 Linux? tejpatil Linux - Newbie 5 05-23-2004 01:17 PM
JAVA_HOME path not set for all users tantric Linux - Software 5 03-29-2004 01:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration