[Sussex] vvv confused with java - jre, sdk and jvm

John D. john at johnsemail.eclipse.co.uk
Mon Jul 25 00:01:13 UTC 2005


John D. wrote:
> Richie Jarvis wrote:
>> Steve Dobson wrote:
>>
>>> Richie, John
>>>
>>> On Sun, Jul 24, 2005 at 06:33:30PM +0100, Richie Jarvis wrote:
>>>  
>>>
>>>> The normal problem with java is that by default, Linux uses GCJ, 
>>>> which is compiled Java, and will not run most java apps out of the 
>>>> box.  The way to tell is to type at the prompt of the user you are 
>>>> trying to run the application under:
>>>>
>>>> java -version
>>>>
>>>> If it comes back with something referencing GCJ, then you know you 
>>>> are having this problem.  The trick to get it to use Sun's JRE 
>>>> (Java Runtime Environment) is to add $JAVA_HOME before everything 
>>>> else in the path:
>>>>
>>>> export PATH=$JAVA_HOME:$PATH
>>>>   
>>>
>>> John said earlier that he had set JAVA_HOME to /usr/lib/jvm/java
>>> If the Java system John install is the same as the JDK I install then
>>> you need to add set PATH thus:
>>>   export PATH=$JAVA_HOME/bin:$PATH
>>>
>>>  
>>>
>>>
>> Ah yes - oops - forgot that bit.... 
>
> Which creates more confusion on my part. Below is the output of what I 
> want to do, I'll comment in between some of the bits. So..........
>
>
> john at johnspc:~> ./lps-3.0.2/Server/tomcat-5.0.24/bin/startup.sh
> Using CATALINA_BASE:   /home/john/lps-3.0.2/Server/tomcat-5.0.24
> Using CATALINA_HOME:   /home/john/lps-3.0.2/Server/tomcat-5.0.24
> Using CATALINA_TMPDIR: /home/john/lps-3.0.2/Server/tomcat-5.0.24/temp
> Using JAVA_HOME:       /usr/lib/jvm/java
> <!----- above is the command that I need to issue, to start the tomcat 
> server, which as I understand it, is the server interface for the 
> Openlaszlo app, which apparently needs java SDK
> So using the command that Richie said to see what version I get gives 
> me-----!>
>
> john at johnspc:~> java -version
> java version "1.5.0_03"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_03-b07)
> Java HotSpot(TM) Client VM (build 1.5.0_03-b07, mixed mode, sharing)
> <!-----As you can see, my efforts of (apparently) deleting the 
> references to various versions of java that either I installed or 
> might have installed as default, and then re-installed the 1.5.0_03 
> seem to be seen by the user account - well I think thats what it's 
> telling me anyway. So then-----!>
>
> john at johnspc:~> export PATH=$JAVA_HOME/bin:$PATH
> john at johnspc:~> ./lps-3.0.2/Server/tomcat-5.0.24/bin/startup.sh
> Using CATALINA_BASE:   /home/john/lps-3.0.2/Server/tomcat-5.0.24
> Using CATALINA_HOME:   /home/john/lps-3.0.2/Server/tomcat-5.0.24
> Using CATALINA_TMPDIR: /home/john/lps-3.0.2/Server/tomcat-5.0.24/temp
> Using JAVA_HOME:       /usr/lib/jvm/java
> <!-----And no I didn't see the typo, well I think it's a typo i.e. the 
> missing space before the final "$PATH" part of the command, so after 
> re-reading the post, I did this and got the reply as below-----!>
>
> john at johnspc:~> export PATH=$JAVA_HOME/bin: $PATH
> bash: export: 
> `/usr/lib/jvm/java/bin:/usr/lib/jvm/java:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin': 
> not a valid identifier
> john at johnspc:~>
> <!-----Which still leaves me completely stumped, because if I look at 
> the "echo $JAVA_HOME" it's still telling me this-----!>
>
> john at johnspc:~> echo $JAVA_HOME
> /usr/lib/jvm/java
> john at johnspc:~>
>
>
>
>
> Regards
>
> John D.
>
> p.s. Oh and I'll see if I can get the install instructions from the 
> Openlaszlo site so that you can see what the references to the Tomcat 
> server are all about (cos I haven't got much of an idea).
So, the install instructions mentioned above for the Openlaszlo app, 
mentioned above are like this

[quote]
Unix/Linux
Download the OpenLaszlo Developer Kit for Unix/Linux.
After unzipping, untar the entire openlaszlo-3.0-unix.tar file from 
/usr/local/ (or wherever you want it to go; you can even use your home 
directory for safety).
DON'T just copy the tomcat folder into /usr/local. Keep the whole 
distribution together.
So if you put it in /usr/local, it would look something like this: 
/usr/local/lps-3.0/ ...with Server/tomcat-5.0.24 as a subdirectory of 
lps-3.0
Make sure that JAVA_HOME is set correctly.
See the instructions that come with the Java SDK.
You can check which version of java you have by typing: $ echo 
$JAVA_HOME and you should see something like: /usr/java/j2sdk1.4.0
Make sure that you have the version 5 or greater of the Macromedia Flash 
browser plugin installed.
Finally run the ./lps-3.0/Server/tomcat-5.0.24/bin/startup.sh script, 
and you're ready to go.
Now test your installation.
[/quote]

As you can see, it should be straight forward to run this, except that 
my JAVA_HOME is still showing incorrectly, and obviously I can't follow 
any instructions for the Java SDK as it doesn't come with any via YaST 
and it's package manager.

Plus, while I can see directories in /usr/lib

[quote]
john at johnspc:~> ls -l /usr/lib/java-1.*
/usr/lib/java-1.4.0:
total 0

/usr/lib/java-1.4.1:
total 0

/usr/lib/java-1.4.2:
total 0

/usr/lib/java-1.5.0:
total 0
john at johnspc:~
[/quote]

I certainly have no idea where they came from if I uninstalled 
everything that YaST listed as installed, and only re-installed the 
1.5.0 version, not to mention that they're empty (hell, I'm not even 
sure if I'm quoting/telling you the right stuff, especially as I just 
get "command not found" if I try either whereis or locate)!

regards

John D.




More information about the Sussex mailing list