I am trying to set up Eclipse that I follow below steps and I guess need some help :)
Firstly, I want to say that I've download JRE from here:
http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html and set up jre-8u60-windows-x64.exe
Now, I am dealing with to download Eclipse but I cannot decide which IDE I should download from here:
https://eclipse.org/downloads/ (My operating system is Windows 8.1 - 64 Bit)
Is there any difference between these IDEs? I want to Eclipse which contains Java and C/C++ programming for now and I might install other programming languages for the future. Which IDE must I download?
You won't find an Eclipse distribution that supports both Java and C/C++ out of the the box.
If you want a single IDE for both, you can download the distribution for Java, and later install C/C++ components.
Eclipse IDE for Java Developers is the basic Java IDE. Eclipse IDE for Java EE Developers includes additional tools for developing Java Enterprise Edition applications such as webapps and EJBs. So, if you are a beginner or you mostly work on Java Standard Edition, download Eclipse IDE for Java Developers.
Then, as this post suggests, You can go to Help -> Install New Software menu item to install C/C++ components.
Related
I recently downloaded VS Code for Java development. When I initially opened an existing Java Project in VS Code, it was unable to identify objects from the Selenium library. I downloaded the Java Extensions plugin and a few others, and now VS code will not recognize any of my imports as valid. Javax and Java.swing are among the now undetectable libraries. Is there a setting I missed? What do you recommend?
VSCode just an Editor, after you install some extensions, it only makes the editor more convenient, get more abilities even can help you develop the project of some kind of language through combine with the language support in your computer. Such as, you need to install JDK, then to install the 'Java' extension, then the extension to combine with the JDK and the VSCode, then you will get the ability to develop java project in VSCode.
That's means, The 'Language Support for Java(TM) by Red Hat' has nothing to do with java development. For example, after you install the JDK on your computer, you can develop java projects in the other IDEAs such as Intellij IDEA or some others. The 'Language Support for Java(TM) by Red Hat' extension just to combine the JDK with VSCode better, to make VSCode better to develop java project.
As you said, you failed to import libraries. Of course, the 'Java' extension without any libraries of java. You need to configure it by yourself. In the Explorer panel, you can find 'JAVA PROJECTS'. In it, you can find which libraries you have referenced and you can adds libraries in it. And of course, you'd better take maven to manage your project.
By the way, recommend you to install 'Java Extension Pack' extension.
You're going to need to add support through extensions because by default VS Code does not support Java. The great thing about this extension is that you get a slue of other extensions as well, such as; maven, debugging tools, support for junit, auto completion, etcetera.
On a side note, you could always use an IDE/IDEA like IntelliJ, Eclipse, or likewise. I'm definitely partial to IntelliJ but they all have their pro's and con's.
I've been using Eclipse Neon (4.6.0) which only supports C/C++ by default. Now that I need to program in Java, I want to integrate Java to the IDE I'm using. So I went to install the "Eclipse JDT Plug-in Developer Resources" Java plugin, including "Eclipse Java Development Tools."
But then, I have the JDK and JRE installed from Oracle very much prior to this day. Now I wonder...
Do I need to install the Eclipse Java plugins from Eclipse even if I already have the Java JDK and JRE installed in my computer?
If yes, then there must be a difference between the Eclipse JDK and Oracle's JDK. What's the difference?
If no, how can I link the JDK and JRE (if either/both is needed) to the project, such that I can finally program in Java?
Clear and concise answers are very much appreciated.
TL;DR: Yes, you need the JDT plugin with your JDK
Long answer
There is no such thing as an Eclipse JDK, (albeit the SDK used for creating plugins but that's not what you want)
Eclipse needs at a minimum, the JRE to run itself. If you need to program in Java, you install the JDK.
As for the Eclipse JDT plugin, it is needed for making Eclipse ready for Java development (necessary things like the Java perspective for example)
Cheers!
The JRE is the Java Runtime. You need it to run Eclipse.
The JDK are the command-line tools to compile Java code. Eclipse has a compiler and most of those tools re-implemented in it "Java Development Tools", so you don't need a JDK to start coding. However, you might need some of its features later, but not worth caring about it right now.
Eclipse Java Development Tools plugin provides the main tools inside the IDE to develop Java code. The Java Editor -providing completion, documentation, navigation, instant error reporting...- and Java Debugger are the 2 main ones. If you want to be productive at writing and debugging Java code, you need to install those into your IDE. Otherwise, it won't be much better than a plain text editor.
My first programming language was Pascal and I did not have to install more than just the compiler. Same thing with C++, the environment was all set to write code by just installing Visual Studio.
In the case of Java why do we need to install this Java Development Kit besides having the Eclipse, Netbeans or another compiler.
I think that Python and Perl have also a packet to be installed before writing code in those languages. Otherwise we wouldn't be able to start off. What do these packets contain and why some languages require these files to be installed before compiling any code.
The normal Java package (the JRE) only contains the stuff necessary to run Java programmes. The JDK is the package containing the compiler. Based on your experience with Pascal and C++, you obviously understand why you need the compiler to create your own programmes.
Eclipse and Netbeans are IDEs, Integrated Developement Enviroments. They make it easier for you to program, but they are not strictly needed, in the same way that you can write a program in C++ by just installing a C++ compiler and without using Visual Studio. There are many programmers, especially in the non-windows-world, who just use a text editor to write those programmes.
As for Python and Perl, it's the same thing. You need to install their respecitve interpreters to run programmes written in those languages. Without them, how do you expect the computer to understand what you want from it?
If you want compare, for example, Eclipse and Visual Studio: the installation for Visual Studio contains both the IDE and the compiler. Eclipse is just the IDE. You also need to install the compiler, which is contained in the JDK.
JDK (Java Development Kit) contains the tools required to develop aplications such as the Java compiler.
As seen in the
"Java SE Downloads" page:
Software Developers: JDK (Java SE Development Kit). For Java Developers. Includes a complete JRE plus tools for developing, debugging, and monitoring Java applications.
Java is quite different than the languages you mentioned. I like this slight difference to be honnes, it clears things up a lot. If you want to develop, you have to download the JDK otherwise you download a much lighter package which is the JRE that is included in the JDK.
I hope this answers the question :- )
With Pascal and C++ the compiler and related tools will convert the source code into machine code that will directly run on the hardware when called from the Operating System,
In Java, Python and Perl the tools generate an intermediate code that does not run directly on the hardware, you need a runtime which is the executable that the operating system calls. This executable will read the intermediate code and convert it to machine language. In Java this is the JRE called java.exe, python is python.exe etc (in non Windows/DOS oS the .exe is not there as not required for executables). In Java you see the intermediate code as .cls files or packed into jars/wars etc and have to explicitly compile the Java to these. Python and perl usually do the compile implicitly, python files show as .pyc and others
Writing Java applets and applications needs development tools like JDK. The JDK includes the Java Runtime Environment, the Java compiler and the Java APIs. For Java Developers. Includes a complete JRE plus tools for developing, debugging, and monitoring Java applications.
I learnt to program using Java in eclipse. Recently I've wanted to learn C and C++ so I installed the C/C++ version of eclipse. I still have some Java programming to do though and the option to create a new Java project has disappeared.
Is there an easy way to have both C++ and Java projects accessible on eclipse or should I find a new IDE to code Java in? If I was to reinstall the Java version of eclipse would it remove the C++ version?
Eclipse is a platform, you can most certainly use it for C/C++ and Java at the same time. The development tools for each language are actually just plugins. That said, many people prefer to use separate installations for each language, so as to keep their workspaces clean.
If you want to install the Java tools in your C/C++ IDE you can go to Help > Install New Software..., and search for "Java Development Tools."
I am working on an application called Enchanting. The application, based on Scratch, emits Java source code and compiles it for uploading onto LEGO Mindstorms NXT Robots.
While the application is very early, users have a hard time installing it.
Right now Windows users have to:
download and install a Java Developer Kit
download and install LeJOS (a java library for the NXT)
possibly tweak environment variables
then they can download, install, and run Enchanting itself
If I could provide an installer that would include the JDK, and LeJOS, I could figure out the environment variables at run time, and the process becomes:
Download, install, and run Enchanting
Is there a way to redistribute a JDK?
(Incidentally, Processing (a simplified text-based programming environment) seems to offer a version that comes with the JDK, so it appears that there is a legitimate way to do so).
Addendum: I would like a Windows user who does not have java installed to be able to run a single .exe file to install the JDK, LeJOS, and Enchanting.
The information regarding redistribution is here for Java 10 JDK and here for Java 8 JDK. Currently Java 8's is substantially more detailed than Java 10's.
and you can use PackJacket, to package all the files you need and create an installer.
Assuming you satisfy all the legal terms required to distribute stuff, you can use izpack to install all the prerequisites, including a JDK/JVM and configuration of environment variables.
Quite a number of IBM Eclipse based tools have JDKs with them.
Or you could just emit bytecode directly. You could bundle a much smaller (than the JDK) JVM dynamic language then use it to compile to bytecode or use libraries made for that purpose.
(I got the following from the Projects using Kawa page)
App Inventor for Android uses Kawa to translate its visual blocks language.
...The Nice compiler (nicec) uses Kawa's gnu.expr and gnu.bytecode packages to generate Java bytecode. ...
It's this last one is the one that uses the Kawa language framework to generate bytecode.
Don't forget about Groovy, Jython, Clojure, and Ruby. Interesting fact about Groovy, the interpreter can compile Java code since Groovy is (more or less) a superset of Java.