Eclipse Galileo is not running over Java 1.8 machine - java

I have Eclipse Galileo version with Java 1.8 machine and it's not running.
I also have another newer version which is running well, but I need to use this exact version.
What can I do to fix it?
EDIT 1:
The Java version is 1.7 and not 1.8
Attached the message that I got:
**EDIT 2:
The main reason why I need this exact Eclipse version, it's because that I don't JBoss server in this list:
**

I can see you're using Java 7 to run your eclipse. Noted by this line in your configuration:
-vm C:\Program Files\Java\jdk1.7.0_71\bin\..\jre\bin\server\jvm.dll
^ this points to JDK 1.7
Change it to the place you have installed Java 8. Also, use absolute paths here, avoid using things like ...

Related

"Cannot run program "cmd"" java maven quote [duplicate]

I've a fresh install of netbean 11.1.
Now I'm trying to build a project but I get the following error output:
Cannot run program "cmd" (in directory "C:\projects\open"): Malformed
argument has embedded quote: "C:\Program
Files\NetBeans-11.1\netbeans\java\maven\bin\mvn.cmd"
cd C:\projects\open; "JAVA_HOME=C:\\Program Files\\Java\\jdk-11.0.5" cmd /c "\"\"C:\\Program Files\\NetBeans-11.1\\netbeans\\java\\maven\\bin\\mvn.cmd\" -DskipTests=true -Dmaven.ext.class.path=\"C:\\Program Files\\NetBeans-11.1\\netbeans\\java\\maven-nblib\\netbeans-eventspy.jar\" -Dfile.encoding=UTF-8 clean install\"" Cannot run program "cmd" (in directory "C:\projects\open"): Malformed argument has embedded quote: "C:\Program Files\NetBeans-11.1\netbeans\java\maven\bin\mvn.cmd" -DskipTests=true -Dmaven.ext.class.path="C:\Program Files\NetBeans-11.1\netbeans\java\maven-nblib\netbeans-eventspy.jar" -Dfile.encoding=UTF-8 clean install
I've build this project with netbeans 11.1 before but have a new pc.
and a fresh install, tho I'm sure there was no problem last time I tried to install everything.
Although this problem can be fixed by installing jdk1.8.0_221, but actually you don't need to downgrade your JDK. Just try these:
First exit netbeans IDE if it's open, then open netbeans configuration file from here: netbeans-Install-Dir/etc/netbeans.conf
(Note: for me netbeans-Install-Dir is C:\Program Files\NetBeans 8.2\etc)
Add the below arguments
-J-Djdk.lang.Process.allowAmbiguousCommands=true
to the beginning of the string that you find at this line:
netbeans_default_options="-J-client -J-Xss2m -J-Xms32m ......."
Sample screenshot as shown below:
4. Save the change and start your netbeans IDE.
I have checked the release notes for JDK 13.0.1 at https://www.oracle.com/technetwork/java/javase/13-0-1-relnotes-5592797.html#JDK-8221858
This behavior is a regression from a security fix for JDK-8221858 (not public). Follow the link for a full description. The fix is part of JDK 8u231, JDk 11.0.5, 13.0.1 etc.
To resolve this problem, append -J-Djdk.lang.Process.allowAmbiguousCommands=true to netbeans_default_options in <netbeans-dir>\etc\netbeans.conf.
I had this error with adopt8-hotspot (AdoptOpenJDK-1.8.0_232-b09) and sbt-0.13.X for an old project.
Problem solved after setting the environment variable in windows via
set JAVA_TOOL_OPTIONS=-Djdk.lang.Process.allowAmbiguousCommands=true
Did you by any chance install the latest critical update for java? jdk 1.7_241? I installed that today and was having the exact same problem. I downgraded my jdk version and it solved it completely.
EDIT: Apologies, I noticed you're using netbeans 11.1 so you probably have a later java version, in any case, you could try downgrading your java version to a previous release if you happened to update it today as the other version might have the same problem.
At the time that I'm writing, I had only JDK13 installed only on my machine. After unzipped my netbeans I've got the same problem with the internal maven of my netbeans 11.1.
Apparently netbeans 11.1 does not work properly with the JDK13. I just installed the JDK 8 and the problem now is solved, without any additional configuration or parameter change.
Nontheless, since I need the JDK13, I have both installed but my netbeans.conf file is pointing to JDK8. Later, you can define the new Java platform in netbeans project configuration.
I hope this might help.
Cheers!
just add -J-Djdk.lang.Process.allowAmbiguousCommands=true to netbeans_default_options in netbeans.conf
It seems to happen with all recently released jdk version (11.0.5 and 13.0.1 at least), even with the latest Netbeans 11.2vc1 (and witnessed on NB 11.1 too).
Downgrade your jdk to 11.0.4 or 13.0.0. It fixed the issue for me
The problem also occurs in version jdk-8u231. Fixing installing jdk-8u221 version
Apache NetBeans 11.1 does indeed not support JDK 13, that's what the upcoming Apache NetBeans 11.2 is for -- latest beta: bit.ly/apache-netbeans-11-2-beta-3
I had the same problem with oracle jdk 13.0.1 and netbeans 11.1, but it worked for me with openjdk 13.0.1 (https://jdk.java.net/13/).

Can I have two versions of the JDK on my computer?

I'm trying to set the IntelliJ IDEA JDK to version 1.8 (because it's the latest). When I navigate to System/Library/Frameworks/JavaVM.framework IntelliJ IDEA shows 1.6. When I type java -version it shows 1.8. I found that command under "Finding default JDK on OSX" https://www.java.com/en/download/help/version_manual.xml
I'm confused what versions of the JDK I have... and where they are located. Appreciate any help.
Yes, you can. You have JDK 1.6 and 1.8 installed on your computer. According to the Jetbrains website, all their products require Apple JDK 1.6 to be installed in order to run on Mac.
To make IntelliJ IDEA use JDK 1.8, you will need to edit /Applications/<Product>.app/Contents/Info.plist file and change JVMVersion from 1.6* to 1.8* :
<key>JVMVersion</key>
<string>1.8*</string>
To start off java will usually uninstall any version of the JDK when you get an update. Secondly if you want to check to see what version you are running I would go into what ever you are using to program and see what version you are compiling under (For example netbeans or eclipse). If it says 1.8 that is what you are running and same for 1.6. If this is really becoming a super big problem all you have to is uninstall java then re install and it should fix it.
You can have many different versions of Java on your system. In general Java depends on environment variables and the PATH environment variable. Some programs and tools look for tool specific environment variables to allow you to use a specific version of Java for that particular tool.
In the case of IntellJ the link that Eddie B posted in his comment explains how IntellJ determines which "installation" of Java it should use.

