Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.maint.java > #9037

maybe bug in java-wrappers.sh and/or jvm-list.sh

Path csiph.com!aioe.org!gothmog.csi.it!bofh.it!news.nic.it!robomod
From thus1 <thus1@t-online.de>
Newsgroups linux.debian.maint.java
Subject maybe bug in java-wrappers.sh and/or jvm-list.sh
Date Sun, 17 Apr 2016 17:40:02 +0200
Message-ID <roWXM-6zk-17@gated-at.bofh.it> (permalink)
X-Original-To debian-java@lists.debian.org
X-Mailbox-Line From debian-java-request@lists.debian.org Sun Apr 17 15:30:10 2016
Old-Return-Path <thus1@t-online.de>
X-Amavis-Spam-Status No, score=-0.897 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, FOURLA=0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, RP_MATCHES_RCVD=-0.996] autolearn=no autolearn_force=no
X-Policyd-Weight NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_BL_NJABL=-1.5 CL_IP_EQ_HELO_IP=-2 (check from: .t-online. - helo: .mailout07.t-online. - helo-domain: .t-online.) FROM/MX_MATCHES_HELO(DOMAIN)=-2; rate: -7
User-Agent KMail/4.11.2 (Linux/3.2.0-56-generic-pae; KDE/4.13.2; i686; ; )
MIME-Version 1.0
Content-Type multipart/alternative; boundary="nextPart9494956.kGsghnHq5X"
Content-Transfer-Encoding 7Bit
X-ID SUksraZTQhIVLv9ZVAbi91WALnTQ5M83w7CoEG1sZLRXKjqcS-12IUhjGXi8AbbQLy
X-Toi-Msgid 30dbfa2a-01f6-44cb-9b57-3631c2dd53cf
X-Mailing-List <debian-java@lists.debian.org> archive/latest/19364
List-ID <debian-java.lists.debian.org>
List-URL <https://lists.debian.org/debian-java/>
List-Archive https://lists.debian.org/msgid-search/4646350.9FDlOTZudP@t2
Approved robomod@news.nic.it
Lines 256
Organization linux.* mail to news gateway
Sender robomod@news.nic.it
X-Original-Date Sun, 17 Apr 2016 17:12:21 +0200
X-Original-Message-ID <4646350.9FDlOTZudP@t2>
Xref csiph.com linux.debian.maint.java:9037

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

Hello
 
I tried to start /usr/bin/freemind but it could not find a java:
  /usr/bin/freemind: Unable to find an appropriate java runtime. See java_wrappers(7) for help

 
The reason is th usage of '$__jvm_alt' in java-wrappers.sh 
which is delivered by  jvm-list.sh:59

I think that an empty string in  '$__jvm_alt' is handed wrong in java-wrappers.sh:125
Additionaly the variable shouldn't be empty.

in  jvm-list.sh:59
__jvm_alt=$(readlink /etc/alternatives/java|sed -n 's/\(\/usr\/lib\/jvm\/[^\/]*\)\/.*/\1/p')
 
> readlink /etc/alternatives/java
 /opt/Oracle_Java/jre1.8.0_45/bin/java
 
>__jvm_alt=$(readlink /etc/alternatives/java|sed -n 's/\(\/usr\/lib\/jvm\/[^\/]*\)\/.*/\1/p'); echo $__jvm_alt
here we get an empty string  
>
  
 
Without option -n in the sed command everything works well
 
> __jvm_alt=$(readlink /etc/alternatives/java|sed  's/\(\/usr\/lib\/jvm\/[^\/]*\)\/.*/\1/p');echo $__jvm_alt
 /opt/Oracle_Java/jre1.8.0_45/bin/java
>
  
why  do we need this sed-expression and why the option -n ?
 

thus

 
 
trace of  /usr/bin/freemind, java-wrappers.sh, jvm-list.sh
---------
> DEBUG=script DEBUG_WRAPPER=1 /usr/bin/freemind
 + [ -n script ]
