Compilation of the eclipse run-time kernel or vanilla eclipse - java

I'm trying to build eclipse from scratch. I could download eclipse e4 from CVS, which has 426 projects. After the automatic build, I got tens of broken project build. I tried to fix some of them, but most of them are still broken including swt and jface.
Googling about eclipse architecture, I found that Wikipedia points out that
With the exception of a small run-time kernel, everything in Eclipse is a plug-in.
What projects in CVS are the run-time kernel? How many projects do I need to build successfully to get vanilla eclipse that is not a plugin but core eclipse? I mean what is the project that after the build I can execute eclipse.exe even though it has no plugin?
Any hints for building them would also be great.

I asked the same question to eclipse forum to get some answers.
In short, this is the idea.
You need a launcher which is platform dependent:
http://eclipse.org/equinox/framework/
http://wiki.eclipse.org/FAQ_How_do_I_run_Eclipse%3F
Then, you need OSGi/Equinox to be compiled
http://www.eclipse.org/equinox/documents/quickstart-framework.php
Once you have the launcher and OSGi, everything is a module on top of it.

Related

JRE System Library is always unbound in Eclipse? (An internal error occurred during: "Launching Main". Model not available for helloWorld)

THE PROBLEM
I've been developing in Java for years, but a recent install of my tools on a new computer (Windows 10) has resulted in the strangest problem. When I create a new project, almost everything is underlined in red. The error reads Implicit super constructor Object() is undefined for default constructor. Must define an explicit constructor:
WHAT I TRIED:
A quick search online reveals that I should JRE System Library is most likely unbound, so I change it: Properties >> Java Build Path >> JRE System Library >> Edit:
All of the red lines go away, but I can't run my program. An Error reads:
An internal error occurred during: "Launching Main".
Model not available for helloWorld
On closer inspection, Eclipse shows an error in the src/test folder, but there are no files there.
When I restart Eclipse, all of the red lines reappear and I have to do everything all over again. It also cannot find the JUnit dependencies either, and I have to manually add JUnit 4 library to the build path.
DEETS YO:
OS Details:
Windows 10
Eclipse Details:
Version: 2019-09 R (4.13.0)
Java Details:
Java 13.0.1
Alright, so none of the posted suggestions worked but I independently found out what was wrong. In general, I've found that this solves a lot of weird Gradle activity, including the ominous "Could not install Gradle distribution from 'https://services.gradle.org/distributions/gradle-5.6-all.zip'" that a lot of people have problems with once they try to use Gradle with new versions of Eclipse.
Solution
When you install Eclipse, there's a Buildship Gradle Integration plug-in that is visible in the Eclipse Marketplace (it has a little graphic of an elephant next to it). When you get modern versions of JavaEE Eclipse, it comes with that installed.
The problem is that this isn't the most updated version of it.
So you have to click the button that reads "installed" and it'll update it. After you update it and restart Eclipse, your most recent version of Gradle will work.
When using gradle run this:
gradlew cleanEclipse eclipse
this will re-generate the eclipse project and this helped me
Under a fresh Eclipse, we encountered this "Model not available problem" on projects that do not use Gradle, but maven.
To update gradle did not change anything. We assume that there is a conflict between m2e and this plugin. We found 2 solutions :
A) Add gradle nature (even if unused)
Right-click on the project
Configure
Add Nature (elephant logo)
Run your app, enjoy
B) Uninstall gradle. (if not used and not mandatory for your eclipse version)
Help/Eclipse MarketPlace
Search "Gradle"
Go to "BuildShop Gradle Integration 3.0" (the elephant) which is indicated as installed and clic on the grayed installed button.
Uninstall it. It will restart eclipse.
Run your app, enjoy :)
In my case it is resolved by updating Buildship Gradle Integration 3.0 from Eclipse market place

Use Scala on computer without internet connection

