![]() ![]() Had to reduce the Gradle Version currently set at 1.8. I tried to change the Minimum SDK (I downloaded all back to 14) ‘/Users/anthonybonello/Documents/Programming/JUCE_coding/GuiApp4Android/Builds/AndroidStudio’ ‘.getPluginManager()Lorg/gradle/api/plugins/PluginManager ’. When I export a simple GUI App with the modifications as explained in the tutorial I am getting the following errors: It is a bit sloppy to leave two java/bin folders in your path so you should be advised to clean those up as a separate task.Īlso, put all above environment variables in the /etc/environment file for auto loading on system boot.I downloaded the latest Android Studio v2.1.2 Note that the change to the PATH variable put the new Java bin folders first so that they override any existing java/bins in the path. # export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH Set the Java environment variables using the following commands: Setup JAVA_HOME Variable # export JAVA_HOME=/opt/jdk1.8.0_51 Most of Java-based applications use environment variables to work. Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03, mixed mode) Java(TM) SE Runtime Environment (build 1.8.0_51-b16) # alternatives -set javac /opt/jdk1.8.0_51/bin/javacĬheck the installed version of Java using the following command. # alternatives -set jar /opt/jdk1.8.0_51/bin/jar # alternatives -install /usr/bin/javac javac /opt/jdk1.8.0_51/bin/javac 2 We also recommend to setup javac and jar commands path using alternatives: # alternatives -install /usr/bin/jar jar /opt/jdk1.8.0_51/bin/jar 2 # alternatives -install /usr/bin/java java /opt/jdk1.8.0_51/bin/java 2Īt this point Java 8 has been successfully installed on your system. The alternatives command is available in the chkconfig package. Install Java with alternativesĪfter extracting the archive file, use the alternatives command to install it. ![]() Note: If the above wget command doesn’t not work for you, watch this example video to download the Java source archive using the terminal. # wget -no-cookies -no-check-certificate -header "Cookie: gpw_e24=http://oraclelicense=accept-securebackup-cookie" "" Download latest Java archive Download latest Java SE Development Kit 8 release from its official download page or use following commands to download from the shell. You need to upgrade your Java version to Java 8. Right-click on your project and click on "Properties", in the window that appears, on the left side, click on "Java Compiler" and uncheck "Use compliance from execution environment on the Java Build Path", this allows you to choose in the the list "Compiler compilance level" the same version that you set in the previous step. In Eclipse, click on "Window > Preferences", and in the window that appears, on the left side, under "Java", click on "Installed JREs", click on "Add." and navigate to the folder that contains the JDK. If you're using Eclipse you should do 2 things: You must run and compile your application with the same version of Java. Then select Compiler and change the compliance level to 1.7. For example, in Eclipse go to menu Windows → Preferences, select Java, and expand it. This can be done in the preferences settings of your IDE. You will need to change your compiler compliance level back to 1.7 in your IDE. Given the nature of that applet, it looks like it could be compiled for use with Java 1.1 meaning you'd use javac -target 1.1. To use the options completely correctly requires the rt.jar of a JRE ( not JDK) of the target version. The smart way to fix that problem is to compile using the latest SDK and use the cross compilation options when compiling. Go to: /Applications/IntelliJ\ IDEA\ 15\ CE.app/Contents/istĪnd replace the JVM version with: JVMVersion Make sure the JDK home path is set to 1.8.Īnother approach which might help is by instructing IntelliJ IDEA which JDK version to start up with. Go to menu File* → Project Structure → SDKs.Go to Maven Settings → Maven → Runner.Go to Maven Settings → Maven → Importing.To solve this, it's always better to have the JDK and JRE pointed to the same version. The reported number is the required number, not the number you are using. ![]() Thus, the 'major.minor version 52.0' error is possibly because the jar was compiled in JDK 1.8, but you are trying to run it using a JDK 1.7 environment. The error regarding the unsupported major.minor version is because during compile time you are using a higher JDK and a lower JDK during runtime. ![]()
0 Comments
Leave a Reply. |