Forum     

Go Back   Digit Technology Discussion Forum > Software > Open Source
Register FAQ Calendar Mark Forums Read

Open Source A place where you can talk to like-minded people about the fastest growing software movement today! Discuss anything and everything about Open Source software and Operating Systems.


Closed Thread
 
LinkBack Thread Tools Display Modes
Old 04-09-2007, 01:46 AM   #1 (permalink)
Broken In
 
mak1012's Avatar
 
Join Date: Mar 2005
Location: mumbai
Posts: 168
Default how add environment variable in ubuntu


hey fols i just installed J2ee sdk in my ubuntu but i'm not able to add the environment variable in.. i referenced the sun's site it says
Quote:
Setting Environment Variables

This section shows how to set environment variables on different operating systems and shells. Each example sets the variable MYVAR to the value widget. The term "local" means that the setting is in effect only for that terminal window. "Global" means that the variable is set for all terminal windows that are subsequently launched.

Unix Bourne and Korn Shells (sh, ksh)

Local:

$ MYVAR=widget
$ export MYVAR

Global:

Edit the $HOME/.profile script so that it includes the preceding assignment and export commands. You need to logout and login again for these changes to take effect.
but in ubuntu there is no $HOME/.profile... please tell me if there is ne other way to do this..
__________________
Every Body Says I'm Fine.
mak1012 is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 04-09-2007, 06:58 AM   #2 (permalink)
left this forum longback
 
praka123's Avatar
 
Join Date: Sep 2005
Location: -
Posts: 7,536
Default Re: how add environment variable in ubuntu

install from ubuntu's synaptic or apt.dont go for external max possible.
Code:
sudo apt-get install sun-java6-plugin sun-java6-jdk
^^ that's all.this will keep care of those env variables.
btwn ~/.profile is ~/.bash_profile or for the whole system /etc/profile will do.
in my debian root home dir i found a .profile file as below:
Code:
sid:~# cat .profile 
# ~/.profile: executed by Bourne-compatible login shells.

if [ -f ~/.bashrc ]; then
  . ~/.bashrc
fi
^^ so avoid the hassles always search and install from synaptic or from terminal apt-get.always update package db by pressing "reload" button in synaptic or via terminal "sudo apt-get update"
get ur /etc/apt/sources.list correct if some repos are commented by a "#".
refer more @ http://ubuntuguide.org
__________________
left this forum long back.Admin Can Delete this Account and posts Permanantly.Thank You
Get GNU/Linux - http://getgnulinux.org
praka123 is offline  
Old 04-09-2007, 02:42 PM   #3 (permalink)
Broken In
 
mak1012's Avatar
 
Join Date: Mar 2005
Location: mumbai
Posts: 168
Default Re: how add environment variable in ubuntu

Quote:
Originally Posted by praka123
install from ubuntu's synaptic or apt.dont go for external max possible.
[/url]
i was trying to install but it gives me this problem i once i was installing second life but i saw it was taking 50MB...i ended the programe in between. now how can i remove clear the uninstalled data from the catch memory?
Code:
 mukesh@mak:~$ sudo apt-get install sun-java6-plugin sun-java6-jdk
Password:
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: The package secondlife-install needs to be reinstalled, but I can't find an archive for it.
mukesh@mak:~$
__________________
Every Body Says I'm Fine.
mak1012 is offline  
Old 04-09-2007, 04:18 PM   #4 (permalink)
"The Gentleman"
 
vish786's Avatar
 
Join Date: Sep 2006
Posts: 1,434
Post Re: how add environment variable in ubuntu

Quote:
Originally Posted by mak1012
i was trying to install but it gives me this problem i once i was installing second life but i saw it was taking 50MB...i ended the programe in between. now how can i remove clear the uninstalled data from the catch memory?
Code:
 mukesh@mak:~$ sudo apt-get install sun-java6-plugin sun-java6-jdk
Password:
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: The package secondlife-install needs to be reinstalled, but I can't find an archive for it.
mukesh@mak:~$
u want to remove the package from cache folder. ??
if yes, search the package in /var/apt/cache
__________________
"The use of COBOL cripples the mind; its teaching should, therefore, be regarded as a criminal offense."
- Dijkstra
vish786 is offline  
Old 04-09-2007, 04:44 PM   #5 (permalink)
Commander in Chief
 
QwertyManiac's Avatar
 
Join Date: Jul 2005
Posts: 6,658
Default Re: how add environment variable in ubuntu

Remove Second Life and install JDK, and then install Second Life again.
__________________
Harsh J
www.harshj.com
QwertyManiac is offline  
Old 05-09-2007, 12:45 AM   #6 (permalink)
Broken In
 
