WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: OpenJDK Path Issue?  (Read 3252 times)

Offline thane

  • Hero Member
  • *****
  • Posts: 697
OpenJDK Path Issue?
« on: March 12, 2019, 01:27:31 AM »
In TCL 10, I'm trying to code and compile Java programs using the Geany editor (geany.tcz) and OpenJDK JDK 8 (openjdk-8-jdk.tcz). In the installed JDK app various executables are in /usr/local/openjdk-8/bin/, but the app sets $PATH to /usr/local/openjdk-8/jre/bin/. Geany can't find e.g. javac (nor can it be executed in a terminal), presumably because no path to the executable exists.

Am I missing something in my setup, or is this a bug?

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14819
Re: OpenJDK Path Issue?
« Reply #1 on: March 12, 2019, 03:29:31 AM »
Does openjdk-8-jre need to be loaded as well?

Offline thane

  • Hero Member
  • *****
  • Posts: 697
Re: OpenJDK Path Issue?
« Reply #2 on: March 12, 2019, 03:40:07 AM »
I tried the JRE and JDK extensions together, and each separately. The same path was set in all cases (/usr/local/openjdk-8/jre/bin/).  Wondering if the JDK one is supposed to set /usr/local/openjdk-8/bin/ instead, or if I'm overlooking something in the setup. I don't mind looking dumb if I can get it to work!

Thane

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14819
Re: OpenJDK Path Issue?
« Reply #3 on: March 12, 2019, 03:42:20 AM »
You can manually alter the $PATH variable and see if that works?

Offline thane

  • Hero Member
  • *****
  • Posts: 697
Re: OpenJDK Path Issue?
« Reply #4 on: March 12, 2019, 04:58:51 AM »
I'll try that.

Offline thane

  • Hero Member
  • *****
  • Posts: 697
Re: OpenJDK Path Issue?
« Reply #5 on: March 12, 2019, 05:38:28 AM »
Yes, manually adding the /usr/local/openjdk-8/bin/ directory to PATH enabled javac from a terminal. Geany Java compile worked when I added the directory to PATH inside .profile and rebooted. So it looks like PATH is the issue someway. I'd still like input from people compiling Java with Open JDK (and/or JRE) to see if anyone had similar issues. It's been a while since the Open JDK extension was modified and it seems like this should have popped up pretty quickly.

Thanks for your help!

Offline Pats

  • Sr. Member
  • ****
  • Posts: 322
Re: OpenJDK Path Issue?
« Reply #6 on: March 12, 2019, 07:48:07 AM »
Quote
....Geany can't find e.g. javac (nor can it be executed in a terminal), presumably because no path to the executable exists.

Am I missing something in my setup, or is this a bug?

When I had this issue of Unable to locate javac and required files in JDK, I think, I had created some symlinks to a directory where my CLI editor was located or in home dire. If this helps !  .. :)

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11632
Re: OpenJDK Path Issue?
« Reply #7 on: March 12, 2019, 10:00:37 AM »
Hi thane
Something else may not be quite right. Take a look at the  .list  file:
http://tinycorelinux.net/10.x/x86/tcz/openjdk-8-jdk.tcz.list
About a third of the way down the path changes from  usr/local/openjdk-8/  to  usr/local/openjdk-8//jre/.  If the  .list  file is to be
believed, then it would appear that the  openjdk-8-jre  files were inadvertently included in the  openjdk-8-jdk  extension.