Any plans on incorporating switching Java Versions?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Any plans on incorporating switching Java Versions?

Steve Holmes
Hi GVM gents!

I'm currently using a bash script to switch to Java 7 and groovy 2.x in one tab (Where I'm doing vertx work) and Java 6 and groovy 1.8.x in the other.  It would be the coolest thing in the world if I could use GVM to switch.

Thanks!

-Steve
Reply | Threaded
Open this post in threaded view
|

Re: Any plans on incorporating switching Java Versions?

marco.vermeulen
Administrator
GVM's core will never switch the JAVA_HOME for you, as this is beyond the scope of what GVM does. We are managing Groovy, Grails, Griffon, Gradle and vert.x in your bash environment.

Having said that, there is nothing stopping you from writing your own extension module using the gvm-extensions project:
https://github.com/gvmtool/gvm-extensions
Instructions and a reference implementation (gvm-switch) can be found in this project.
---
Marco Vermeulen
Reply | Threaded
Open this post in threaded view
|

Re: Any plans on incorporating switching Java Versions?

pledbrook
I've not been a fan of supporting Java because it's (mostly) a binary distribution. However, the new local install feature does have me wondering whether we could allow users to manually manage local Java installations. It's not as nice as full support, but users would at least get a consistent interface for switching between versions.

Thoughts?

Peter
Reply | Threaded
Open this post in threaded view
|

Re: Any plans on incorporating switching Java Versions?

marco.vermeulen
Administrator
The only problem being that local installations are only for versions, not entire candidates.

If we went down the route of installing local candidates (as opposed to versions), it would mean lots of rework as candidates are maintained on the serverside.

After all the previous discussions about platform dependent candidates that we've had I vote we keep it simple for now.
---
Marco Vermeulen
Reply | Threaded
Open this post in threaded view
|

Re: Any plans on incorporating switching Java Versions?

matthewadams
In reply to this post by Steve Holmes
The ability to switch JVMs based on GVM (or a new tool "JVM"?) would be AAAWWWWWESOOOOMMMMME.

It's such a pain to handle that, especially considering the recent Apple switch to Oracle for 1.7+.  I had to create my own scripts and it's just a total PITA.

-matthew