LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 03-15-2004, 12:59 PM   #1
medeluckiest
LQ Newbie
 
Registered: Mar 2004
Posts: 2

Rep: Reputation: 0
Question Java in Linux??


i m new in using Linux
i installed Linux RedHat (Shrike) 9 if not mistaken and i believe that Linux can compile and run java program....but unfortunately mine cannot..
probably that i din tick all the packages when i installed Linux....

but anyhow, i downloaded j2sdk1-1_3_1-linux-i386 and j2sdk1-1_3_1-linux-i386-rpm, and i install it using "chmod" command, i dunno whether it install or extract...but after it, there is a folder like "jdk1.3.1" inside the folder contain files like in Windows j2sdk\bin (eg: javac, javaw, and so on)

but the thing is that i stil cannot compile and run java program...in my linux
it is suppose to be same as in Windows...javac <filename>
but it said command not found...

izzit that i installed in a wrong folder...or need to configure something on the linux....
i installed it in /home/<myname> and /usr/local/ both places oso cannot run java program, dunno why????

pls help....any help or advices would be appreciated...thanx..a lot...
 
Old 03-15-2004, 01:22 PM   #2
moumouth34
LQ Newbie
 
Registered: Mar 2004
Posts: 5

Rep: Reputation: 0
same problem

I've got exactly the same problem when trying to install LimeWire... don't have any idea to help you except keeping searching for info and help...
 
Old 03-15-2004, 01:33 PM   #3
Komakino
Senior Member
 
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938

Rep: Reputation: 55
You both need to add the bin directory to the path.
There are two ways to do this...either:
1. Leave the jdk1.3.1 directory where it is and add that to the path:
Code:
PATH=$PATH:/path/to/jdk1.3.1/bin
export PATH
(put that in the .bashrc file in your home directory, obviously substituting /path/to with the actual location of the jdk)

or

2. Move the jdk1.3.1 folder to a better location (eg /usr/local/jdk1.3.1) using
Code:
mv jdk1.3.1 /usr/local/jdk1.3.1
and then add that to the path by adding the lines:
Code:
PATH=$PATH:/usr/local/jdk1.3.1/bin
export PATH
to the .bashrc file in your home directory.

By the way, jdk1.3.1 is well out of date, they're onto 1.5 beta now...

Last edited by Komakino; 03-15-2004 at 01:34 PM.
 
Old 03-15-2004, 07:57 PM   #4
raysr
Member
 
Registered: Nov 2003
Location: WA State
Distribution: Ubuntu 13.04
Posts: 727

Rep: Reputation: 31
java

I have MDK 9.2 and Mozilla 1.6. I have Java 1.4.2 packaged but when I install it, it doesn't show up in Mozilla. I have been running MDK for some time but am not real sharp on some of the language. i.e: symlink, path and so on. If you could point me in the right direction, could you "dumb" down the directions? Thanks in advance.
 
Old 03-16-2004, 01:17 PM   #5
Komakino
Senior Member
 
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938

Rep: Reputation: 55
If you want java applets to run then you need to download the plugin for mozilla. Simply run mozilla as root, visit a site that needs java (any yahoo game is good) and it should ask you if you want to install the plugin.
 
Old 03-17-2004, 12:59 AM   #6
raysr
Member
 
Registered: Nov 2003
Location: WA State
Distribution: Ubuntu 13.04
Posts: 727

Rep: Reputation: 31
OK, I did that and java is in "plugins". /usr/ local/mozilla/plugins. Now how do I insall it? It still doesn't show up under "about plugins".
 
Old 03-17-2004, 02:59 AM   #7
alucard2
LQ Newbie
 
Registered: Mar 2004
Location: Singapore
Posts: 13

Rep: Reputation: 0
Install JRE (download from Java website) and follow steps and Install. Create symbolic link to javaplugin.so in ur mozilla/plugins directory. Use the plugin under ns610-gcc32 directory it seems to work for Firebird 0.8 and Mozilla 1.6.
 
Old 03-17-2004, 11:31 AM   #8
raysr
Member
 
Registered: Nov 2003
Location: WA State
Distribution: Ubuntu 13.04
Posts: 727

Rep: Reputation: 31
Thanks for the reply. I downloaded from this site http://www.verostko.com/turing-f0.html and it went right in to my plugins file. "libjavaplugin_oji.so" has already been created. Also what is a "symbolic link?" I believe this version is 1.3.1 something. It has a "java2" folder in plugins. You'd think it was installed as the directions on the site said to download and close and restart and go back to the page where you were as if that was all. When I download the packed version of java I can't find it. It's 1.4.2

Last edited by raysr; 03-17-2004 at 10:02 PM.
 
Old 03-18-2004, 05:10 AM   #9
alucard2
LQ Newbie
 
