I am creating an Eclipse plugin for creating a perspective and I need to include a Typescript support for the perspective.
For this, I decided to use the open source project on Github for typescript.java given in this link.
I have packaged the maven project and got the jars and I have placed the jars in the folder called lib in my Eclipse Plug-in project and added the same jars in the classpath of the plugin but still, my project is not detecting the jars and not providing me with the support for Typescript.
I cannot add the Typescript jars to the dependencies section because it is not installed in eclipse so it is not detecting the plug-ins.
This is how my project structure looks like:
Project Structure
This is my build.properties file.
Please help me with this problem.
I want to add Weblogic-Application-Version: 2013-BLAH-BLAH to the manifest for deployment directly to weblogic.
Any ideas?
IntelliJ IDEA can not do that automatically via its build runner. It is an IDE and not a build tool. So its build features, while decent, are limited. You have two options:
Manually put the version into the Manifest.MF file before building with IDEA.
Use a build tool such as Ant, Maven, or Gradle to build your webapp and add the entry.
I am a novice and don't have much idea. So I have a library that is built with Maven and I want to include this library in my java project in Eclipse, how do I do this? I am using Eclipse juno on MacOSx. I want to run one of the modules in this library, so the source code is provided for this module but how do i run this?
If you are not using maven, you have to download the jar and the sources of that jar (In your case, you can download the zip file provided on the website you mention : http://code.google.com/p/cleartk/downloads/list ) and put it somewhere on your computer.
Then you have to set the build path of your project in Eclipse :
Right-click on your project -> Properties -> Java Build Path
Then you can click on the Libraries tab and Add External Jars so you can point to the jar you downloaded.
In this tab, you can attach the sources of this jar to have access to the source code in Eclipse (and eventually set breakpoint).
I have a plain Java project (not a plugin project) which I want to add to a classpath of a eclipse plugin which I am developing. But in web projects I can add that project as a build path and it works fine. But I tried same thing in eclipse plugin, I am able to compile successfully, but at run time I am getting java.lang.ClassNotFoundException.
I know OSGi quite well and I know how to add OSGi into an classpath (using export-packages) but what I want is to add Standard, non-osgi project into an classpath, so that I wont' get runtime errors. Is there anyway I can achieve this?
I can export project as a jar file or make it as a plugin project and it would work fine. But that's not my option currently because, still that API is in pre-alpha stage, and there would be lot of changes going on. So I am trying to avoid pain of exporting it as jar file everytime. Is there any option for me other than this?
I have a similar situation: I want non-OSGi Maven dependencies integrated into the classpath of my plugin. I succeeded with a roundabout solution, which I think is the best I could get.
I have a build step outside of Eclipse where I copy the class files of the dependency into the plugin's lib folder. The lib folder is specified in MANIFEST.MF as an entry in Bundle-ClassPath and (here comes the hack) as a source folder in build.properties. That was the only way to make the plugin work both when launched from within Eclipse and when exported.
I'm creating an eclipse plug-in and I'm having trouble with external jars. In my plug-in I start an application which requires some external jars. What do I have to do to export them automatically with the rest of the plug-in?
Thanks in advance :)
Open your plugin.xml
Go to Runtime tab and add your JAR in the classpath section
By following the steps below, the external JARs will be included when you export your plug-in:
Copy the required external JAR files into a folder in your plug-in project; I like to call this folder lib, but whatever works for you.
Open the build.properties in your plug-in project and check the JARs you want to include in the build in the Binary Build section on the left.
This is an easy way, though it does create an additional plug-in.
In Eclipse:
Choose New>Other, then Plug-in Development>Plug-in from existing JAR archives.
Choose the jars you want to include.
On the next page, configure the plug-in.
In your plug-in's manifest, add the new plug-in as a dependency.
In your plug-in's Properties, add the new project under Java Build Path on the Projects tab.
Edit: You may be able to combine the jars into your plug-in by instead combining both suggestions of Zsolt and user714965 below.
This is what has worked for me. If they are truly external, and this is a project for your company that is not going to be in the "wild" and you control the environment, and you have them out on the file system say at /opt/java/lib/somedir/some.jar you can tell the bundle where to find them by adding them to the Bundle-ClassPath entry in the MANIFEST.MF under META-INF. The syntax is:
Bundle-ClassPath: .,
external:/opt/java/lib/somedir/some.jar,
external:/opt/java/lib/someotherdir/someother.jar
Also it would be prudent to use these in your build path so that you are working with the same jars in both build and runtime environments.
I have done this where the Jars are multi-purpose (such as apache-commons) on our file systems and again we control the environment.
Reference the following:
http://www.eclipsezone.com/eclipse/forums/t51870.html
Copy the required external JAR files into a folder in your plug-in project; I like to call this folder lib, but whatever works for you.
..but as apposed to Zsolt Török (his solution did not work for me) I double-clicked on the plugin.xml, went to the build tab, at the bottom, I clicked Add JARs..., and hey presto, it showed my project, and I then navigated to lib and included the external jar, as per step 1.
The approach from Andy Thomas mostly works, but you also need to export the packages needed by the existing plugin in the new wrapper plugin so that they can be accessed by the plugin at runtime.