I recently downloaded and unziped openJdk 14
I then went to Eclipse > Java > Installed JREs and set the new jdk to be used
However after doing this I am no longer able to run my server (tomcat webapp)
I get an error from the jdk
as well as a generic error in eclipse saying it failed to start
When googling around it said to check my paths, but as far as i can tell they are correct:
(user variable)
%JAVA_HOME% = C:\JavaProgramFiles\jdk-14.0.2
(system & user variable)
Path %JAVA_HOME%\bin
Update 1 (FYI removed some path stuff as it doesnt seem relevant anymore):
thanks #KunLun
when cd'ing into the bin directory, javac -version worked. I reviewed environment variables again and this time added %JAVA_HOME%/bin to my User's Path variable (previously it was only in system path). So now javac -version works from any directory. However Eclipse still has same error when i start my server, though i do get this new msg in the console?
-Djava.endorsed.dirs=C:\JavaProgramFiles\tomcat\apache-tomcat-9.0.21\endorsed
is not supported. Endorsed standards and standalone APIs in modular
form will be supported via the concept of upgradeable modules.
The error message you quoted shows the cause of the problem. When the server instance was defined, the JVM launch arguments set for it included a reference to endorsed directories, an argument valid through Java 8, but not for Java 9 and newer. When you open the editor for your server instance from inside the Servers View, in the General Information section, Click on the Runtime Environment link and change the JRE explicitly to a Java 8 version. The server should then start up again.
I installed eclipse Neon.
But when i clicked on it to open, It is not opening.
I even have set the Path in Environment Variables.
Check that the JAVA_HOME environment variable is defined and %JAVA_HOME%\bin is in your system path. You can verify that by opening a command prompt, navigate to your eclipse folder and typing
java -version
If that commands returns the java version then everything should be fine.
Also, check if eclipse is using the right version of JDK/JRE. A 32 bit installation of eclipse would require a 32 bit JDK/JRE and vice versa for 64 bit editions. If that does not solve the issue check for messages in your Eclipse logs in your workspace:
${workspace}/.metadata/.log
You can also redirect any error messages to your console using the -consoleLog startup option.
Also check if there is any error initializing the java heap. If that's the case there should be at least one hs_err_pidXXXXX.log file generated in your eclipse folder.
On my Mac, I have Tomcat set up with solr 1.4 and solr 3.5 under /Library/Home in the following locations:
/Library/Tomcat/Home
where /Home is symlinked to /Library/Tomcat/apache-tomcat-6.0.32
/Library/Tomcat/Home/webapps/solr
with individual cores under
/Library/Tomcat/solr
Java is installed at
/Library/Java/Home
where /home is symlinked to /System/Library/Frameworks/JavaVM.framework/Home
I was having issues getting Solr 4.10.4 running in conjunction with that Tomcat, and I'm using Homebrew for my MySQL and PHP, so I thought I'd try using tomcat7 and solr4 with homewbrew. So this installed tomcat7 to
/usr/local/Cellar/tomcat7/7.0.61
The problem arises when I try to start Tomcat using
/usr/local/Cellar/tomcat7/7.0.61/libexec/bin/startup.sh
I get this error:
The BASEDIR environment variable is not defined This environment
variable is needed to run this program
I've been searching around, and I've seen various suggestions for fixing this, but I can 't get any to work. First, I'm not sure if this is supposed to be the same as CATALINA_HOME. I have JAVA_HOME and CATALINA_HOME set in my profile (I did change CATALINA_HOME to /usr/local/Cellar/tomcat7/7.0.61/libexec). I tried also setting BASEDIR in my profile to the same path as CATALINA_HOME, but still get the same error when I try to start tomcat.
I don't remember having to do this with my previous installation of Tomcat 6 and Solr 3. What does BASEDIR need to be set to, and where exactly do I set it?
Thanks.
I have just switched from Windows7 to Windows8.1 and I'm having trouble making Android Studio work now.
I have installed Android Studio and the JDK. First I tried it out with the latest versions Android Studio v.0.8.14 and JDK 1.8, but I could not get it to work. I then tried to use the versions I used on my previous Windows7, and installed Android Studio 0.8.2 and JDK 1.7.0_67, but I still can't get it to work.
The error I'm getting is:
Failed to load JVM DLL C:\Program Files\Java\jdk1.7.0_67\jre. If you
already have a 64-bit JDK installed, define JAVA_HOME variable in
Computer > System Properties > System Settings > Environment
Variables
I have set JAVA_HOME to my JDK path. I've tried to add \bin to that path, which didn't help. I've tried to add the JDK_HOME variable and set path to it, which didn't help either. I have also added "C:\Program Files\Java\jdk1.7.0_67\" to my PATH variable, which also didn't help. I tried editing studio.bat adding a string to point to my JDK folder, which also didn't work.
When I check my Java from console (cmd) I get the msg that it works find:
C:\Users\Igor>java -version java version "1.7.0_67" Java(TM) SE
Runtime Environment (build 1.7.0_67-b01) Java HotSpot(TM) 64-Bit
Server VM (build 24.65-b04, mixed mode)
Is Windows 8.1 the problem? Do I have to do something different on it?
Follow these steps:
Control Panel>>System>>Advanced(tab)>>Environment Variables>>System Variables
New
Variable name: _JAVA_OPTIONS
Variable value: -Xmx512M
I had exactly the similar problem:
failed to create JVM: error code -6
JVM PATH: .............
If you already have a 64-bit JDK installed, define a JAVA_HOME variable in Computer > System Properties > System Settings> Environment Variables.
Note: Do *not* choose a Java "JRE". You need to point to a full JDK, otherwise the IDE may fail to start. See http://tools.android.com/knownissues for more details.
Solution for me
I solved it with the help of Rahul Wadhai:
1) Go to C:\users\<your_user>.AndroidStudio2.2\ and open studio.vmoptions
2) change -Xmx and XX:MaxPermSize to lower values(then you have currently) and try to run AS again. ( If it does, then you can increase the values back. )
3) If it doesnt help, then try to rename .AndroidStudioX.X and then open AS again.
4) If it doesnt help, then you can search the problem within this android folder (using TextCrawler) , maybe somewhere in config files, there needed to change something. And then you can import settings from old folder.
You need to mention the JDK folder path in the Environment variable:
JAVA_HOME=C:\Program Files\Java\jdk1.7.0_51
Don't use build number coming in cmd.
To get this working, I put my JDK path in the Path variable as the first item. For some reason, when it's the last item it does not work.
You have to create a new variable in the System variable named JAVA_HOME = "C:\Program Files\Java\jdk1.7.0_67", in your PATH variable.
I tweaked the studio.vmoptions file when I followed a method in making it run faster and it stopped working showing the same JDK error.. I did most of the fix mentioned above and none worked for me. What worked for me though was deleting the studio.vmoptions file and everything was great again.
Go to your c:\ users\yourcomputername\ for example .AndroidStudio1.5
You will see config and system folder in it then delete the .AndroidStudio1.5 using it as example .
Go and relaunch the studio64
This is the solution that worked for me after many frustrated attempts:
go to the folder C:\program files\Android\Android Studio\bin
rename the file 'studio.64' to 'studio.bat' and run this file.
when i click on startup.bat , nothng happens.
Here is what I tried - I made sure that i installed the correct version of tomcat, for windows xp 32 bit. yet nothing happens.
I also created the JAVA_HOME and gave it the correct location of my sdk
here is the error i am getting
Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
At least one of these environment variable is needed to run this program
For Tomcat8 a minimum JRE7 is required, please add JRE_HOME in envrionment/system variable
put your tomcat/bin path in your class path and try to start server.