Registered: Mar 2004
Location: Singapore
Posts: 13

Rep: Reputation: 0
It should be in /usr/java at least thats where it went by default
search for the plugin in that directory...
>> I believe this version is 1.3.1 something. It has a "java2"
Thats what I tried first and it dint work.

symbolic link == create shortcut (windoze lingo) check man ln
 
Old 03-18-2004, 12:29 PM   #10
dfowensby
Member
 
Registered: Dec 2003
Location: OceanView Virginia, gem of the Southern Shore
Distribution: MATE 15.04
Posts: 194
Blog Entries: 1

Rep: Reputation: 30
goto www.java.com
download the jre2 rpm as /home/user{plug in your homefile name} (that way you have a location file you can access if you "upgrade" your OS). then do:

su -
rpm -Uvh /home/user/j2re.....etc.rpm
cd /usr/lib/mozilla/plugins
ln -sf /usr/java/j2re1.4.2_03/plugin/i386/ns610-gcc32/libjavaplugin_oji.so libjavaplugin.so
exit
exit

then surf to the website www.goes.noaa.gov and click on a java-film icon to test.
luck -- O.
 
Old 03-19-2004, 01:07 AM   #11
raysr
Member
 
Registered: Nov 2003
Location: WA State
Distribution: Ubuntu 13.04
Posts: 727

Rep: Reputation: 31
Thanks for the reply. I used this to create a path for Opera and it worked for Opera but Mozilla still won't see it. /usr/local/mozilla/plugins/java2/lib/i386. So it's in the Moz file and Opera can see it why not Moz? When I install the packed version of java I don't know where it goes but Opera finds it but Moz doesn't. 1.4.2. Opera doesn't use this version as well as earlier ones such as 1.3.1 etc.

Last edited by raysr; 03-19-2004 at 01:11 AM.
 
Old 03-19-2004, 09:34 AM   #12
dfowensby
Member
 
Registered: Dec 2003
Location: OceanView Virginia, gem of the Southern Shore
Distribution: MATE 15.04
Posts: 194
Blog Entries: 1

Rep: Reputation: 30
could be one of several hiding places, depending on how you're set up. if you untarred it in root, check your .mozilla, or other places your mozilla-downloader could be using as default download location. it would be untarred to your /home/user file if you were using $:. ensure your nautilus prefs have "show hidden files" checked.
easier yet is to go to ftp://ftp.kernel.org/pub/linux/kernel/v2.6, download a real small sig or txt file into your moz downloader, and double-click on the file in the downloader. this will bring up the file in browser format in it's native location on you machine.
voila! you now know where everything is going.
luck --O.
 
Old 03-19-2004, 09:36 AM   #13
dfowensby
Member
 
Registered: Dec 2003
Location: OceanView Virginia, gem of the Southern Shore
Distribution: MATE 15.04
Posts: 194
Blog Entries: 1

Rep: Reputation: 30
oops. left out a step. after it comes up in browser format, double click it there as well.
sorry.
 
Old 03-19-2004, 11:57 PM   #14
raysr
Member
 
Registered: Nov 2003
Location: WA State
Distribution: Ubuntu 13.04
Posts: 727

Rep: Reputation: 31
Thanks again for the reply. What I'm trying to find out though is how to get Mozilla to recognize Java 2 that's installed in the right place and the libjavaplugin_oji.so is already in place. Opera recognizes it but not Mozilla.
 
Old 03-20-2004, 12:37 PM   #15
dfowensby
Member
 
Registered: Dec 2003
Location: OceanView Virginia, gem of the Southern Shore
Distribution: MATE 15.04
Posts: 194
Blog Entries: 1

Rep: Reputation: 30
i/m not really sure, but it may have something to do with linking "Upwards" into its own install directory/file. i know this will crash a compiler, and jack with a kernel if you do it.
compile the j2re into /usr/java and try linking it from there to your moz/plugins using the method i scripted out for you in the msg above. use libjavaplugin.so as i did, and retry from there.
it's a good bet for disaster to "subordinate" a source-file under a link's destination pointer.
linking "downwards" is dicey at best. hopefully this makes some sense....sort of like plugging an extension cord into itself.

luck --O.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
how to get java in linux bruce3au Linux - General 2 10-07-2005 01:23 PM
linux + java alaios Linux - Software 7 07-26-2005 05:27 PM
JAVA:(jwstric2) Problems in JAVA-LINUX nedian123 Programming 1 06-28-2004 05:12 PM
Java for linux Odin_of_Asgard Programming 8 04-12-2004 09:59 PM
Linux and Java + Java Media Framework (JMF) perry Programming 0 11-03-2003 11:08 AM

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

All times are GMT -5. The time now is 10:01 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration