WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: openjdk: Path not updated?  (Read 2458 times)

Offline jur

  • Hero Member
  • *****
  • Posts: 863
    • cycling photo essays
openjdk: Path not updated?
« on: December 08, 2010, 04:59:50 PM »
When I load openjdk-7, and open a shell to run a java app, it fails because the path to the java binaries is not set, even though the startup script apparently does set it.

I click on the terminal icon to open aterm,  but the path does not include the path to the jre/bin folder. So I have to manually append it to the path.

What am I doing wrong?

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: openjdk: Path not updated?
« Reply #1 on: December 08, 2010, 05:49:07 PM »
PATH is set at login, so loading openjdk-7 after logging in will not change your path.
You would have to log out and log back in.
Openjdk should be loaded onboot.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: openjdk: Path not updated?
« Reply #2 on: December 08, 2010, 07:21:36 PM »
Adding etc/profile to backup seems to work for me, to avoid having to load the extension onboot. Only that this would make me end up with duplicate entries.
Hmm, there should be a better way...   :-\
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline jur

  • Hero Member
  • *****
  • Posts: 863
    • cycling photo essays
Re: openjdk: Path not updated?
« Reply #3 on: December 08, 2010, 07:40:40 PM »
Would it be a problem to add it to ~/.profile, even if that particular path does not exist until later?

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: openjdk: Path not updated?
« Reply #4 on: December 08, 2010, 07:54:26 PM »
Not that I would have noted anything within 24 days of uptime without loading java.
But now that I did load java, I have double entries.

EDIT: oops, only now I noted that you wrote '~/.profile'.
         All my references were to /etc/profile
« Last Edit: December 08, 2010, 07:57:44 PM by tinypoodle »
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: openjdk: Path not updated?
« Reply #5 on: December 08, 2010, 10:33:52 PM »
~/.profile is also only read at login.

The extension should be fixed to put a symboliclink in /usr/local/bin that points to the executable.
« Last Edit: December 08, 2010, 10:35:35 PM by gerald_clark »