PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Serveur - Sécurité et techniques > linux.debian.user > PATH to java in X11
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
linux.debian.user debian-user@lists.debian.org.

PATH to java in X11

Réponse
 
LinkBack Outils de la discussion
Vieux 30/09/2007, 18h39   #1
Henrique G. Abreu
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut PATH to java in X11

I've read many forums and threads in debian lists, but no solution worked to
me.

I've downloaded and unpacked to /opt the jdk1.5.0_12
I didn't used apt-get because I need this specific version.

Then, I need to set java environment variables globally
And include /opt/jdk1.5.0_12/bin to PATH

I inserted in /etc/bash.bashrc:
export PATH=$PATH:/opt/jdk1.5.0_12/bin

it works to all terminals, but don't to X11
for example: I can't start Azureus from menu link

Then I tried /etc/profile
but it didn't work either

thanks,

--
Henrique G. Abreu
henrique@turbokit.com.br

  Réponse avec citation
Vieux 30/09/2007, 18h40   #2
Nyizsnyik Ferenc
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: PATH to java in X11

On Sun, 30 Sep 2007 12:01:57 -0300
"Henrique G. Abreu" <hgabreu@gmail.com> wrote:

> I've read many forums and threads in debian lists, but no solution
> worked to me.
>
> I've downloaded and unpacked to /opt the jdk1.5.0_12
> I didn't used apt-get because I need this specific version.
>
> Then, I need to set java environment variables globally
> And include /opt/jdk1.5.0_12/bin to PATH
>
> I inserted in /etc/bash.bashrc:
> export PATH=$PATH:/opt/jdk1.5.0_12/bin
>
> it works to all terminals, but don't to X11
> for example: I can't start Azureus from menu link
>
> Then I tried /etc/profile
> but it didn't work either
>
> thanks,


I have the following line in /etc/environment:
JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun

I hope this s.

--
Szia:
Nyizsa.

----------------------------------------------------------------------
Find out how you can get spam free email.
http://www.bluebottle.com/tag/3


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 01/10/2007, 01h00   #3
Henrique G. Abreu
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: PATH to java in X11

I've created /etc/environment file like this
JAVA_HOME="/opt/jdk1.5.0_12"
export JAVA_HOME

PATH="$PATH:$JAVA_HOME/bin"
export PATH

The first time I started and logged into gdm, it failed.
Then I went to /etc/ and changed environment permissions.
Ok, I managed to log in, but PATH doesn't have /opt/jdk1.5.0_12/bin
I can't run a program that uses java from the menu link
Only if a open gnome-terminal with any user and call the program, it works.

I know its possible to make a "workaround" starting everything thought
terminal, but it's horrible!
Or go to "/usr/bin" and "ln -s ..." everything in JAVA_HOME/bin
but that is not the point, I MUST know how to set PATH variable because its
ridiculous. I no windows user.

Thanks,

On 9/30/07, Henrique G. Abreu <hgabreu@gmail.com> wrote:
>
> In my /etc there is no environment file
> Must I create one?
>
> Thanks
>
> On 9/30/07, Nyizsnyik Ferenc <nyizsa@bluebottle.com > wrote:
> >
> > On Sun, 30 Sep 2007 12:01:57 -0300
> > "Henrique G. Abreu" < hgabreu@gmail.com> wrote:
> >
> > > I've read many forums and threads in debian lists, but no solution
> > > worked to me.
> > >
> > > I've downloaded and unpacked to /opt the jdk1.5.0_12
> > > I didn't used apt-get because I need this specific version.
> > >
> > > Then, I need to set java environment variables globally
> > > And include /opt/jdk1.5.0_12/bin to PATH
> > >
> > > I inserted in /etc/bash.bashrc:
> > > export PATH=$PATH:/opt/jdk1.5.0_12/bin
> > >
> > > it works to all terminals, but don't to X11
> > > for example: I can't start Azureus from menu link
> > >
> > > Then I tried /etc/profile
> > > but it didn't work either
> > >
> > > thanks,

> >
> > I have the following line in /etc/environment:
> > JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun
> >
> > I hope this s.
> >
> > --
> > Szia:
> > Nyizsa.
> >
> > ----------------------------------------------------------------------
> > Find out how you can get spam free email.
> > http://www.bluebottle.com/tag/3
> >
> >
> > --
> > To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
> > with a subject of "unsubscribe". Trouble? Contact
> > listmaster@lists.debian.org
> >
> >

>
>
> --
> Henrique G. Abreu
> henrique@turbokit.com.br
>




--
Henrique G. Abreu
henrique@turbokit.com.br

  Réponse avec citation
Vieux 01/10/2007, 06h40   #4
Mumia W..
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: PATH to java in X11