I am new in Scala, so sorry if the question is absolutely obvious.
I have an Eclipse Photon installed on my computer. Would like to edit Scala code and produce runnable jars. The tricky part is that I don't have internet access on my computer (Centos7).
I bear in mind two potential issues/questions:
Downloading the plugin manually: I know, that Scala IDE plugin for Eclipse enables running Scala code/producing jars (like https://medium.com/devilsadvocatediwakar/how-to-install-scala-plugins-in-eclipse-in-ubuntu-13e53ffe3f39). Installing it from the GUI is rather straight forward. Is it possible to download a plugin bundle manually (not from GUI), move it to target computer and finally install it?
Compiling code into jars: assume that the point 1 is done. SBT or Maven requires some dependencies (e.g. Yoda time, Spark libraries) to produce specific jars - does it cause, that all the dependencies shall be moved and installed manually also?
The answer was provided by the Luis Miguel Mejía Suárez in comments:
Yes you can. For installing a manual plugin - here you can find the
zip of the ScalaIDE - and finally, use the maven repository to search
and download the dependencies JARS... However, is this really your
personal computer? or some kind of deployment server? - Also, as an
ex-user of the ScalaIDE I would recommend you to try a different,
newer IDE. For example, I just switched the last week from Eclipse to
VSCode with metals.

Can Eclipse Neon determinate the projects I don't need for developement?

I'm working on a rather big RCP application, where only 2 / 100 projects are written and maintained by me. I do have dependencies on other projects and these projects might depend on another project as well.
Since Eclipse takes a lot of time to start up and loading (might even crashing sometimes if not ready) I was wondering if Eclipse Neon could determinate the projects I don't need so I could wipe them out of the workspace to fasten up the loading.
If it is helpful: We use gradle to build the project.
It's hard to know exactly how your projects relate to one another but I'm guessing you could use gradle's new composite build support (added in v3.1) to have some projects as source dependencies and others as binary dependencies.
You could then wipe out everything that's not part of the composite build from your eclipse workspace. You might even make use of this snippet to see what source folders are in your eclipse workspace... perhaps you could write a gradle task to do the wiping?
I'm assuming you are using buildship?

Is it possible to use intellij idea and eclipse together

for someone it may seems a little weird but still I want to know if it's possible or not. We have a lot of projects which coded on eclipse so far and some of us wants to jump into intellij idea world.
Can we be able to run the projects via eclipse and intellij together at the same time? I mean for instance I'll be using intellij idea while another friend of mine will be using eclipse instead of intellij idea on the same projects, is it possible?
If it's possible, would it create any problem for version control systems such as subversion?
Subversion will have no problem at all, but I recommend you in that case that you rely your java build configuration (sources, compiler level, dependencies, etc.) on maven or gradle instead of doing it twice, once for every IDE you are using. Then both maven or gradle should be able to generate IDE-specific configuration files for each environment and you would work in the same conditions.
Actually I like the idea of working with a managed and automated build process, so if anyone is brave and bold enough to use vim... they can use it without problems, and still build their app.
Can we be able to run the projects via eclipse and intellij together at the same time?
Yes, because these IDE store their project data and configuration in different files, so they don't step on each other:
Eclipse stores its files in .project, .classpath, .settings
IntelliJ stores its files in .idea, *.iml
If it's possible, would it create any problem for version control systems such as subversion?
Not at all.
Btw I do this too sometimes: I have projects where members use different IDE: IntelliJ, Android Studio, Eclipse, with no problems.

Issues with Eclipse while working on and Android project

I am currently developing an application with my software engineering classmates. I am experiencing a few issues with Eclipse, however. But first, some information about my Eclipse: I am running version: Juno Service Release 2 with a build id of 20130225-0426. I am running Eclipse on my MacBook with OS X Mountain Lion 10.7.5. I am using SVN to upload and download the project to a repository through assembla.com.
First, Eclipse will not recognize any errors. If I purposely type random characters, Eclipse does not underline them with red.
Next, whenever I type "this.whatever" or "# for javadoc" I receive the following message: "this compilation unit is not on the build path of a Java project." I can click "OK" and continue with no problem though.
Finally, whenever I attempt to run the program I receive this message:"The selection cannot be launched, and there are no recent launches."
Other notes: I do not have any of these issues with any of my other projects in my workspace. I also have another project using the assembla repository that does not contain these issues. These issues just occurred all of the sudden.
Edit: None of the other members in my group are experiencing these issues. I have attempted to download the project from the repository on a different machine and I still have these problems. I have attempted to delete the project from my workspace and re-download. Still a no go.
Update: I even installed the Android Development Kit and used the included copy of Eclipse. It will still not work properly.
What is going on with my Eclipse?
Since I guess you're in start phase of android coding and you're not addicted to a special IDE, I strongly recommend the IntelliJ IDEA instead of Eclipse for Android development. I have tried Eclipse already and because of its weaknesses, now I'm using IntelliJ. Eclipse is not the best IDE for Android development and have a long way to become the one.
IntelliJ IDEA
I suggest you try installing the ADT bundle in a new location and see if you still have these problems. The ADT bundle includes the latest Android SDK along with a version of Eclipse with the ADT (the Android Developer Tools plugin) already installed and configured. It's possible that you have (or have had in the past) other Eclipse plugins that affect how the Java tools in Eclipse work, possibly in a way that interferes with ADT. I have personally had problems like this in the past with tools like Aptana, where even after uninstalling there would be problems.
Eclipse is telling you already with the above error message: You don't have your sources on a build path, but just in some folder.
Either you have created a simple project instead of a Java project, which then also doesn't do anything Java specific. Or you have created your Java files in plain folders, instead of source folders.
The best way to sort this out is to create a new Java project using the Eclipse "New..." wizard from the main menu. Compare the result of that to your project. The two important things are: The project has an icon with a small "J" overlayed. The Java sources are shown in packages, which themself are in source folders (with a package overlay), not in simple folders.

Categories