mak1012's Avatar
 
Join Date: Mar 2005
Location: mumbai
Posts: 168
Default Re: how add environment variable in ubuntu

Quote:
Originally Posted by QwertyManiac
Remove Second Life and install JDK, and then install Second Life again.
i'm not able to uninstall secondlife when i open syanptic it gives me dis error
Code:
E: The package secondlife-install needs to be reinstalled, but I can't find an archive for it.
E: Internal error opening cache (1). Please report.
can i delete manually.
__________________
Every Body Says I'm Fine.
mak1012 is offline  
Old 05-09-2007, 12:51 AM   #7 (permalink)
left this forum longback
 
praka123's Avatar
 
Join Date: Sep 2005
Location: -
Posts: 7,536
Default Re: how add environment variable in ubuntu

"sudo dpkg --purge secondlife-install"
^ does it helps?
__________________
left this forum long back.Admin Can Delete this Account and posts Permanantly.Thank You
Get GNU/Linux - http://getgnulinux.org
praka123 is offline  
Old 05-09-2007, 11:22 AM   #8 (permalink)
Broken In
 
mak1012's Avatar
 
Join Date: Mar 2005
Location: mumbai
Posts: 168
Default Re: how add environment variable in ubuntu

Quote:
Originally Posted by praka123
"sudo dpkg --purge secondlife-install"
^ does it helps?
i think i'm in a bad situation.... when i used "sudo dpkg --purge secondlife-install"

it says
Code:
mukesh@mak:~$ sudo dpkg --purge secondlife-install
Password:
dpkg: error processing secondlife-install (--purge):
 Package is in a very bad inconsistent state - you should
 reinstall it before attempting a removal.
Errors were encountered while processing:
 secondlife-install
mukesh@mak:~$
and when i tryed to install it i'gating an error this error is coming after installing secondlife.

" The package might be currupted or you are not allowed to open the file. Check the permission of the file"

but i'm the owner of the file..
__________________
Every Body Says I'm Fine.
mak1012 is offline  
Old 05-09-2007, 11:50 PM   #9 (permalink)
left this forum longback
 
praka123's Avatar
 
Join Date: Sep 2005
Location: -
Posts: 7,536
Default Re: how add environment variable in ubuntu

Code:
sudo dpkg --force-remove-reinstreq  secondlife-install
^^try
also afterwards "sudo apt-get install -f" while internet is ON.


after trying all above commands just open System>admin>synaptic~status>to verify everything is OK.
__________________
left this forum long back.Admin Can Delete this Account and posts Permanantly.Thank You
Get GNU/Linux - http://getgnulinux.org
praka123 is offline  
Old 06-09-2007, 12:19 PM   #10 (permalink)
Broken In
 
mak1012's Avatar
 
Join Date: Mar 2005
Location: mumbai
Posts: 168
Default Re: how add environment variable in ubuntu

Quote:
Originally Posted by praka123
Code:
sudo dpkg --force-remove-reinstreq  secondlife-install
when i use above code i get this error
Code:
mukesh@mak:~$ sudo dpkg --force-remove-reinstreq  secondlife-install
dpkg: need an action option

Type dpkg --help for help about installing and deinstalling packages[*];
Use `dselect' or `aptitude' for user-friendly package management;
Type dpkg -Dhelp for a list of dpkg debug flag values;
Type dpkg --force-help for a list of forcing options;
Type dpkg-deb --help for help about manipulating *.deb files;
Type dpkg --license for copyright license and lack of warranty (GNU GPL)[*].

Options marked[*] produce a lot of output - pipe it through `less' or `more' !
__________________
Every Body Says I'm Fine.
mak1012 is offline  
Old 06-09-2007, 02:10 PM   #11 (permalink)
left this forum longback
 
praka123's Avatar
 
Join Date: Sep 2005
Location: -
Posts: 7,536
Post Re: how add environment variable in ubuntu

forgot to tell one line:
Code:
sudo dpkg --force-remove-reinstreq -P secondlife-install
^post if this works.else post the o/p from terminal for below command.
Code:
sudo apt-get install -f
do u have the file secondlife-install_1.xxxgetdeb1_i386.deb already with u?
__________________
left this forum long back.Admin Can Delete this Account and posts Permanantly.Thank You
Get GNU/Linux - http://getgnulinux.org
praka123 is offline  
Old 06-09-2007, 04:17 PM   #12 (permalink)
Broken In
 
mak1012's Avatar
 
