Modify

Opened 6 years ago

Closed 6 years ago

Last modified 6 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.

Attachments (0)

Change History (14)

comment:1 Changed 6 years ago by omshivaprakash

Owner: changed from bastiK to omshivaprakash

comment:2 Changed 6 years ago by omshivaprakash

Owner: changed from omshivaprakash to bastiK

comment:3 Changed 6 years ago by omshivaprakash

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

comment:4 Changed 6 years ago by Don-vip

Reporter: changed from anonymous to omshivaprakash

comment:5 Changed 6 years ago by bastiK

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 Changed 6 years ago by omshivaprakash

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 Changed 6 years ago by skyper

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 Changed 6 years ago by bastiK

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 Changed 6 years ago by bastiK

Resolution: fixed
Status: newclosed

comment:10 Changed 6 years ago by skyper

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 Changed 6 years ago by 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.

comment:12 in reply to:  11 Changed 6 years ago by anonymous

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.

comment:13 in reply to:  10 ; Changed 6 years ago by skyper

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).

comment:14 in reply to:  13 Changed 6 years ago by bastiK

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.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain bastiK.
as The resolution will be set.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.