LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-17-2003, 01:17 PM   #1
Bix
LQ Newbie
 
Registered: Aug 2003
Distribution: RH9
Posts: 27

Rep: Reputation: 15
Question Need help finding installed programs!


Hi,

I just installed (rather, I *think* I installed) jEdit 4.1.1 from a downloaded .RPM file.

Trouble is, I don't know where to look to see if I actually installed the program, or how to launch it!

To tell the truth, I am an absolute newbie with lots of needs -- so please, if anyone can help, please try to do so in "plainspeak."

Thanks!
 
Old 08-17-2003, 01:37 PM   #2
js_530
Member
 
Registered: Jul 2003
Posts: 162

Rep: Reputation: Disabled
In console, type "whereis jedit".
 
Old 08-17-2003, 01:38 PM   #3
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
Hello! And welcome to LQ

You usually don't have to know where to file is to launch it, but you do have to know the name of the application to launch, so give a try at:
jedit

You just have to type that into a console (the little DOS looking screen) to see if it launches.



To find where something is installed though, just to answer your question, try using whereis:
whereis jedit

And with RPM's you also have tools to view what's installed, so as root try typing:
rpm -qa | grep jedit



Cool
 
Old 08-17-2003, 02:52 PM   #4
Bix
LQ Newbie
 
Registered: Aug 2003
Distribution: RH9
Posts: 27

Original Poster
Rep: Reputation: 15
Wow, within what, three hours, and I get such great advice?

Amazing, and thank you!

I typed jedit into "the little DOS looking screen" (thank you for the vernacular vocabulary!), and got the following:

---------------------------------------------------------------------------
Warning: JAVA_HOME environment variable not set.
/usr/bin/jedit: line 13: exec: java: not found
---------------------------------------------------------------------------

...which is a good sign, I take it to mean that I installed the program, but don't have Java installed?

When I type "rpm -qa | grep jedit" into the console, I get:

jedit-4.1-1

So now, how do I interpret that "java: not found" message? What do I need to install or activate?

Thanks for your continued help... I'll be an expert some day, and I will help others!
 
Old 08-17-2003, 04:11 PM   #5
kamstrup
Member
 
Registered: Aug 2003
Location: Aarhus, Denmark
Distribution: Slackware, Ubuntu
Posts: 122

Rep: Reputation: 15
Goto http://java.sun.com . Here you have two choices (after a bit of browsing):

Java 1.4.2 SDK (Software Development Kit): Contains everything you need + a great deal more. This contains java compilers and documentation as well (if you are interested in java programming take this one (~70 Mb though!)).

