I have two separate intellij projects, one that uses JDK 1.8 and another that uses JDK 11.0.14. I would like to have them both open side-by-side if possible. However, when I set the JAVA HOME variable in my path to either one of those, the IDE using the other SDK will not run.
I set the path manually in both IDEs, but they still don't run. I was wondering if it's possible to have two separate Intellij IDEs running that use different SDKs.
yes, it's possible, if both or multiple JDK are installed in your system, each project can use a different SDK
go to File > Project Structure > Project SDK < and chose your preferred JDK from the drop-down menu
Related
Does the version of Eclipse affect the version of code? Suppose, developers are using different version of Eclipse for same version of code with same version of JDK. Will it cause any issue?
No, the version of Eclipse does not matter.
Eclipse has extensive configuration for exactly which version of Java you are targeting. For example see the 'Java > Compiler' settings in the Preferences, and the 'Compiler Settings' in the Properties for a Java project.
You can also tell Eclipse which JRE/JDKs you have installed (see the 'Java > Installed JREs' page in the Preferences). You can run your code using any of these JREs, this is completely separate from the version of Java you are using the run Eclipse itself.
You do need to run a version of Eclipse which understands the version of Java you want to use. So for Java 13 you need to use at lease Eclipse 2019-12.
Of course newer versions of Eclipse contain more tools for helping with Java development and more bug fixes so using an up to date version is recommeneded.
Eclipse is simply an IDE (Integrated development environment). It combines debugging, compiling and other convenient tools for development. on the other hand, the Java code itself is separate, and you don't necessarily need eclipse to write the code. In fact, a simple text editor is enough. All you need is a file with a java extension (Example: hello.java).
It depends on what users share. I'm assuming you're using some sort of SCM, in which case the same project (fully shared) on different versions of the IDE can possibly lead to annoying situations.
There would be no issues in general, as far as producing the code is concerned, except in situations where some versions of IDEs don't support the required Java version (or other features). But I see this more as the user being affected rather than the project/code.
Here's what you should keep in mind:
Keep IDE project configuration files (such as .project, .settings, .classpath) ignored by your SCM system
All Java configuration should be based on a build tool. Use Maven/Gradle, etc, and any modern IDE will be able to create a project from its config file. The IDE would derive local configuration files which should not be sent back to shared repositories
This way, all developers are free to use whatever IDE (and whatever version) without causing interference, and CI tools will work off build tools' configuration as well.
I am starting a computer science class and need to download Netbeans IDE on my Mac 10.6.8. The latest Netbeans edition compatible with my Mac is NetBeans 7. However, in my class, we use NetBeans IDE 8.0.2
Am I able to transfer projects between both versions (via thumb drive) and edit them on both versions of Netbeans?
Thanks for the Help!
You can try it, but I have had trouble in the past with some custom Ant extensions Netbeans uses breaking when you try to use an older version of Netbeans than the one the project was created with. The other way seems to be less problematic. I have almost always been able to open projects created with an older version of Netbeans with a newer one.
I think there are two options:
Copy the sources but just create a new project with the older Netbeans using existing sources as needed. If you haven't customized a lot of settings this is usually fine.
Use Maven projects instead of Ant projects (which are just called Java applications in the Netbeans projects window). Just select Maven in the categories list in the new project dialog. These projects are less closely tied to the Netbeans versions, they can even be imported fairly reliably into Eclipse and Intellij.
copy the source folder(netbeansprojects[Your project]\src) and copy it to a thumb drive. Open a new project in your pc (the one in your class, 8.0.2) and go to THAT projects src, delete it, and replace it with the one from you're flash drive.
May be its a newbie question...
I want to use latest eclipse available. It requires Java 8. However, our company uses java 6 for all projects.
So:
Should I download eclipse that is compatible with Java 6 only ?
or I can configure Java 6 for all the projects regardless what eclipse uses?
Would there be any issues, if its possible to use two versions (one for eclipse and another one for project)?
I know its a newbie questions. But the search did not yield a proper response.
no, you can use the latest Java for Eclipse. The JDK used for project can be configured per project or per workspace. You can install as much JDKs as you desire. i.e. You can start Eclipse using a 32Bit JDK while using a 64Bit JDK for Java EE-Servers or Projects, it has basically nothing to do with the JRE used for Eclipse. You just need to set it up.
There are different version of eclipse for different development environment.
My question is IF IDE remains same then why different versions, and if someone want to use all supported environments in single IDE how he/she can achieve that.
I want to use eclipse as single IDE for PHP, Java & Reports and Android development, instead of using different installation of eclipse.
Somebody helps me or refer me some link, it's quite confusing!
All the versions of Eclipse on the main site download page are the same version of Eclipse, but packaged with different sets of plugins. You can always install more features in Eclipse by installing more plugins.
You can have a single installation of Eclipse and use it for all your development needs - depending on your tastes however, it may sometimes be more manageable to have separate installations of Eclipse for different tasks (when there are a lot of plugins, Eclipse can take noticeably more time to start.)
There ARE different versions of Eclipse out there. But if we stick to one version and look at why there are different variants to download it's basically just that they come prepackaged with a specific component. So if you would like to use your Eclipse for C++ development you can get going with on single download. Instead of downloading the main IDE and then adding the module to support C++.
But after you install Eclipse, with any prepackaged modules, it's easy to add new ones. Say you have Zend Studio which is a PHP IDE based on Eclipse. You can still add all other modules supported by the version of Eclipse that Zend Studio is based on. For instance the Android SDK kit for Android development. You can add most modules by doing a search for them and finding the url to it's update site. Then click Help->Install New Software. Then you click Add and add the URL of the Update site of the module you wish to install.
Then you can select it from the Work with drop-down and it should appear in the list. Select it and click Next.
That way you can install almost all available modules for Eclipse. Note that sometimes you can run in to compatibility issues between installed modules and dependency problems. But most of the time it works fine.
They are not different versions, just the same backend with plugins for the particular language. Just that the specific versions are configured for best use with the language specified. If you want to use more languages than the default one in the eclipse you downloaded, just download the plugins you require and install in your installation of eclipse
Eclipse is plugin based IDE and these plugins may not like each other sometimes. It will be better to use more installations. In fact if you are developing Java and PHP you will need only 2 of them.
STS is a good Java toolkit especially if you work with spring.
If you new to Eclipse you should know that it can go crazy couple of times per month if you install too much and it is very annoying to see that one day your webapp is deploying and second day no...
Keeping installation separated you will have better control.
I currently have the android sdk running with eclipse. It happens to be that I also want to download stanford's customized version of eclipse in order to learn some other stuff. Will there be a problem downloading and installing this customized version if I already another version of eclipse installed on my computer?
Nope! Just make sure you install them to different locations and (potentially) use different workspaces. Eclipse is totally self-contained in the eclipse directory (or where ever you install it).