Bug 81176 - Java Webstart does not work
Summary: Java Webstart does not work
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: java (show other bugs)
Version: 5.4-STABLE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-java (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-17 21:30 UTC by Ron de Bruijn
Modified: 2005-10-13 16:09 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ron de Bruijn 2005-05-17 21:30:06 UTC
Java Webstart is a system to let you run applications by clicking on 
them, they are automatically downloaded and executed. The problem is 
that in the above configuration is does not work.

Fix: 

Partial fix:

#!/bin/sh
   JAVA_HOME=/usr/local/jdk1.4.2
   JAVAWS_HOME=$JAVA_HOME/jre/javaws
   java -cp $JAVAWS_HOME/javaws.jar:$JAVAWS_HOME/javaws-l10n.jar \
      -Djnlpx.jvm=$JAVA_HOME/jre/bin/java -Djnlpx.home=$JAVAWS_HOME \
      -Djnlpx.deployment.system.home=$JAVAWS_HOME \
      -Djnlpx.deployment.user.home=/home/ron/.javaws \
      -Djnlpx.home=$JAVAWS_HOME \
      -Djava.security.policy=$JAVAWS_HOME/javaws.policy \
      com.sun.javaws.Main "$@"

But it still doesn't let you run javaws applications, because "the 
operating system is not supported"

Regards, Ron de Bruijn
How-To-Repeat: Execute	/usr/local/linux-sun-jdk1.4.2/jre/javaws/javaws
Comment 1 Panagiotis Astithas 2005-05-18 08:44:18 UTC
Ron de Bruijn wrote:
>>Number:         81176
>>Category:       java
>>Synopsis:       Java Webstart does not work
>>Confidential:   no
>>Severity:       critical
>>Priority:       high
>>Responsible:    freebsd-java
>>State:          open
>>Quarter:        
>>Keywords:       
>>Date-Required:
>>Class:          sw-bug
>>Submitter-Id:   current-users
>>Arrival-Date:   Tue May 17 20:30:06 GMT 2005
>>Closed-Date:
>>Last-Modified:
>>Originator:     Ron
>>Release:        FreeBSD 5.4-STABLE i386
>>Organization:
> 
> None
> 
>>Environment:
> 
> System: FreeBSD justok.thuisnetwerk.nl 5.4-STABLE FreeBSD 5.4-STABLE #0: Sat May 14 16:24:15 CEST 2005 ron@justok.thuisnetwerk.nl:/usr/obj/usr/src/sys/MYKERNEL i386
> 
> ron@justok$ java -version
> java version "1.4.2-p7"
> Java(TM) 2 Runtime Environment, Standard Edition (build 
> 1.4.2-p7-ron_16_may_2005_21_05)
> Java HotSpot(TM) Client VM (build 1.4.2-p7-ron_16_may_2005_21_05, mixed 
> mode)
> 
> 
>>Description:
> 
> Java Webstart is a system to let you run applications by clicking on 
> them, they are automatically downloaded and executed. The problem is 
> that in the above configuration is does not work. 
> 	
> 
>>How-To-Repeat:
> 
> Execute	/usr/local/linux-sun-jdk1.4.2/jre/javaws/javaws

You are executing the linux javaws here. Perhaps you meant to try the 
native one instead?

>>Fix:
> 
> 
> Partial fix:
> 
> #!/bin/sh
>    JAVA_HOME=/usr/local/jdk1.4.2
>    JAVAWS_HOME=$JAVA_HOME/jre/javaws
>    java -cp $JAVAWS_HOME/javaws.jar:$JAVAWS_HOME/javaws-l10n.jar \
>       -Djnlpx.jvm=$JAVA_HOME/jre/bin/java -Djnlpx.home=$JAVAWS_HOME \
>       -Djnlpx.deployment.system.home=$JAVAWS_HOME \
>       -Djnlpx.deployment.user.home=/home/ron/.javaws \
>       -Djnlpx.home=$JAVAWS_HOME \
>       -Djava.security.policy=$JAVAWS_HOME/javaws.policy \
>       com.sun.javaws.Main "$@"
> 
> But it still doesn't let you run javaws applications, because "the 
> operating system is not supported"
> 
> Regards, Ron de Bruijn
> 
>>Release-Note:
>>Audit-Trail:
>>Unformatted:
>
Comment 2 __tmh 2005-07-05 15:29:33 UTC
The script that executes javaws requires a simple patch to execute 
correctly:

--- /usr/local/jdk1.4.2/jre/javaws/javaws.orig    Sat Feb  5 12:15:25 2005
+++ /usr/local/jdk1.4.2/jre/javaws/javaws    Sat Feb  5 12:26:37 2005
@@ -13,8 +13,8 @@
 
 while [ -L "$PRG" ]; do
     ls=`/bin/ls -ld "$PRG"`
-    link=`/usr/bin/expr "$ls" : '.*-> \(.*\)$'`
-    if /usr/bin/expr "$link" : '/' > /dev/null; then
+    link=`/bin/expr "$ls" : '.*-> \(.*\)$'`
+    if /bin/expr "$link" : '\/' > /dev/null; then
        prg="$link"
     else
        prg="`/usr/bin/dirname $PRG`/$link"


Apply this patch to the native javaws script(see path) and it will work. 
Please email me with any questions.

Best regards,

Tom H.
Comment 3 Greg Lewis freebsd_committer freebsd_triage 2005-10-13 16:07:54 UTC
State Changed
From-To: open->closed

I've committted Thomas' fix.