Java 1.4.2 RE (Runtime Environment): This is the essential files to run java programs (inculding java applets in your browser! (can't remember size but MUCH smaller than the SDK!)) You might have to search for this one to find it, but it shouldn't be that hard.

NOTE: You might want to download older versions of the java-stuff since these are smaller and for many/most purposes works as well as the newer ones.

Keep up the good hacking!
greetings, kamstrup
 
Old 08-17-2003, 11:59 PM   #6
Bix
LQ Newbie
 
Registered: Aug 2003
Distribution: RH9
Posts: 27

Original Poster
Rep: Reputation: 15
Hoo boy!

Well it looks as though I have installed Java 1.4.2 RE, but I am still getting the same error when I try to run jedit!

I downloaded j2re-1_4_2-linux-i586-rpm.bin, unpacked it, then installed the RPM as per Sun's instructions.

Yet I still get this error:

---------------------------------------------------------
Warning: JAVA_HOME environment variable not set.
/usr/bin/jedit: line 13: exec: java: not found
---------------------------------------------------------

Also, I did restart my machine just in case...

What could I be doing wrong?
 
Old 08-18-2003, 01:19 AM   #7
Bix
LQ Newbie
 
Registered: Aug 2003
Distribution: RH9
Posts: 27

Original Poster
Rep: Reputation: 15
Now, I just tried to install jedit using the .jar file they provide.

When I try to install using the following command:

--------------------------------------------------------
java -Djava.compiler=none -jar jedit41install.jar
--------------------------------------------------------

I get the following error:

--------------------------------------------------------
java: command not found
--------------------------------------------------------

Can anybody please help? I have installed both the RE *and* SDK at this point!
 
Old 08-18-2003, 07:03 AM   #8
kamstrup
Member
 
Registered: Aug 2003
Location: Aarhus, Denmark
Distribution: Slackware, Ubuntu
Posts: 122

Rep: Reputation: 15
Try to type 'ja' in a console, then hit <tab> this should complete your command or list the possible completions. If I do it it is like this

[kamstrup@imf kamstrup]$ ja
jade jar java javaapi javac javadoc
[kamstrup@imf kamstrup]$ ja

The reason why it doesn't work is probably that you don't have path set to your java program. Why the installer from sun doesn't allways set this up is puzzling to me. Don't dispear, it is not hard to do manually. Here's how it goes:

If you don't have a library in you home dir called bin, create one:
mkdir ~/bin
Now figure out where the java-stuff got put after installation, this can be done in several ways (my guess is that it is under /usr/java/j2re1.X.Y/bin) the java executables is the ones you are interested in and they are put in javas bin-dir.

If this isn't your java directory try: "whereis java". If this doesn't work become root (type 'su') and type 'updatedb' - this creates a database of all of your system (it might take a little while but its worth it). When its done type 'locate bin/java' (the updatedb creates the database for locate to use, locate will not work without it. If you install a bunch of other stuff you will have to updatedb again for locate to work properly).

Assuming you now know the location of your ''java' executable (or binary whatever!) become your normal user (if you're root type 'exit') now do:
ln -s /my/path/to/java/bin/java ~/bin/java
This creates a symbolic link in your ~/bin (~/ is your home dir) to the java file and if your system is set up as I would expect 'java' will now be found as a command by your terminal. Try 'ja' -<tab> again (you might have to close and reopen the console...).

Good luck! Please report back so others might learn from your experiences.
kamstrup

PS: .jar files are executed with 'java -jar myfile.jar', normal java progs (that'll be .class) with 'java myfile.class'
 
Old 08-18-2003, 10:33 AM   #9
Bix
LQ Newbie
 
Registered: Aug 2003
Distribution: RH9
Posts: 27

Original Poster
Rep: Reputation: 15
Well.....

I'm getting closer, at least!

I got as far as updatedb, and located my java (it was where you said it would be) -- but when I try to create the alias, this is what I get:

----------------------------------------------------------------------------
[rjgilbert@Midnight rjgilbert]$ ln -s /usr/java/j2sdk1.4.2/bin/java ~/bin/java
ln: creating symbolic link `/home/rjgilbert/bin/java' to `/usr/java/j2sdk1.4.2/bin/java': No such file or directory
----------------------------------------------------------------------------

Any advice or observations?

Thanks again!

Richard
 
Old 08-18-2003, 10:38 AM   #10
Bix
LQ Newbie
 
Registered: Aug 2003
Distribution: RH9
Posts: 27

Original Poster
Rep: Reputation: 15
OH!

I just realized what I had done wrong -- I had done mkdir ~/bin
as root, not as my main user.

Now it works!

BUT -- when I run jedit, even though the program opens, I get the following warning:

----------------------------------------------------------------------------
Warning: JAVA_HOME environment variable not set.
----------------------------------------------------------------------------

What does this mean?
 
Old 08-18-2003, 10:49 AM   #11
kamstrup
Member
 
Registered: Aug 2003
Location: Aarhus, Denmark
Distribution: Slackware, Ubuntu
Posts: 122

Rep: Reputation: 15
Strange...
Are you sure you created the ~/bin directory? Else try and go to your ~/bin and type 'ln -s /usr/java/j2sdk1.4.2/bin/java java'. If this doesn't work maybe I'm wrong about the ln -s command (embarasing!), then try 'man ln'... It is definitly 'ln -s something1 something2' the question is what is target and sourde...

Keep up the good spirit, you are very close!!!
greetings, kamstrup

PS: Not to be rude, but why not use Emacs instead of jEdit?
PPS: This turns out to be quite an exercise in linuxing, I bet you've learned a lot whether you get it to work or not.
PPS: - I think you are going to get it to work
 
Old 08-18-2003, 12:36 PM   #12
kamstrup
Member
 
Registered: Aug 2003
Location: Aarhus, Denmark
Distribution: Slackware, Ubuntu
Posts: 122

Rep: Reputation: 15
Hmmm... I don't really know... If it doesn't affect jEdit... Try in a console 'export JAVA_HOME=/usr/java/j2sdk1.4.2', and then start jEdit from that console. Maybe it should be /usr/java/j2sdk1.4.2/bin. Note that this 'export' command doesn't don't last very long. In another console or at another boot this variable will not be set again. I don't know how you (in any nice way that is (I could give you one of my ugly hacks but I'm to embarrased to publish this on the web, hehe)) set this JAVA_HOME to be set at every boot, so I think I better leave it at that
 
Old 08-18-2003, 02:12 PM   #13
Bix
LQ Newbie
 
Registered: Aug 2003
Distribution: RH9
Posts: 27

Original Poster
Rep: Reputation: 15
Hey, that worked!

I entered 'export JAVA_HOME=/usr/java/j2sdk1.4.2' and that did the trick.

What exactly does that do?
 
Old 08-19-2003, 05:32 AM   #14
kamstrup
Member
 
Registered: Aug 2003
Location: Aarhus, Denmark
Distribution: Slackware, Ubuntu
Posts: 122

Rep: Reputation: 15
Not that I'm sure about this but here is what I've always thought it to do. If you do 'export VARIABLE=/somedir/xyz' you tell the system that when running scripts and programs if the script asks for the contents of the variable VARIABLE (this is usually done by $VARIABLE, try typing 'echo $JAVA_HOME' and you will see how...) then return /somedir/xyz .

I hope this helps, feel free to ask

greetings, kamstrup
 
Old 08-19-2003, 05:40 AM   #15
kamstrup
Member
 
Registered: Aug 2003
Location: Aarhus, Denmark
Distribution: Slackware, Ubuntu
Posts: 122

Rep: Reputation: 15
Eh... do you mean that jedit never asks for JAVA_HOME anymore?
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
finding out where are programs installed (yum) johnty01 Fedora 3 09-22-2005 02:20 PM
finding space of programs TranceDude Linux - Software 5 08-27-2005 10:19 AM
Finding installed programs KDE steven2357 Red Hat 2 08-28-2004 06:55 PM
How to get newly installed programs in programs list Brosky Linux - Software 5 02-06-2004 03:45 PM
Finding installed programs? Nicksan Linux - General 6 06-26-2003 09:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:58 AM.

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