# Setting openjdk7 as default



## rivan (Nov 1, 2013)

Is there a way to set openjdk7 as default in FreeBSD?

I recently installed openjdk7 because one of programs I am using for drawing diagrams (/usr/ports/graphics/yed) kept crashing with openjdk6 and I was simply amazed by performance improvement in openjdk7. However I can see there is bunch of java libs I installed that put files under /usr/local/openjdk6, and I don't have any idea if it would be bad idea to simply include those folders in search path for newer java, so I was thinking to simply define some variable "use openjdk7" and to rebuild all java ports.

I know there were variables you could set in /etc/make.conf to use different version of program as default, but I couldn't find any mention of java in manual for make.conf.


----------



## ondra_knezour (Nov 1, 2013)

See /usr/ports/Mk/bsd.java.mk for some ideas how are suitable Java ports selected.

Also `make java-debug` in the port directory may give you some info about which version will be used based on the port requirements and JDKs installed on given system.


----------

