How do I switch my Gradle from JRE to JDK - gradle

I have a program that requires gradle to run on jdk, but it keeps running on jre, and I do not know how to stop it. I have tried uninstalling jre, then both jre and jdk and reinstalling jdk only, but none of this has worked.

Unless you have configured it otherwise, Gradle will run all Java related tasks using the JVM that runs Gradle itself.
So the simpler approach is to make sure that your JAVA_HOME environment variable points to a JDK and start Gradle with it.

Related

Re-configuring java environmental variables for Hadoop ecosystem

I'm trying to install Scala IDE 4.7 in my Cloudera VM 5.10, Which is preconfigured with JDK 1.7, Spark 1.6 version respectively.
So, I have installed jdk version 1.8 in /opt/ location by uninstalling the default JDK located at /usr/java/jdk1.7 given by Cloudera. I added the java environment variables in .bash_profile. I was successfully able to install Scala IDE.
But now all the ecosystem of Hadoop are pointing towards old JDK 1.7 which I have uninstalled and throws an error when running. Can anyone let me know where I can config java variables for Hadoop ecosystem to work with new 1.8 JDK?
Here is the screen shot for reference
Step 1: Stop all the hadoop servers
Step 2: edit bigtop-utils file.
I've added the location of jdk 1.8.
Create a variable BIGTOP_MAJOR = 8.
the order of preference for it to choose the jdk is 6,7,8 and open JDK.
Step 3: save and reboot.

Gradle configuration on AndroidStudio 1.0X

I have downloaded a fresh copy of AndroidStudio 1.02 which comes with gradle 2.2.1. My JAVA_HOME points to a java 1.7 installation. In fact I do not even have java 1.4.
Yet I receive this error:
Error:Gradle 2.2.1 requires Java 6 or later to run. Your build is currently configured to use Java 4.
After searching for an hour on the internet and digging into AndroidStudio settings I cannot get it to work. I'll appreciate if someone can help.
Try File->Other Settings->Default Project Structure and set JDK Location to Java 6 or later

eclipse m2eclipse not working

the m2eclipse plugin is latest
the eclipse is the latest
the JDK is jdk7
the eclipse uses embedded maven version 3.xxx
I am keep getting this error “Error: Could not find or load main class org.codehaus.plexus.classworlds.launcher.Launcher”
It seems that there are some problems running the embedded Maven.
Try installing a fresh Maven version, then click Preferences , Maven, Installationsand set the directory where you have installed Maven.
my envirement
eclipse version : 4.3 kepler
maven version : 3.2.x
OS : windows 7
m2e plugin version : 1.5
the problem caused by combination of things, e.g mismatch between maven installation and setting.xml is one, but mainly the problem was:
solution for my problem was to run the eclipse in administrator mode.
you can run maven embedded (comes with eclipse) or external installation
just to make sure they are pointing to the right setting.xml file
somehow the embedded disappears sometimes, just restart eclipse it will appear again
finally I can confirm the latest m2e 1.5 or above supports maven 3.
Note: set JAVA_HOME is a must, because maven uses it to look up java which runs maven itself
set non-embeded maven installation location in the windows path is needed
set M2_HOME was NOT needed in my case, thus to get m2e working in eclipse or interact maven though command line, M2_HOME is not needed

Is there a way to build JRuby jars for lower Java versions on mac?

I am playing around with JRuby with mac, and have installed 1.7 JDK, and created a jar file to see how it would go on other macs, but since the current Mac's default Java is 1.6, the jars could not be opened.
I tried to install 1.6 JDK, but couldn't find a mac version for it, is it possible to build for Java 1.6, or am I doing something wrong?

Dependency of rJava on JDK

Why does rJava need the entire JDK installed instead of just the JRE ? (jvm.dll is available in the JRE)
Let us assume that the path to jvm.dll and all other environment variables are set correctly.
The rJava package does not need JDK. JRE is sufficient for all the functions. Previous errors were related to 64bit JDK only bundling 32bit JRE. And that was the problem.

Resources