LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-07-2013, 04:58 PM   #1
jpsimos
LQ Newbie
 
Registered: Nov 2013
Posts: 2

Rep: Reputation: Disabled
Why does terminal recognize 'java' right when I open it


When I open my terminal and type 'java -version' it shows me an old version of java.

So I downloaded the newest tar file of java, and set it up in my user directory, then I created a dynamic link to the 'java' file in the bin directory so right when I open my terminal I just type:

'./java -jar whatever.jar' and it works using the newest java.

MY QUESTION::::::How do I get rid of that initial java command that executes the old java?
 
Old 11-07-2013, 06:26 PM   #2
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
Well first of all, is there no updated official Java package for your distribution? Whenever possible, you should be using the official packages for your system which figure out all this for you, rather than trying to shoehorn software in from different sources.

If there is no newer Java package available, then you would first need to remove the old one. You say you are creating a dynamic link from the new Java to the one in /bin, but then you are executing Java as "./java", which means you are using the one in your local directory and not using the dynamic link.

What command are you using to create the link? Do you have sufficient privileges to do so?
 
Old 11-07-2013, 06:37 PM   #3
jpsimos
LQ Newbie
 
Registered: Nov 2013
Posts: 2

Original Poster
Rep: Reputation: Disabled
I have root. I did

lm -s /home/user/javanewversion/bin/java /home/user/java

So when my terminal opens I just type ./java

Please excuse me if my words are not correct as I am new to Linux
and I am learning new things every day.

I suppose I should of checked my deb packages
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Compile error in Terminal when I open Terminal in Ubuntu secman110 Linux - Software 2 10-29-2013 11:00 PM
[SOLVED] Change terminal for Thunar: 'Open Terminal Here' custom action.... andrew.46 Slackware 2 01-17-2012 05:46 AM
How to make konsole/terminal and emacs to recognize UTF-8 encoding? chandru.in Linux - Software 3 12-05-2007 10:40 AM
Mozilla won't recognize java plugin matazar42 Linux - Software 6 10-09-2005 11:03 AM
Cannot get Mozilla to recognize Java plugin DoThatPlan Linux - Software 2 09-09-2004 01:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration