Modify

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#8279 closed defect (fixed)

No valid JVM found to run JOSM - Ubuntu 12.10

Reported by: omshivaprakash Owned by: bastiK
Priority: major Milestone:
Component: Ubuntu package Version:
Keywords: Cc:

Description

Hi,

I was getting the following error on Ubuntu 12.10 64bit.

$ josm-latest
No valid JVM found to run JOSM.

OpenJDK didn't work by default.

Installed - java-7-oracle

Fo fix it- edited /usr/bin/josm
Following line was changed

16 JAVA_CMDS="$JAVA_HOME/bin/java /usr/lib/jvm/java-7-sun/bin/java"

to look like

16 JAVA_CMDS="$JAVA_HOME/bin/java /usr/lib/jvm/java-7-oracle/bin/java"

Please fix this.

Change History (14)

comment:1 by omshivaprakash, 12 years ago

Owner: changed from bastiK to omshivaprakash

comment:2 by omshivaprakash, 12 years ago

Owner: changed from omshivaprakash to bastiK

comment:3 by omshivaprakash, 12 years ago

I had posted this ticket without logging in. Please assign this under my name. Thanks

comment:4 by Don-vip, 12 years ago

Reporter: changed from anonymous to omshivaprakash

comment:5 by bastiK, 12 years ago

Please make sure you have installed the most recent version of the josm-latest package. What is the output of $ dpkg --get-selections 'openjdk-*-jre' | grep install? Normally line 16 shouldn't even execute if you have openjdk installed.

comment:6 by omshivaprakash, 12 years ago

Yes, Its working Thank you. I had removed openjdk package. Installed it back to find it working. If someone is using oracle packages still we have to make the above recommended change to line 16.

comment:7 by skyper, 12 years ago

Do not know if oracle-java-7 is an official ubuntu package (in debian it is not).
Anyway I see following problems:

  1. the josm-package should depend on a java-jre
  2. the fallback path in the start script needs to be changed.
  3. at least the oracle-jre or the openjdk-jre package is broken as the alternative is not set right.

comment:8 by bastiK, 12 years ago

I did the following changes (in next release):

Index: tested/usr/bin/josm
===================================================================
--- tested/usr/bin/josm	(revision 6)
+++ tested/usr/bin/josm	(working copy)
@@ -13,7 +13,7 @@
 if dpkg --get-selections 'openjdk-*-jre' | grep install$ > /dev/null ; then
 	JAVA_CMDS="$JAVA_HOME/bin/java /usr/lib/jvm/java-7-openjdk-$ARCH/bin/java /usr/lib/jvm/java-6-openjdk/bin/java /usr/lib/jvm/java-6-openjdk-$ARCH/bin/java /usr/lib/jvm/java-6-sun/bin/java"
 else
-	JAVA_CMDS="$JAVA_HOME/bin/java /usr/lib/jvm/java-6-sun/bin/java"
+	JAVA_CMDS="$JAVA_HOME/bin/java /usr/lib/jvm/java-6-sun/bin/java /usr/lib/jvm/java-6-oracle/bin/java /usr/bin/java"
 fi
 
 JAVA_OPTS="-Djava.net.useSystemProxies=true $JAVA_OPTS"
Index: latest/usr/bin/josm-latest
===================================================================
--- latest/usr/bin/josm-latest	(revision 6)
+++ latest/usr/bin/josm-latest	(working copy)
@@ -13,7 +13,7 @@
 if dpkg --get-selections 'openjdk-*-jre' | grep install$ > /dev/null ; then
 	JAVA_CMDS="$JAVA_HOME/bin/java /usr/lib/jvm/java-7-openjdk-$ARCH/bin/java /usr/lib/jvm/java-6-openjdk/bin/java /usr/lib/jvm/java-6-openjdk-$ARCH/bin/java /usr/lib/jvm/java-6-sun/bin/java"
 else
-	JAVA_CMDS="$JAVA_HOME/bin/java /usr/lib/jvm/java-6-sun/bin/java"
+	JAVA_CMDS="$JAVA_HOME/bin/java /usr/lib/jvm/java-6-sun/bin/java /usr/lib/jvm/java-6-oracle/bin/java /usr/bin/java"
 fi
 
 JAVA_OPTS="-Djosm.home=$HOME/.josm-latest -Djava.net.useSystemProxies=true $JAVA_OPTS"

comment:9 by bastiK, 12 years ago

Resolution: fixed
Status: newclosed

comment:10 by skyper, 12 years ago

Resolution: fixed
Status: closedreopened

It should be java-7-oracle and not java-6.

Did anyone check if java-7-oracle calls the alternative routine to set proper links and reported it if not ?

comment:11 by skyper, 12 years ago

Does the package depend on an JRE ?

The debian package depends on openjdk-6-jre | openjdk-7-jre | sun-java6-jre to make sure that at least one JRE is installed.

in reply to:  11 comment:12 by anonymous, 12 years ago

Replying to skyper:

Does the package depend on an JRE ?

The debian package depends on openjdk-6-jre | openjdk-7-jre | sun-java6-jre to make sure that at least one JRE is installed.

Yes, it does.

in reply to:  10 ; comment:13 by skyper, 12 years ago

Resolution: fixed
Status: reopenedclosed

Replying to skyper:

It should be java-7-oracle and not java-6.

@bastiK
Do not know what you did but the posted diff and the changes are different (e.g. java-7-oracle).

in reply to:  13 comment:14 by bastiK, 12 years ago

Replying to skyper:

Replying to skyper:

It should be java-7-oracle and not java-6.

@bastiK
Do not know what you did but the posted diff and the changes are different (e.g. java-7-oracle).

Fixed it after reading your comment.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.