0

I have followed the steps illustrated in this link http://www.tutorialspoint.com/java/java_packages.htm but after I restart my system(Ubuntu 12.10) the classpath unsets itself. How can I make it more permanent?

2 Answers2

1

You have to export the path variable for every start again. This could be done in the file .bashrc or .profile in the home folder.

By the way: this is not the right site for asking such questions, do it here: http://unix.stackexchange.com

Have a look:

0

You can edit your home directory's .bash_profile file and set the classpath there like:

export CLASSPATH=...
  • will not help when rebooting for that yiou have to make the export in the .bash-rc – Marvin Emil Brach Jul 03 '13 at 10:06
  • Sure it will. Of course it will affect only that particular user, but in most cases it would be enough. –  Jul 03 '13 at 10:29
  • how can I export it to .bash-rc? I didn't find any file like that when I checked home – Ralf Rafael Frix Jul 03 '13 at 10:43
  • @Kayaman: No it will not. The command export makes the variable only available for child processes. After a reboot of the system those variables are lost and have to get reinitialized. – Marvin Emil Brach Jul 03 '13 at 11:07
  • http://www.cyberciti.biz/faq/linux-unix-shell-export-command/ http://stackoverflow.com/questions/7328223/unix-export-command http://www.unix.com/unix-advanced-expert-users/45430-export-command.html – Marvin Emil Brach Jul 03 '13 at 11:16