I have a problem getting my SDK to intelliJ idea, i have downloaded Java SE newest edition, and put it in a seperate folder on my desktop. Whenever i chose it from intellij it just shows an error, Anybody knows a fix?
Check if you have there really the JDK home. If you click to the arrow on the left of your Java SE, it should look something like this (my jdk1.8.0_152 is the proper home folder of a JDK):
Also your Java SE\bin folder should contain the javac.exe file - notice the c at the end of the file name :)
I always download the full installer from Oracle (just search google for oracle java SE JDK download) and then run it. You may specify the destination folder where you want it to be installed, or you rather leave the default (I strongly recommend that).
Related
All my javadoc/method description information in Netbeans has suddenly dissapeared,
I'm not able to find any other cases on Stack Overflow of other people having this issue, but has anyone else maybe had this problem and figured it out, or know what's going on?
Thanks
I had this problem in Eclipse today so hopefully this helps out.
If you go to Tools - Java Platforms, what does it show? It should show your current Java JDK. If not:
1) Verify that you have a JDK installed under C:\Program Files\Java\ or C:\Program Files (x86)
2) If so, select Add Platform and add the JDK folder (e.g. jdk1.8.0_25) back to your platform list
3) If not, re-download and install the JDK and do step 2
Also, you should be able to right click on your Java Project, go to Libraries, and see the current JDK (Java Platform) that is being used.
everybody .I have been working on this issue for hours .The problem is that I cant debug my Database class.Once the break point hit this line
final Database db=new Database(this);
I am trying to step into my Database class But eclips says “Source not found” and shows a buton named “Changed attach source” .So I have searched an explanaition on internet .I have found one here
to be able to fix this error.I have to find the where JDK is but I couldnt under this location.Just JRE folder is available There is no JDK
C:\Program Files\Java
If you don't have JDK you should probably install it. Find it here
JDK/Java SDK = Java Development Kit/Java Software Development Kit - what you need to write programs that require Java or use libraries written in Java. For example, if you were to write your own word-processing tool in Java.
JRE = Java Runtime Environment - what you need to run programs/software that require Java or use libraries written in Java. For example, OpenOffice requires the Java Runtime Environment
JRE allows you to run Java, whereas JDK allows you to program with it.
You need to install JDK from here http://www.oracle.com/technetwork/java/javase/downloads/index.html. what you are having is JRE, but you dont have jdk. remove existing JRE and install JDK from the site.
What is the Fully qualified name for Database class ?
You need to install JDK from
http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
Then from JDK folder u will find file called src.zip which is include all the source code of the standard class's . But i believe
this will not show the source for this Database class since its not standard class if you can get the fully qualified name of the class you can find its jar from
http://www.findjar.com
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.
What's the best way to install the source code for the java libraries in Eclipse 3.6. I have attempted to follow the accepted answer here (How Do You Install the source for the java libraries in Eclipse?), but that didn't work. I have java ee sdk 6 installed. Also, where can I find the source code? There isn't a src.zip in my jdk. I downloaded jdk-6u23-fcs-src-b05-jrl-12_nov_2010 and ran the jar, but I'm not sure that's what I want either. I just want to be able to ctrl click on java classes to go to the selected class.
You must have a src.zip in the JDK install folder. Reinstall JDK if necessary. There's by the way no means of a JAR. Go to Java SE download page and press the leftmost one of the four big buttons to get the JDK. By the way, if you have the JDK installed already and run Eclipse 3.6 for the first time, it should automatically have included the source. Regardless, you may find this tutorial useful to restart clean. You can just skip the JSF part if that's not of your interest.
For the Java EE API you should grab the container's source code. You're probably using Tomcat as Eclipse automatically recognizes Glassfish source code. In case of Tomcat, you would need to download it separately from the Tomcat home page (it's the Source Code Distributions at the very bottom of the page). It's a ZIP file. Just open a random Java EE class, e.g. HttpServlet, press the Source button and point the ZIP file.
I'm looking for the JDK source code for Java 1.5 update 18 (on win XP). I don't want to install a JDK, I don't want the source code for the entire VM, just the source for the JDK libs, so that when I navigate to a Java class in Eclipse, it opens up the source code.
Is it possible to download just src.zip (or a zip that contains src.zip)? I don't want to install a new JDK/JRE just to get access to src.zip as I'm concerned that this will have undesirable side-effects such as modifying JAVA_HOME.
Thanks,
Don
The best place to go to get old versions of Java stuff is the Archive page. JDK 1.5.0_18 is there.
However, I don't think it is possible to download just the source code ZIP file. But hey, you could always get a friend to download the relevant JDK and copy it onto a CD/DVD for you.
EDIT re your concern about environment variables being changed.
Installing a JDK does not modify the JAVA_HOME environment variable or any other environment variable. Indeed, the JDK / JRE installation instructions explain that you need to update JAVA_HOME and PATH manually.
Sun have always been careful to allow you to install multiple JDK/JREs side-by-side. The only thing of that nature that gets changed by the installer is the version of Java used by your browser's Java plugin. And that only changes if you give the installer permission to change it!!
Below is the source for the latest JDK 1.5 but it seems difficult to find update 18 specifically, at least there is no obvious link :-(
http://java.sun.com/j2se/jrl_download.html
Only place I know of that you can get them is with the JDK. You can grab it here
Installing it shouldn't modify JAVA_HOME
http://download.java.net/jdk6/source/
Is that what you want?
Download the JDK for the release you want to use, and install it.
Then start Eclipse and go to Window -> Preferences -> Java -> Installed JREs, and Add the JDK you just installed, and ensure it has the checkmark!
That should do it (and it doesn't mess with the default java versions and JAVA_HOME and all)