I'm trying to learn servlets and JSP and would like to do this with Eclipse. When I click about in my current version, I get this info:
Eclipse IDE for Java Developers
Version: Helios Service Release 2
After searching a bit, it seems you cannot access these features with this version - you need "Eclipse IDE for Java EE Developers".
I've found a tutorial to install these plugings in your Eclipse installation, but I'm just getting a "failed"-message with no error message. After this, I decided to just download a new version (the EE one ofcourse) from the Eclipse website. The old installation is in c:\program files (x86)\eclipse, the new one in c:\program files (x86)\eclipse2.
The old one still works fine, but when I try to run the new one, I get this:
I have no clue what is wrong here. Am I doing something wrong? The only thing I want is to use Eclipse for JSP and Servlet Development (soon also EJB).
Thanks
Eclipse cannot find your JRE/JDK. Put the JRE/JDK folder in your PATH variable. My JDK is located here:
C:\Program Files\Java\jdk1.6.0_24
Should be a similar path for you. Add that to your PATH variable.
Have look at this tutorial to find out how.
Make sure a Java 6 JDK is installed. If it is then you should be able to type javac -v on a command prompt and see output like this 'javac 1.6.0_26'
Once you have this correctly eclipse should start with no issues.
Related
I've tried to install eclipse, but it's connected to the web page displaying the following error and I couldn't install it.
Unfortunately the Java version needed to run Eclipse Installer couldn't be found on your system. You need the following version or a higher version: Java 1.8.0 (64 Bit)
But my JDK version is Aleady 1.8.0_231(64Bit) and i completed setting up the environment variable.
(JAVA_HOME, and Path as System Variable)
Normally, using a different IDE like InteliJ(and it works normally on my computer) can be a solution but it's not possible because I have to submit it as a university assignment using eclipse.
What should I do?
This is my CMD Screenshot with checking JDK version
For anybody else (especially other Koreans) who may be struggling with Eclipse installation, turns out that the installer won't work if your account user name is in Korean. Specifically referring to the name that shows when you run your command prompt (as shown in the poster's image hyperlink) or at C:\Users -- if that name is in Korean, that it turns out that Eclipse installer will not work even if most recent Java is installed and paths are set correctly.
Easy way to get around this issue then is to create another local account with only English characters, and run the installer. Not sure why this happens, but it seems to be a common pattern I noticed with the most recent version of Eclipse installer.
It seems installing Eclipse on the account with English characters only still does not allow Eclipse to run, so I have to be signed into that account if I'm using the laptop. Maybe someone who can deal with this issue in a more efficient way can help us out?
I had a similar problem with AdoptOpenJDK 13 (The PATH and JAVA_HOME variables were correct).
The way I fixed that was simple. I created a eclipse.ini with the following contents in the same directory as the eclipse installer:
-vm
C:\Program Files\AdoptOpenJDK\jdk-13.0.0.33-hotspot\bin\javaw.exe
After doing that, the installer stopped complaining and I could install eclipse.
I am reading the JavaEE first cup, and I needs JDK8+, my version is older, so I upgraded my java, Configure the System Path, Install so on, I successfully run java -version in command prompt and it recognizes me that I've installed successfully, but when I start my NetBeans, It can't find Java! Not only that, but also my Eclipse neon can't find java! I check the eclipse.ini, maybe it just need a JDK 8. So I just wonder, how can I make my NetBeans found my Java?
I am new to netbeans,so I resort to configuration in eclipse.ini,I try to add “--ALL"like script,I doesn't work anyway!Thank to my patience,I notice some jdk1.8required
property,I am completely rush to my deadline,so I avoid to this problem,and got 1.8,but thanks a lot if you recommend eclipse IDE lastest version which can work well with JDK 10 without any modification in ini file!
I have installed the JDK jdk-8u144-windows-x64.exe in my computer in order to set up the tool IntelliJ to play with Scala, well before move forward to IntelliJ installation I ensured the JDK in my computer:
running path:
the running a java version:
Then, I installed the IntelliJ and the Scala plugins, so when finally I'M going to create my first project my laptop configuration is not mapping the JDK:
I tried to add the required environment just clicking on new and go thru the path where I installed the jdk but it doesn't go thru either.
Please, guys, I'm a bit nooby with Scala and IntelliJ, could you please guide me a bit. I tried to follow the instructions in this link but it is not going thru. https://www.scala-lang.org/documentation/getting-started-intellij-track/getting-started-with-scala-in-intellij.html
thanks
Make sure you have set environment variable JAVA_HOME to your java directory, IntelliJ detects JDK using that environment variable, or you can browse the path of java installation directory using "New" button beside jdk and select it.
I'm getting an error when trying to deploy an project to AppEngine using NetBeans.
I installed the plugin for NetBeans and I can run the application localy using appengine-java-sdk-1.9.0
When I try to deploy the program I get the following message:
Beginning interaction for module default...
0% Created staging directory at: 'C:\Users\Adi\AppData\Local\Temp\appcfg8079434123068806992.tmp'
5% Scanning for jsp files.
8% Compiling jsp files.
Error Details:
Mar 10, 2014 11:50:04 PM org.apache.jasper.JspC processFile
INFO: Built File: \guestbook.jsp
java.lang.RuntimeException: Cannot get the System Java Compiler. Please use a JDK, not a JRE.
Unable to update app: Cannot get the System Java Compiler. Please use a JDK, not a JRE.
Please see the logs [C:\Users\Adi\AppData\Local\Temp\appcfg5934545421821565182.log] for further information.
Thanks in advance.
First of all, this is my first answer in stackoverflow. Please consider, if I break some rules do not hesitate to tell me whats wrong or should be changed in future.
I run into same problem like Amir Rossert.
I've installed the Bundle "Netbeans 8 + JDK 8" (jdk-8u25-nb-8_0_1-windows-x64.exe from Oracle website). Additionally I have installed JDK 7 which I needed for different cases.
In Netbeans both JDKs were displayed under Tools/Java Platform Manager
JAVA SE
JDK 1.7
JDK 1.8 (Default)
So far so good.
When I changed JAVA_HOME to JDK 1.7 (C:\Program Files\Java\jdk1.7.0_72) I still get
java -version 1.8 !?
Why: Because Netbeans
has installed/copied 3 following files
java.exe
javaw.exe
javaws.exe
into C:\Windows\System32
linked them from directory C:\ProgramData\Oracle\Java\javapath and
after all set system variable Path (not PATH) = C:\ProgramData\Oracle\Java\javapath;
So whenever I wanted to use 1.7 it didn't work, instead 1.8 was used.
And when I wanted to deploy to Google Appengine the Exception occur: Caused by: java.lang.RuntimeException: Cannot get the System Java Compiler. Please use a JDK, not a JRE.
I solved it this way:
I deleted all three files mentioned above (java.exe, javaw.exe, javaws.exe)
I deleted the directory C:\ProgramData\Oracle\Java\javapath
I deleted the value C:\ProgramData\Oracle\Java\javapath; in system variable Path:
After that I tried out to deploy on Google Appengine again, this time successfully.
I just found an answer to this issue on:
appcfg can't find javac?1
Unfortunately it's more complicated than that. The very first entry in your path points to C:\Windows\system32. There is undoubtedly a java.exe living in that folder who's home is actually the JRE in C:\Program Files\Java\jre6. (You can test this yourself by running a small Java program):
System.out.println(System.getProperty("java.home"));
AppCfg uses the system property, java.home, of the currently running JVM to look for javac. Since you're running the java.exe which belongs to a JRE, it goes looking for the compiler there. Unfortunately, there's no real universally consistent or great way to automagically find the most appropriate java compiler. For our SDK, the rule is that you need to be running the JVM from your SDK, not from a JRE. As I mentioned in my previous post, this is most easily accomplished by just setting your Java SDK at the front of your path. For example,
set PATH=c:\Program Files\Java\jdk1.6.0\bin;%PATH%
We've certainly been mulling over ways to make this simpler and more bulletproof.
After editing the PATH I was able to deploy my app to the appengine with NetBeans.
I'm not familiar with NetBeans but I'll give you the steps to fix this on Eclipse hopefully you will find the equivalent ones:-
Right click on your project and choose properties
Go to java build path
Then under libraries tap, scroll to your selected JRE System Library
Edit the JRE to point to the directory where you installed you JDK.
If the above is already done, and you only see such errors when deploying, do the following
Edit the configuration settings file of your IDE and give it the following argument then restart it, in the Eclipse it is at the main directory where the Eclipse at and called eclipse.ini.
-vm
C:/Program Files/Java/jdk1.7.0_51/bin/javaw.exe
I recently installed the ubuntu 12.04 final beta
After installing the oracle jdk from the webupd8 ppa, launching eclipse failed complaining about a missing shared library.
Can't load library: /home/bob/.swt/lib/linux/x86_64/libswt-gtk-3740.so
I searched around, and found this quesion: Eclipse cannot load SWT libraries
As the OP recommended, I tried switching to open-jdk, and that worked wonderfully. The problem, however, is that I am working on a project that doesn't support openjdk.
I tried the second solution as well (the one by scott, which was just creating symbolic links to /usr/lib/jni/... in ~/.swt/lib/linux/x86_64/). Eclipse launches and everything is fine, but it still misses some libraries; this is what I get when i try to run my project:
Caused by: java.lang.UnsatisfiedLinkError: /tmp/libgdx/1352105074/libjogl_awt-linux64.so: libjawt.so: cannot open shared object file: No such file or directory
I know libjawt.so is somewhere on my computer:
$ locate libjawt.so
/usr/lib/jvm/java-6-openjdk-amd64/jre/lib/amd64/libjawt.so
/usr/lib/jvm/java-7-oracle/jre/lib/amd64/libjawt.so
But eclipse or java seems to think that libraries should be placed in ~/.swt/lib/linux/x86_64, isn't that weird?
Eclipse when launched defaults to its own internal JRE, as I understand. I recommend the following:
Modify your CLASSPATH variable to include the path to the desired libraries;
Set your JAVA_HOME to match the actual JAVA_HOME;
Setup Eclipse to launch from the desired JVM by customizing the eclipse.ini using this information: http://wiki.eclipse.org/FAQ_How_do_I_run_Eclipse%3F#eclipse.ini
Also, can you specify the -classpath option when Eclipse is launched?
Try downloading the latest version of Eclipse and running it. For some reason it works fine. I just ditched my older version of Eclipse. I hope this works for others!
Please note that there are two Java runtimes in play here. The one used to run Eclipse itself, and the one you want to run your code. They do not have to be the same!
I would suggest
Run Eclipse with a JDK that works
Download Oracle JDK manually and unzip it to a folder in your home directory
Tell Eclipse about this additional runtime (http://help.eclipse.org/mars/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Ftasks%2Ftask-add_new_jre.htm)
Configure your project to use that JVM instead. (http://help.eclipse.org/mars/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Ftasks%2Ftask-assign_default_jre.htm)
Now your own code is compiled against, and runs with Oracle Java.