LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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 05-14-2001, 12:17 PM   #1
mrl
Member
 
Registered: Apr 2001
Posts: 37

Rep: Reputation: 15
Cool


Hi Folks,





I am unsure if I have Java installed but am getting a lot of errors when I try and run anything Java dependent. I installed NS6 with the Sun Java option but it did not work so I went to Sun, did some reading got confussed and decided to download 30MB of Java 2 SDK thinking this may solve the problem, it did not.





The only language I know anything of (how to install) is perl so I am assuming that I am missing a Java interpreter or similair.





1. Do I need an 'interpreter' to allow Java enabled browsing and to use app's written in Java.





2. What files should I download or look for, the nearest I could find was the SDK from sun. I did try whereis java and have looked through the file system looking for anything that looks Javaish - nothing found





3. Is Java like Perl (scripts that are interpreted by a seperate 'program')




I am realy confussed about the anatomy of Java. I have read things about compilers and SDK's but have yet to find a site that explains what the thing is and which bits are needed to run program's (against writting them).




Any help appreciated,





Best wishes


Mike
 
Old 05-17-2001, 10:18 PM   #2
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 46
Talking

Java like Perl - nooooooooooooooooooo!! Java is *EVIL*

Sorry...

Java is not interpreted, at least not in the way Perl is. You write your java file and compile it into JavaByte code. This is in the form of a .class file. This byte code is code that can be executed on the Java Virtual Machine (JVM). When you run a Java program the 'java' command runs the JVM and loads your byte code into it. The JVM then runs the code. Its effectively like running an emulator, hence why large Java programs can be soooo slow and soooo memery hungry (Anyone played with Zend's PHP IDE? Scary stuff).

The way that I've got the SDK installed on my system was to download the files from sun. Run their installer and then symlink their 'java' command to /usr/loca/bin so its in everyones path.

If you only need to run Java programs then you can download the JRE (Java Runtime Environment) this is basically the 'java' command an associated bit 'n pieces. If you want to write program then you will need the SDK which includes 'javac' the java compiler and other goodies.

I know that the kernel has the ability to execute native java byte code but have never played with it, prehaps one of the code junkies in the programming forum can help.

So my setup is - JRE1.3 in /usr/local/jre1.3.0_02/ with a
symlink in /usr/local/bin pointing to /usr/loca/jre1.3.0_02/bin/java (which is inturn the begining of some scary scripting/symlinking Sun nightmare that I don't intend to touch!).

HTH

Jamie...
 
Old 05-20-2001, 10:17 AM   #3
mrl
Member
 
Registered: Apr 2001
Posts: 37

Original Poster
Rep: Reputation: 15
Hi Jamie,



Thanks for the reply and sorry for the delay in responding.



Ok on Java being Evil, you seem to be confirming my first impressions I installed the SDK as you suggested making a symlink to /usr/local/bin. Still no luck!



I tried to compile a Java program I found over at Linux.org (Omnibiff) but again no luck. And I still have no Java available to Browsers.



I think I am going to live with tis problem, I can always use my windows box to view Java web pages and there are plently of other programmes not written in Java.



I like perl better, download, install and use and none of the complications of Beans, Applets SDK's etc etc.



Just a point though, I think there may be a bug in the Red Hat 7.1 installer. I did ask it to install all the java stuff but this has not worked (it did in 7.0), I can not find any rpm's relating to Java on the CD's (Download images) so I'll ask the man in the Red Hat and post any answer back here (in case it is useful for anyone else).



Cheers again Jamie for the reply,



Best wishes

Mike







 
Old 05-23-2001, 02:34 PM   #4
#!
Member
 
Registered: May 2001
Distribution: RedHat, 'drake, suse, slack, gentoo, beehive, lfs...
Posts: 43

Rep: Reputation: 15
you might consider setting a JAVA_HOME environment variable, and set it to = the path to either 'java' or 'javac'. I can't remember which. Read the documentation and you should be able to figure it out. I used to have to set up a lot of that stuff, I don't so much anymore.
 
Old 05-23-2001, 03:19 PM   #5
mrl
Member
 
Registered: Apr 2001
Posts: 37

Original Poster
Rep: Reputation: 15
Hi there,

Thanks for the reply and the suggestion. I am a total newbie so could I press you for a fuller explaination about where I set the variable. Pressumably this is oin .rclocal?

Cheers again
Mike
 
  


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
Help installing java Lakota Mandriva 18 12-12-2004 03:02 AM
installing java kshatriyarules Programming 2 12-02-2004 12:04 PM
Installing Java VM? broham Arch 1 11-12-2004 03:33 AM
Installing Java tarballed Linux - Software 7 08-27-2004 10:23 PM
Installing Java? loganwva Linux - General 4 02-17-2002 04:44 AM


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