# Libreoffice 3.5.7_1 and Java VM



## laufdi (Jun 24, 2013)

I cannot select a _J_ava _VM_ in options. No matter what directory I select, I get an error. I have openjdk6 and -7 installed. What directory do I have to select or can I install any other _J_ava version?


----------



## ShelLuser (Jun 24, 2013)

laufdi said:
			
		

> What directory do I have to select or can I install any other _J_ava version?


Basically you need to specify the location of the JRE, the Runtime Environment. So if you have java/openjdk6 installed then it should be located right here: /usr/local/openjdk6/jre.

However, there's another thing to keep in mind. Where did you get LibreOffice from? Because the current port version (looking at editors/libreoffice) sits at 4.0.4 but you are still on 3.5.

If you installed LibreOffice manually then that could also be a possible cause for your current problems. If not then I'd suggest updating before trying this again, you could have ran into a hiccup somewhere.


----------



## laufdi (Jun 24, 2013)

ShelLuser said:
			
		

> /usr/local/openjdk6/jre.


That's exactly one of the paths it wouldn't accept.

_U_pdating is not possible:

```
libreoffice-4.0.4 is marked as broken: mergelibs causes runtime problems.
```


----------



## jozze (Jun 25, 2013)

See this segment of the /usr/ports/editors/libreoffice/Makefile:

```
.if ${PORT_OPTIONS:MMERGELIBS}
BROKEN=        mergelibs causes runtime problems
CONFIGURE_ARGS+=         --enable-mergelibs
.else
CONFIGURE_ARGS+=         --disable-mergelibs
```

So the Makefile states that the port will be marked as broken only if you have the MERGELIBS option enabled. I suggest you update your ports tree and remove that option:

```
# portsnap fetch update
# make -C /usr/ports/editors/libreoffice config
```
The port will not be marked as broken anymore, and you should be able to update it.

PS:
Further inspection of the Makefile suggests, you cannot use any of the MERGELIBS, GTK3 and DEBUG options.

The Makefile also suggests that LibreOffice works ONLY with Java 6, which may not be the default if you specify the JAVA_VENDOR variable (see lines 264 and 265). Your error probably stems from having both Java 6 and 7 installed on your computer. Make sure LibreOffice will know which one to use.


----------



## laufdi (Jun 25, 2013)

Thank you, now it works, and *J*ava works with 4.0.4.2*.*


----------