Requires Java 1.7, but running version 1.8.0_20. Shouldn't this work?

I am trying to install something via a jar file:
java -jar filename.jar'
I then get this error:
You need at least Java version 1.7 to run the installer.
However, you appear to be running version 1.8.0_20.
Please run the installer with the requisite Java version.
Aborting...
I am still kinda new to this, but doesn't this mean it needs Java 1.7 or higher and I am running 1.8?
How would I go about fixing this?
Java 8 has some bugs right now... Just install Java 7 alongside Java 8 and it should work
If you cant find a download, here's a link to the official Oracle site with at least Java SE 7:
http://www.oracle.com/technetwork/java/javase/archive-139210.html

Differenet java version than the one i set in environment variable

I'm new to all the Java stuff so sorry in advance if i ever mislead.
I have Eclipse Java EE IDE for Web Developers. Version: Juno Service Release 2 and i installed JBoss Hibernate tools extension. And while i was trying to add a configuration as in http://furqanlabs.blogspot.com/2013/01/hibernate-and-oracle-configuration.html this tutorial, i got such an error:
"Project DmisService has higher compiler option than running Eclipse. Hibernate plugins unable to load its classes. Please decrease the compiler option or run the Eclipse with higher JDK level."
So to know which JDK level my eclipse is using i did the followings:
i typed java -version on the comman line and i came up with the following result:
java version "1.8.0_11"
and when i checked my environment variable for JAVA_HOME it is C:\Program Files\Java\jdk1.6.0_30. and the Java Compiler setting is also 1.6 (as jre of the project as i understood) for my project.
So i came up with another questions -> Why command line gives me different java version than environment variable?
and my original question:
what exactly (i am also new the java terms) should i do to fix this problem?
Thank you very much for any suggestion.
edit: i also checked with eclipse: System.out.println(System.getProperty("java.version")); and it gives me 1.6.0_30
Adding Eclipse Java 8 Support helped me to resolve the issue!
Ref : Eclipse + Java 8 support?

Java program Not running in Eclipse [duplicate]