On 09/30/2007 06:39 PM, Henrique G. Abreu wrote:
> I've created /etc/environment file like this
> JAVA_HOME="/opt/jdk1.5.0_12"
> export JAVA_HOME
>
> PATH="$PATH:$JAVA_HOME/bin"
> export PATH
>


Don't set the PATH this way. Specify the path list fully:

JAVA_HOME=/opt/jdk1.5.0_12
PATH=/usr/bin:/bin:/usr/bin/X11:/usr/games:$JAVA_HOME/bin
export PATH JAVA_HOME

Find out your current PATH before and add :$JAVA_HOME/bin to the end of it.

> The first time I started and logged into gdm, it failed.
> Then I went to /etc/ and changed environment permissions.
> Ok, I managed to log in, but PATH doesn't have /opt/jdk1.5.0_12/bin
> I can't run a program that uses java from the menu link
> Only if a open gnome-terminal with any user and call the program, it works.
>
> I know its possible to make a "workaround" starting everything thought
> terminal, but it's horrible!
> Or go to "/usr/bin" and "ln -s ..." everything in JAVA_HOME/bin
> but that is not the point, I MUST know how to set PATH variable because its
> ridiculous. I no windows user.
>
> Thanks,
>


Both my Sarge and Etch installations have /etc/environment. You might
not be running Debian at all.

If it's obvious that /etc/environment is being ignored, you can place
this line in ~/.bashrc

.. /etc/environment

Or you can just place the PATH and JAVA_HOME adjustments directly into
~/.bashrc.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 01/10/2007, 12h50   #5
Henrique G. Abreu
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: PATH to java in X11

I'm running Lenny.
I've inserted the lines to .bashrc as you sad
but it only worked to the terminal
it had no effect in gnome (eg: using Alt+F2)

I inserted 'source /etc/profile' directly into
/etc/X11/Xsession.d/55gnome-session_gnomerc

and it's working now!
I still want to know the correct way to do this.
if you someone knows, please send.

Thanks,

On 9/30/07, Mumia W.. <paduille.4061.mumia.w+nospam@earthlink.net> wrote:
>
> On 09/30/2007 06:39 PM, Henrique G. Abreu wrote:
> > I've created /etc/environment file like this
> > JAVA_HOME="/opt/jdk1.5.0_12"
> > export JAVA_HOME
> >
> > PATH="$PATH:$JAVA_HOME/bin"
> > export PATH
> >

>
> Don't set the PATH this way. Specify the path list fully:
>
> JAVA_HOME=/opt/jdk1.5.0_12
> PATH=/usr/bin:/bin:/usr/bin/X11:/usr/games:$JAVA_HOME/bin
> export PATH JAVA_HOME
>
> Find out your current PATH before and add :$JAVA_HOME/bin to the end of
> it.
>
> > The first time I started and logged into gdm, it failed.
> > Then I went to /etc/ and changed environment permissions.
> > Ok, I managed to log in, but PATH doesn't have /opt/jdk1.5.0_12/bin
> > I can't run a program that uses java from the menu link
> > Only if a open gnome-terminal with any user and call the program, it

> works.
> >
> > I know its possible to make a "workaround" starting everything thought
> > terminal, but it's horrible!
> > Or go to "/usr/bin" and "ln -s ..." everything in JAVA_HOME/bin
> > but that is not the point, I MUST know how to set PATH variable because

> its
> > ridiculous. I no windows user.
> >
> > Thanks,
> >

>
> Both my Sarge and Etch installations have /etc/environment. You might
> not be running Debian at all.
>
> If it's obvious that /etc/environment is being ignored, you can place
> this line in ~/.bashrc
>
> . /etc/environment
>
> Or you can just place the PATH and JAVA_HOME adjustments directly into
> ~/.bashrc.
>
>
> --
> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact
> listmaster@lists.debian.org
>
>



--
Henrique G. Abreu
henrique@turbokit.com.br

  Réponse avec citation
Vieux 02/10/2007, 01h20   #6
Raj Kiran Grandhi
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: PATH to java in X11

Henrique G. Abreu wrote:
> I'm running Lenny.
> I've inserted the lines to .bashrc as you sad
> but it only worked to the terminal
> it had no effect in gnome (eg: using Alt+F2)
>
> I inserted 'source /etc/profile' directly into
> /etc/X11/Xsession.d/55gnome-session_gnomerc
>
> and it's working now!
> I still want to know the correct way to do this.
> if you someone knows, please send.


Create a file .xsession in your home directory with the following:
===cut===
source ~/.bashrc
PATH=<your path>
exec gnome-session
===cut===

Log out of gnome and log back in specifying the session as "User
default" or some such thing in the gdm menu.

