I have a feature based E4 application that I'd like to export as an executable project (.exe since I'm under windows).
I'm following the automated procedure called "Export Project Wizard" but despite I'm getting a .exe file + some JAR's in the same export folder, when I run it I get this error message: "org.eclipse.e4.core.di.InjectionException: java.lang.NoClassDefFoundError com/test/test1"
com.test.test1 is an external plugin which I included in the depedency tab, and it seems that Eclipse won't find it.
How can I work it out? Should it not automatically export all the required plugins?
I also tried to export that plugin manually, as JAR, but it didn't work.
Thanks
Use 'Export > Plug-in Development > Eclipse product'. This will require you to specify the xxx.product file that was created when you created your e4 application.
You can also launch the same wizard from the xxx.product editor by clicking 'Use the Eclipse product export wizard'.
You must configure your xxx.product file to specify all the features that you are using - your own features and the standard Eclipse features (on the Dependencies tab). For example on my product I have:
my feature
org.eclipse.e4.rcp
org.eclipse.emf.common
org.eclipse.emf.ecore
the 3 Eclipse features are the minimum needed for an e4 application.
Your feature must list all your plugins in its feature.xml plus any dependencies that are not covered in any other feature. Every plugin you want to use must appear in one of the features.
Related
The files within my Gradle project are not identified by IntelliJ when a project in WSL (Windows subsystem for Linux) is opened by IntelliJ IDEA Ultimate. Correct java versions are also installed within WSL and the paths are also set correctly.
This is a Gradle project and my java files are shown with a red icon on them and it says "Java file outside of source root".
Then I went to File -> Project Structure -> Modules, and observed that the correct modules were not identified.
When I open the same project in Windows or Ubuntu, the modules are automatically detected and I don't need to add them manually.
How I opened the project is using File -> Open on IntelliJ for Windows and gave the project path within WSL (E.g. \\wsl$\Ubuntu-20.04\home\username\idea-project).
My Gradle versions is as below,
Has anyone come across any situation like this that could help me figure out what is the issue behind this.
Thank you.
I'd like to use this Eclipse plugin:
https://marketplace.eclipse.org/content/opencl-development-tool#group-details
with my Eclipse 2019-09. But - there's a version incompatibility, or so I'm told. It's been suggested to me that I might be able to use the plugin sources to "export it yourself as a deployable in order to install it".
But it's not at all clear to me how I'm supposed to do that. I'm not fluent with building Java artifacts nor with Eclipse plugin development and deployment. At the link above, there are several repositores, and most of them are only two or three files, one of them being pom.xml. Only one seems like a proper repo (this one).
What do I do with these repos and how can I make a plugin I can install in Eclipse, using them?
Looks like it's become simpler over time--there's a wizard with options for doing this once you've got the plug-in in your workspace compiling cleanly. Install the Plug-in Development Environment for your version of Eclipse. It should be in an update site already in your list of Available Software Sites (that's a preference page). Then, follow the steps of the Export and Install into the Running Host task in the built-in Help. The first 3 sentences of that task refer to the normal process of debugging plug-ins from source projects in the workspace. The rest of it is a guide to exactly what needs to be done here.
Here's the link to the 2020-03 version of that documentation:
https://help.eclipse.org/2020-03/topic/org.eclipse.pde.doc.user/tasks/ui_export_install_into_host.htm?cp=4_2_4_0
And the relevant parts:
...it is sometimes necessary for code to be tested in your host, your currently running Eclipse instance. To test code in the host, you need to export and install into the running Eclipse instance.
To export plug-ins and features and install them into the host Eclipse do the following:
Develop your plug-ins and features in the workspace
Open the export wizard, either Open the plug-in export wizard File > Export... > Plug-in Development > Deployable plug-ins and fragments or Open the feature export wizard File > Export... > Plug-in Development > Deployable features
Select your plug-ins or features to export and install
Select the last option on the Destination tab Install into host. Repository. Then choose a directory to create the repository in
Hit Finish. The export operation will run followed by the installation operation.
If the operations completed successfully, you will be prompted to restart. Choose to restart now
our plug-ins will be installed and running after the restart. You can see what has been installed using the Installation Details button on the About Dialog (available by going to Help > About Eclipse SDK)
I ran into a strange issue.When double click an executable jar it won't open
however if I do the following it starts without a problem:
java -jar working_neon.jar
This jar is a swing gui application.The jar file creation is done by eclipse
Here is the manifest file:
Manifest-Version: 1.0
Rsrc-Class-Path: ./ miglayout15-swing.jar Message.jar org.apache.commo
ns.io.jar
Class-Path: .
Rsrc-Main-Class: gui.FileCopyManager
Main-Class: org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader
Any ideas?
If you are using eclipse: Go to File->Export, under Java folder select 'Runnable JAR file', under Launch configuration select the class where your main method is. Select the export destination, then select Library handling to 'Package required libraries into generated JAR', and click on finish. This works for my swing gui app. I hope it helps
Make sure that you don't use a higher Java-version in Eclipse Project-settings / Run-Configuration than the JRE used to run the jar.
In Eclipse right-click you project -> Properties -> Java-Build-Path -> Libraries.
There you will see the JRE-Version that will be required to run the jar. (Also check the JRE-Version set in Run-Configuration)
Open commandline and type
java -version
Make sure the version displayed there is at least as high, as the one you found in Build-Path and Run-Configuration!
If the version displayed is not as high as the version in build-path either decrease the JRE-version set in Eclipse Build-Path/Run-Configuration or - if not possible - change your PATH-variable to use a higher versioned JRE.
Finally managed to fix my problem by selecting Extract required libraries into generated jar when creating a jar file from eclipse
how can i make a runnable Jar from an RCP app (e.g. the mail template).
In the MAINFEST.MF under exporting -> Export Wizard i can export the project as a JAR File.
When i try
java -jar mail_1.0.0.201301161746.jar
it says
Failed to load Main-Class manifest attribute from mail_1.0.0.201301161746.jar
cause there is no Main-Class:xyzclass entry in there (cause it's a rcp app).
So what do i add there or how can i make it runnable?
I don't think that you need to.
Once you have your application configured/developed/branded you can export it as an eclipse product.
To do this Right click the project > Export > Plug-in development > Eclipse product
You are going to need a configuration file to do that.
You can create it by clicking the new project button on Eclipse > Plug-in development > Product Configuration I suggest you give the file the name config.ini.
For more information pls refer:
http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.pde.doc.user%2Fguide%2Ftools%2Feditors%2Fproduct_editor%2Fconfiguration.htm
An RCP app is running in Equinox (an implementation of OSGi), hence a one-jar export is not possible.
The entire notion of OSGi is to provide a modular architecture.
Say i have a java project setup in eclipse. i have all the thirdparty jar's and reading the resources etc set in the eclipse IDE.
ie all the classpath etc are set through the IDE
Now if i want to launch my app from commandline.
Can i get some hints/ links where i can undersand the configuration settings that can be done in Unix / windows machine to launch the application.
Looking for runtime configuration settings.
Because in production environment there is no IDE involved?
Also How do i set classpath in the server say jboss?
You can include the classpath and dependencies info in the Manifest of your application.
And in addition, you can consider ant if you want to be able to build your project on a machine without an IDE at all.
Is there any information that you specify in Eclipse and you need to use in your production env?
Use Eclipse 3.5
Create a launch configuration by selecting your class containing the main method, and running it.
File -> Export -> Java -> Runnable Jar
Personally I like the "put libraries in a sub-folder" since that does not merge jars or use a custom classloader.
The generated jar file can be executed with "java -jar whatever.jar".
You can redo this easier by either generating an ant script or making the launch configuration a shared file.
(Run -> Run configurations. Select launch configuration, Choose "Common" pane. Choose "Shared file" and select a place to put it.