I'm trying to install Java to use Eclipse (I followed all instructions to install Java and Eclipse) but my Eclipse is not starting due to some bad configuration I guess. I can't figure out why it's not working for me.
Eclipse Installation:
Extracted Eclipse at C:\eclipse
Created a shortcut to my desktop having target C:\eclipse\eclipse.exe
When I try to run Eclipse with this shortcut, I see following Eclipse splash screen for a second and it disappears. Eclipse does not start at all.
JAVA Installation:
Installed JDK at C:\Program Files\Java\jdk1.7.0_10
Installed JRE at C:\Program Files\Java\jre7
Environment Variables Configuration:
JAVA_HOME = C:\Program Files\Java\jdk1.7.0_10
PATH = C:\Program Files\Java\jdk1.7.0_10\bin;
I tested my Java installation using the console and figured out this issue but I don't know how to fix it, and I guess this is causing Eclipse not to start.
Problem:
Go to Eclipse folder, locate eclipse.ini file, add following entry (before -vmargs if present):
-vm
C:\Program Files\Java\jdk1.7.0_10\bin\javaw.exe
Save file and execute eclipse.exe.
please try to execute java from
C:\Program Files\Java\jdk1.7.0_10\bin
i.e from the location where java is installed.
If it is successful, it means that the error lies somewhere in the classpath.
Also, this guy seems to have had the same problem as yours, check it out
Check that downloaded eclipse/JDK/JRE is compatible with your processor/OS architecture that is are they 32bit or 64bit?
Not able to run Appium {“message”:”A new session could not be created. (Original error: ‘java -version’ failed
I used Jdk 1.8 and JRE 1.8, Classpath is also set properly but I observed that Java command gives Error to initialization of VM (java/lang/NoClassDefFoundError: java/lang/Object)
Solution:
Uninstalled JRE and JDK completely
Installed JRE 1.8 then
Installed JDK 1.8
Set Classpath
check Java command works or not and its working
also able to execute the Appium program thru Eclipse Kepler Service Release 2 with JDK1.8 support
I had the same error in my case was when I needed to update jdk 7 to jdk 8, and my bad was just I installed jdk8 and I never installed jre8, only that, the error was solved immediately when I installed jre8.
Try placing the desired java directory in PATH before not needed java directories in your PATH.
I had the same issue on Windows 7 and I had to install both JDK and JRE and it's a success.
I faced the same problem,Eclipse splash screen for a second and it disappears.Then i noticed due to auto update of java there are two java version installed in my system. when i uninstalled one eclipse started working.
Thanks you..
I've observed this with STS and Eclipse and running java from CMD too on Windows 7/8/10 and following was my simple solution:
Actually, when I installed JDK 8 and STS/Eclipse it created one directory i.e. C:\ProgramData\Oracle\Java\javapath with the following files:
C:\ProgramData\Oracle\Java\javapath\java.exe
C:\ProgramData\Oracle\Java\javapath\javaw.exe
C:\ProgramData\Oracle\Java\javapath\javaws.exe
Along with that, it appended Path Environment variable of System with this location C:\ProgramData\Oracle\Java\javapath
I've just removed above entry from Path Environment variable of System and added the location of the actual JDK instead i.e. C:\Program Files\Java\jdk1.8.0_131\bin
Now that is not necessary to add that -vm option in eclipse.ini or
SpringToolSuite4.ini either.
I just spent about 1 hour to figure out possible solution for the same error.
So what I did under MS WIndows 7 is following
Uninstall all Java packages of all versions.
Download last packages Java SE or JRE for your 32 or 64 Windows and install it.
First install JRE and second is Java SE.
Open text editor and paste this code.
public class Hello {
public static void main(String[] args) {
System.out.println("test");
}
}
Save it like Hello.java
Go to Console and compile it like
javac Hello.java
Execute the code like
java Hello
Should be no error.
sometime you missed some file like I missed my one file rt.java
so better to check yours .........
C:\Program Files\Java\jdk1.8.0_112\jre\lib
0
I just spent about 1 hour to figure out possible solution for the
same error.
So what I did under MS WIndows 7 is following
Uninstall all Java packages of all versions.
Download last packages Java SE or JRE for your 32 or 64 Windows and
install it.
First install JRE and second is Java SE.
List item
Below error is thrown when there are multiple versions of jdk on your machine:
error occurred during initialization of VM
java/lang/NoClassDefFoundError: java/lang/Object
so for this Just use below:
set PATH="JDK bin path" in cmd
I had a same issuse, my file location was in D-drive, and then i shifted to the c-Drive and it works.

Categories

Resources