HTH,
rajkiran


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 02/10/2007, 18h30   #7
Liam O'Toole
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: PATH to java in X11

On Tue, 02 Oct 2007 05:46:01 +0530
Raj Kiran Grandhi <grajkiran@gmail.com> wrote:

> Henrique G. Abreu wrote:
> > I'm running Lenny.
> > I've inserted the lines to .bashrc as you sad
> > but it only worked to the terminal
> > it had no effect in gnome (eg: using Alt+F2)
> >
> > I inserted 'source /etc/profile' directly into
> > /etc/X11/Xsession.d/55gnome-session_gnomerc
> >
> > and it's working now!
> > I still want to know the correct way to do this.
> > if you someone knows, please send.

>
> Create a file .xsession in your home directory with the following:
> ===cut===
> source ~/.bashrc
> PATH=<your path>
> exec gnome-session
> ===cut===
>
> Log out of gnome and log back in specifying the session as "User
> default" or some such thing in the gdm menu.
>
> HTH,
> rajkiran
>
>


Another approach is to run .xsession in a login shell:

#!/bin/sh -l
exec gnome-session

Then your X session will inherit your full profile.

--

Liam


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 02/10/2007, 18h30   #8
Nyizsnyik Ferenc
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: PATH to java in X11

On Sun, 30 Sep 2007 20:39:28 -0300
"Henrique G. Abreu" <hgabreu@gmail.com> wrote:

> I've created /etc/environment file like this
> JAVA_HOME="/opt/jdk1.5.0_12"
> export JAVA_HOME


There's no need to export the variables defined in /etc/environment...

> PATH="$PATH:$JAVA_HOME/bin"
> export PATH


....nor is to set them in $PATH. Try creating an /etc/environment file
consisting only
JAVA_HOME=/opt/jdk1.5.0_12
It should work from then on.

> The first time I started and logged into gdm, it failed.
> Then I went to /etc/ and changed environment permissions.
> Ok, I managed to log in, but PATH doesn't have /opt/jdk1.5.0_12/bin
> I can't run a program that uses java from the menu link
> Only if a open gnome-terminal with any user and call the program, it
> works.


So when you type for example
hgabreu@debian:~$ java example
the program "example" starts? Then it works. Menu links can be edited
to include the full path to java like
Exec=java example
==>
Exec=/opt/jdk1.5.0_12/bin/java example

This has to be done only once.

> I know its possible to make a "workaround" starting everything thought
> terminal, but it's horrible!
> Or go to "/usr/bin" and "ln -s ..." everything in JAVA_HOME/bin
> but that is not the point, I MUST know how to set PATH variable
> because its ridiculous. I no windows user.
>
> Thanks,
>
> On 9/30/07, Henrique G. Abreu <hgabreu@gmail.com> wrote:
> >
> > In my /etc there is no environment file
> > Must I create one?
> >
> > Thanks
> >
> > On 9/30/07, Nyizsnyik Ferenc <nyizsa@bluebottle.com > wrote:
> > >
> > > On Sun, 30 Sep 2007 12:01:57 -0300
> > > "Henrique G. Abreu" < hgabreu@gmail.com> wrote:
> > >
> > > > I've read many forums and threads in debian lists, but no
> > > > solution worked to me.
> > > >
> > > > I've downloaded and unpacked to /opt the jdk1.5.0_12
> > > > I didn't used apt-get because I need this specific version.
> > > >
> > > > Then, I need to set java environment variables globally
> > > > And include /opt/jdk1.5.0_12/bin to PATH
> > > >
> > > > I inserted in /etc/bash.bashrc:
> > > > export PATH=$PATH:/opt/jdk1.5.0_12/bin
> > > >
> > > > it works to all terminals, but don't to X11
> > > > for example: I can't start Azureus from menu link
> > > >
> > > > Then I tried /etc/profile
> > > > but it didn't work either
> > > >
> > > > thanks,
> > >
> > > I have the following line in /etc/environment:
> > > JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun
> > >
> > > I hope this s.
> > >
> > > --
> > > Szia:
> > > Nyizsa.
> > >
> > > ----------------------------------------------------------------------
> > > Find out how you can get spam free email.
> > > http://www.bluebottle.com/tag/3
> > >
> > >
> > > --
> > > To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
> > > with a subject of "unsubscribe". Trouble? Contact
> > > listmaster@lists.debian.org
> > >
> > >

> >
> >
> > --
> > Henrique G. Abreu
> > henrique@turbokit.com.br
> >

>
>
>



--
Szia:
Nyizsa.

----------------------------------------------------------------------
Finally - A spam blocker that actually works.
http://www.bluebottle.com/tag/4


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 07h01.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,20364 seconds with 16 queries