You are not logged in.
Since the latest update to java-runtime-common it's no longer possible to override the default Java version using the JAVA_HOME environment variable. This means that to use a different version you have two options:
* Change the default version each time you want a different version, thus forcing every Java app to use that other version
* Edit the PATH such that the $JAVA_HOME/bin of the desired overriding Java environment is ahead of the wrapper, thus bypassing java-runtime-common altogether
Is there some "official" way to run with the non-default version while still using the ARchLinux official tool?
How should this be implemented in packages/AUR that require a specific version or versions of the JRE/JDK?
Thanks!
Offline
Sure, it's a command called archlinux-java
I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.
Offline
Sure, it's a command called archlinux-java
I already know about that command, it's nothing to do with running java in a particular version as a once-off thing. It's used to set the default java version, and to retrieve a list of versions.
To explain again, I need to have a default version set, but sometimes I want to run a different version. Previously I could just do something like this:
env JAVA_HOME=/usr/lib/jvm/java-7-oracle INSERT_COMMAND_HERE
Now that doesn't work anymore. How are we "officially" meant to be doing it now, as the only way I can see now is to just bypass the wrapper by inserting the new JAVA_HOME in the PATH before everything else.
Last edited by Phreakazoid (2014-10-13 02:05:24)
Offline
You may have more luck using jre/jdk from the AUR. I had some troubles with the javaws/web start icedtea-web. I couldn't use wpad and configured from firefox for proxy. It wanted explicit proxy definitions. Little things like that may break what you are trying to do. Temporarily setting the variable in front of the command is perfectly legit, but it may just be inconvenient to type that everytime. Although it doesn't help running things, eclipse would allow you to select your preferred java environment to work with while building. It probably had to do something similar to get that to work.
I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.
Offline
Thanks! I figured there was probably some way built in to the system since it calls the currently set JVM the "default", which implies it's what starts if you don't tell it to be something else, rather than "if you use the wrapper you can only use this one". Setting JAVA_HOME and PATH manually will have to do for now, unless there is a better way.
Offline
Forcing JAVA_HOME is unfortunately not supported any more because it did not play well with several build and run scripts. Java apps need a script to run their "java OPTS": these scripts usually allow you to define your own JAVA_HOME either by hande or with a "--with-jdkpath" like option. There is unfortunately no official means rather than these plain Java one.
You may have more luck using jre/jdk from the AUR.
People are very quick to switching to Java envs from AUR for (in my opinion) very bad reasons and I think this is one. You have absolutely no reason to quit using OpenJDK from extra!
Offline
The duhpendency change for java-common has fussed up jdk. Even though that would be easy to fix.
I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.
Offline
I just found the rhino package, so that my proxy settings don't confuse openjdk/jre.
I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.
Offline