+ DEBUG_WRAPPER=1
+ export DEBUG_WRAPPER
+ _source /etc/freemind/freemindrc
+ [ -f /etc/freemind/freemindrc ]
+ _source /home/thus/.freemind/freemindrc
+ [ -f /home/thus/.freemind/freemindrc ]
+ [ -r /usr/lib/java-wrappers/java-wrappers.sh ]
+ . /usr/lib/java-wrappers/java-wrappers.sh
+ . /usr/lib/java-wrappers/jvm-list.sh
+ dpkg --print-architecture
+ __arch=i386
+ __jvm_default=/usr/lib/jvm/default-java
+ __jvm_sun6=/usr/lib/jvm/java-6-sun /usr/lib/j2*1.6-sun
+ __jvm_sun=/usr/lib/jvm/java-6-sun /usr/lib/j2*1.6-sun
+ __jvm_sunmin5=/usr/lib/jvm/java-6-sun /usr/lib/j2*1.6-sun
+ __jvm_gcj2=/usr/lib/jvm/java-*-gcj-4.* 
+ __jvm_gcj5=/usr/lib/jvm/java-1.5*-gcj-4.* 
+ __jvm_openjdk6=/usr/lib/jvm/java-6-openjdk-i386 /usr/lib/jvm/java-6-openjdk
+ __jvm_openjdk7=/usr/lib/jvm/java-7-openjdk-i386 /usr/lib/jvm/java-7-openjdk
+ __jvm_gcj=/usr/lib/jvm/java-*-gcj-4.* 
+ __jvm_openjdk=/usr/lib/jvm/java-7-openjdk-i386 /usr/lib/jvm/java-7-openjdk /usr/lib/jvm/java-6-openjdk-i386 /usr/lib/jvm/java-6-openjdk
+ __jvm_java7=/usr/lib/jvm/java-7-openjdk-i386 /usr/lib/jvm/java-7-openjdk
+ __jvm_java6=/usr/lib/jvm/java-6-openjdk-i386 /usr/lib/jvm/java-6-openjdk /usr/lib/jvm/java-6-sun /usr/lib/j2*1.6-sun /usr/lib/jvm/java-7-openjdk-i386 /usr/lib/jvm/java-7-openjdk
+ __jvm_java5=/usr/lib/jvm/java-1.5*-gcj-4.*  /usr/lib/jvm/java-6-openjdk-i386 /usr/lib/jvm/java-6-openjdk /usr/lib/jvm/java-6-sun /usr/lib/j2*1.6-sun /usr/lib/jvm/java-7-openjdk-i386 /usr/lib/jvm/java-7-openjdk
+ __jvm_java2=/usr/lib/jvm/java-1.5*-gcj-4.*  /usr/lib/jvm/java-6-openjdk-i386 /usr/lib/jvm/java-6-openjdk /usr/lib/jvm/java-6-sun /usr/lib/j2*1.6-sun /usr/lib/jvm/java-7-openjdk-i386 /usr/lib/jvm/java-7-openjdk /usr/lib/jvm/java-*-gcj-4.* 
+ readlink /etc/alternatives/java
+ sed -n s/\(\/usr\/lib\/jvm\/[^\/]*\)\/.*/\1/p


This value is wrong (empty string) an it is handled wrong later
+ __jvm_alt= 


+ __jvm_all=/usr/lib/jvm/default-java /usr/lib/jvm/*
+ [  ]
+ JAVA_CLASSPATH=
+ [  ]
+ DESTDIR=
+ [  ]
+ JAVA_JARPATH=/usr/share/java
+ [  ]
+ require_java_runtime java6
+ find_java_runtime java6
+ [  ]
+ [  ]
+ [ -z  ]
+ DIRS=
+ test -z java6
+ test java6
+ echo java6
+ egrep -- [^0-9A-Za-z_]
+ eval echo -n $__jvm_java6
+ echo -n /usr/lib/jvm/java-6-openjdk-i386 /usr/lib/jvm/java-6-openjdk /usr/lib/jvm/java-6-sun /usr/lib/j2*1.6-sun /usr/lib/jvm/java-7-openjdk-i386 /usr/lib/jvm/java-7-openjdk
+ found_jvm=/usr/lib/jvm/java-6-openjdk-i386 /usr/lib/jvm/java-6-openjdk /usr/lib/jvm/java-6-sun /usr/lib/j2*1.6-sun /usr/lib/jvm/java-7-openjdk-i386 /usr/lib/jvm/java-7-openjdk
+ [ -z /usr/lib/jvm/java-6-openjdk-i386 /usr/lib/jvm/java-6-openjdk /usr/lib/jvm/java-6-sun /usr/lib/j2*1.6-sun /usr/lib/jvm/java-7-openjdk-i386 /usr/lib/jvm/java-7-openjdk ]
+ DIRS= /usr/lib/jvm/java-6-openjdk-i386 /usr/lib/jvm/java-6-openjdk /usr/lib/jvm/java-6-sun /usr/lib/j2*1.6-sun /usr/lib/jvm/java-7-openjdk-i386 /usr/lib/jvm/java-7-openjdk
+ shift
+ test 
+ [ -z  /usr/lib/jvm/java-6-openjdk-i386 /usr/lib/jvm/java-6-openjdk /usr/lib/jvm/java-6-sun /usr/lib/j2*1.6-sun /usr/lib/jvm/java-7-openjdk-i386 /usr/lib/jvm/java-7-openjdk ]
+ echo  /usr/lib/jvm/java-6-openjdk-i386 /usr/lib/jvm/java-6-openjdk /usr/lib/jvm/java-6-sun /usr/lib/j2*1.6-sun /usr/lib/jvm/java-7-openjdk-i386 /usr/lib/jvm/java-7-openjdk
+ fgrep 
+ JAVA_HOME=
+ java_debug Picking up the JVM designated by the alternatives system: 
+ [ 1 ]
+ echo [debug] /usr/bin/freemind: Picking up the JVM designated by the alternatives system: 
[debug] /usr/bin/freemind: Picking up the JVM designated by the alternatives system: 
+ java_debug   JAVA_HOME = ''
+ [ 1 ]
+ echo [debug] /usr/bin/freemind:   JAVA_HOME = ''
[debug] /usr/bin/freemind:   JAVA_HOME = ''
+ [  ]
+ java_warning No java runtime was found
+ echo [warning] /usr/bin/freemind: No java runtime was found
[warning] /usr/bin/freemind: No java runtime was found
+ return 1
+ java_fail Unable to find an appropriate java runtime. See java_wrappers(7) for help
+ echo [error] /usr/bin/freemind: Unable to find an appropriate java runtime. See java_wrappers(7) for help
[error] /usr/bin/freemind: Unable to find an appropriate java runtime. See java_wrappers(7) for help
+ exit 1
 

Back to linux.debian.maint.java | Previous | Next | Find similar | Unroll thread


Thread

maybe bug in java-wrappers.sh  and/or jvm-list.sh thus1 <thus1@t-online.de> - 2016-04-17 17:40 +0200

csiph-web