Join Date: Mar 2005
Location: mumbai
Posts: 168
Default Re: how add environment variable in ubuntu

Quote:
Originally Posted by praka123
forgot to tell one line:
Code:
sudo dpkg --force-remove-reinstreq -P secondlife-install
do u have the file secondlife-install_1.xxxgetdeb1_i386.deb already with u?
thnx budy now i'll never try to install second life
yes i have.
__________________
Every Body Says I'm Fine.
mak1012 is offline  
Old 06-09-2007, 05:16 PM   #13 (permalink)
Commander in Chief
 
QwertyManiac's Avatar
 
Join Date: Jul 2005
Posts: 6,658
Default Re: how add environment variable in ubuntu

So did the Java finally get installed via APT?
__________________
Harsh J
www.harshj.com
QwertyManiac is offline  
Old 06-09-2007, 06:43 PM   #14 (permalink)
left this forum longback
 
praka123's Avatar
 
Join Date: Sep 2005
Location: -
Posts: 7,536
Default Re: how add environment variable in ubuntu

dont forget to do a "sudo apt-get update" or press "reload" in synaptic manager,before try install something.
__________________
left this forum long back.Admin Can Delete this Account and posts Permanantly.Thank You
Get GNU/Linux - http://getgnulinux.org
praka123 is offline  
Old 14-09-2007, 01:21 PM   #15 (permalink)
Broken In
 
mak1012's Avatar
 
Join Date: Mar 2005
Location: mumbai
Posts: 168
Default Re: how add environment variable in ubuntu

Quote:
Originally Posted by QwertyManiac
So did the Java finally get installed via APT?
yeah i succesfully installed the jdk i sun the one simple programe but i want to run servlets and jsp for that i downloaded j2ee sdk but i'm not able to start it in doc. it says to start enter this command in terminal

Code:
Add the install-dir/bin/ directory to the PATH environment variable.

Start the server by entering this command: asadmin start-domain domain1.
i added the directory path in bash.bashrc like this
Code:
export JAVA_HOME=/usr/java/jdk1.6.0_02
export JDK_HOME=$JAVA_HOME
export PATH=$PATH:$JAVA_HOME/bin
export PATH=$PATH:$/home/mukesh/SDK/bin
when i enter this command in terminal 'asadmin start-domain domain1' it give me a error
Code:
bash: asadmin: command not found
i'm not able to run servlet coz server is not running. please guide me...
__________________
Every Body Says I'm Fine.
mak1012 is offline  
Old 14-09-2007, 02:18 PM   #16 (permalink)
left this forum longback
 
praka123's Avatar
 
Join Date: Sep 2005
Location: -
Posts: 7,536
Default Re: how add environment variable in ubuntu

/home/mukesh/SDK/bin/asadmin start-domain domain1
^try?
make sure PATH is shown.also export works for current session only.
see the o/p of "echo $PATH" for ur set env variables appended.
else u have to edit ~/.bashrc or some similar file to have path set for each session.
if u had installed via synaptic,shud hav been much easier.
__________________
left this forum long back.Admin Can Delete this Account and posts Permanantly.Thank You
Get GNU/Linux - http://getgnulinux.org
praka123 is offline  
Old 17-09-2007, 01:43 AM   #17 (permalink)
Broken In
 
mak1012's Avatar
 
Join Date: Mar 2005
Location: mumbai
Posts: 168
Default Re: how add environment variable in ubuntu

i tryd those not working now i dont want to waste my time in configuring ne thing.... i'll do it after my exams....till then XP.
__________________
Every Body Says I'm Fine.
mak1012 is offline  
Old 17-09-2007, 05:48 PM   #18 (permalink)
In the matrix of linux
 
contactpraven2001's Avatar
 
Join Date: Aug 2005
Location: In my room with linux
Posts: 137
Default Re: how add environment variable in ubuntu

+1 to praka from my side ............
i have the same prob ..........
__________________
Be original use pclinuxos ........
www.pclinuxos.com
contactpraven2001 is offline  
Closed Thread

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Your Favorite Desktop Environment faraaz Open Source 30 12-07-2007 10:48 AM
3D desktop environment for Knoppix.... aditya.shevade Open Source 5 19-11-2006 08:40 PM
cant declare a string variable... geekgod Open Source 13 12-08-2006 06:09 AM
In Excel How to use cell ref as a variable abhijitroy Software Q&A 1 10-07-2006 02:32 PM

 
Latest Threads
- by Sujeet
- by soumya
- by clmlbx
- by Charan

Advertisement




All times are GMT +5.5. The time now is 12:59 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2