File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Linux / UNIX and the fly likes Export automatically... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Export automatically..." Watch "Export automatically..." New topic
Author

Export automatically...

Timothy Sam
Ranch Hand

Joined: Sep 18, 2005
Posts: 746
Hi, in windows XP, you could set the environment variable PATH to remember the java bin directory... In windows 98 or later, you could use the set path command... In Linux, we use the export command. But I don't want to do this everytime I start my computer. Any idea on how to get around this problem? I have heard of editing the profile but couldn't find the right sources to teach me how to do that... Thanks!


SCJP 1.5
http://devpinoy.org/blogs/lamia/ - http://everypesocounts.com/
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42371
    
  64
You can put those kinds of definitions into your shell resource file. That's located in your home directory, and called something like ".tcshrc" (for the TCSH shell) or ".bashrc" (for the bash shell) or something similar. THose get executed automatically when a new shell starts.
If you put it into the ".profile" file (also in your home directory), it will be executed no matter what shell you use (if I remember correctly, haven't actaully tried that myself).


Ping & DNS - my free Android networking tools app
Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923

Depending on your linux-flavour, different files might be appropriate.
To investigate, which file is used for your linux, you could search where the path is set so long:

Top-candidates are /etc/profile and /etc/bash.bashrc
For these system-wide configuration-files you need to be root to write to them.
Insert

with your favourite editor.

You don't need the 'export' if it is called later in the file.

If different users of the machine need different settings, the situation is more complicated.


http://home.arcor.de/hirnstrom/bewerbung
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16160
    
  21

There's actually probably about 5 different places you can set profile info, depending on whether you want it known to a single user or all users, what shells you want affected, and so forth. It takes a little digging, but it's there.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Export automatically...