LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Need help finding installed programs! (https://www.linuxquestions.org/questions/linux-newbie-8/need-help-finding-installed-programs-82857/)

Bix 08-17-2003 01:17 PM

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!

js_530 08-17-2003 01:37 PM

In console, type "whereis jedit".

MasterC 08-17-2003 01:38 PM

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

Bix 08-17-2003 02:52 PM

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!

kamstrup 08-17-2003 04:11 PM

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

Bix 08-17-2003 11:59 PM

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?

Bix 08-18-2003 01:19 AM

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!

kamstrup 08-18-2003 07:03 AM

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'

Bix 08-18-2003 10:33 AM

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

Bix 08-18-2003 10:38 AM

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?

kamstrup 08-18-2003 10:49 AM

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? :D
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 :cool:

kamstrup 08-18-2003 12:36 PM

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 ;)

Bix 08-18-2003 02:12 PM

Hey, that worked!

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

What exactly does that do?

kamstrup 08-19-2003 05:32 AM

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 :study:

greetings, kamstrup

kamstrup 08-19-2003 05:40 AM

Eh... do you mean that jedit never asks for JAVA_HOME anymore?


All times are GMT -5. The time now is 04:12 PM.