How to activate javafx to existing project in Netbeans? - netbeans

I have maven project with javafx code. When I checkout this project to Netbeans, id cant find javafx packages even if I set "Default JavaFX" platform for this projeckt. But it finds javafx packages for new javafx project.

you must set the build path and adding the external .jar - file from you javafx path.
You need to add this:
jfxrt.jar
greetz

not really supported/implemented just yet on the netbeans javafx modules side.
See the relevant enhancements filed.
http://netbeans.org/bugzilla/show_bug.cgi?id=221184
http://netbeans.org/bugzilla/show_bug.cgi?id=222295

You must add some JARs to your project in order to build it.
Select "Properties" in your project and choose Libraries. There, select "Add JAR/Folder" and navigate to the JDK folder. There, inside jre/lib you find jfxrt.jar. Add it.
Now, javafx package is recognized.

Related

Eclipse Kura OSGi Dependency Management

Preface: I'm new to Eclipse, OSGi, and Kura
I'm trying to develop a Kura plug-in that depends on org.apache.httpcomponents.httpclient. I found an OSGi bundle for the package here.
Currently, the only way I'm able to use the plug-in (with the OSX Kura emulator) is to download httpclient-osgi-4.5.jar and add it to ~/Documents/workspace/target-definition/common/repository/plugins/. Otherwise I get a class not found error.
When I add the plugin to MANIFEST.MF either as with REQUIRE-PLUGIN or IMPORT-PACKAGE, Eclipse cannot find the package.
What's the correct way to require, fetch, and add to the classpath a remote dependency using Eclipse Kura/OSGi? Eclipse currently only looks in my local workspace for dependancies, is there an accepted way to fetch remote plugins?
Thanks for the help!
The bundles located in target-definition/common/repository/plugins are part of an M2 repository created by the Kura build. It is not enough to simply copy your required bundle to that directory. The solution I typically use to accomplish what you want is:
Double click the kura-equinox_3.8.1.target file located in target-definition. This should open in the Eclipse IDE.
Under "Locations", click "Add...". Then select "Directory" and "Next". Select the folder containing your required additional bundles and click "Finish".
Save the kura-equinox_3.8.1.target file and click "Set as Target Platform". Your new bundle should now be available in Eclipse.
Thanks,
--Dave
What for me works is;
Simply copied the bundle in ${workspace_loc}/target-definition/common/repository/plugins
Clicked on reload
Clicked on Set as Target Platform
After these steps, Eclipse is aware of my bundle and could able to use it anywhere.

Easy way to find which Eclipse version and plugins are needed for existing Eclipse project

I was given a working Eclipse project in Java. If I open it in some version of Eclipse then I get numerous errors. I get them because my version of Eclipse differs (it is not web developer) and vaadin and ivy plugins were used to create the project. How can I understand which version of Eclipse and which plugins are needed? I can get some sense by looking in .setting folder. There are a lot of files with names as namespaces related to plugins. Is there more direct or automatic/semi automatic way to find which plugins and Eclipse version are needed?
No. The Eclipse developers expect you to know your tools and if you take over a project from someone else or join a project, that someone explains to you how to install and configure Eclipse.
To find out which Eclipse plugins you need, look into the file .project and the folder .settings. Google for the file names and plugin IDs to see what they might mean. Usually, the third word of the name is the project (org.eclipse.jdt.* -> JDT project).
For missing classes, you need to look at the classpath. The easiest way to do that is to right-click on your project name and then select "Properties" from the menu. There is an entry "Build Path" which contains all the dependencies. Click through the tabs to see what you need.
For plugin projects, look into the file META-INF/MANIFEST.MF; Eclipse should open a special editor when you open it which has a tab for dependencies.

Can´t run acceleo uml2java example

I´m beginning with Acceleo.
I installed eclipse-modeling-luna-M6-win32.
Then i installed acceleo by update on eclipse.
(is there any better option?)
Trying to use the uml2java example.
To run it i tried to run org.eclipse.acceleo.examples.uml2java.
It gave me:
Error
Couldn't load class org.eclipse.acceleo.examples.uml2java.main.Uml2java from project org.eclipse.acceleo.examples.uml2java
Couldn't load class org.eclipse.acceleo.examples.uml2java.main.Uml2java. Check that its containing package is exported.
I did not change the code.
I checked the MANIFEST and it has on the runtime: org.eclipse.acceleo.examples.uml2java.main
I also saw that there is an UI project that as i understand is a plugin but i don´t know what to do with it (so that it will create a new menu on eclipse).
Any help is appreciated!!
Thanks.
it worked using eclipse indigo with the latest acceleo. i don´t know if it´s possible to use a more recent eclipse version. also works with eclipse kepler.
This fixed the problem for me. Try adding the "bin/" directory to the Classpath in the Manifest file.
Right click the MANIFEST.MF file and "Open With >" "Plug-in Manifest Editor".
This gives some tabs at the bottom. Use the "Runtime" tab. On the bottom right of this screen there is a place to edit the classpath. Add "bin/".
I got this idea from Etienne's answer in: Can't generate java from UML using Acceleo in Eclipse

How to use SVN to build a library

I am trying to follow a tutorial, and I am told to:
1- Get the source code for the Java EMV Reader library from http://code.google.com/p/javaemvreader/ and build it.
2- Drop the resulting jar file in lib/.
3- Import the project in Eclipse and build it.
I right click the java files, and choose run as but don't get an option to run as Java Application. I also can not export the files as a JAR file. I have enclosed an image of what I have
After the first comment, I right clicked on my project, and under Maven, chose the option "configure as Maven" project. ( Thank you so much; this must be one of the fastest resolutions in the world )And I can now run the project. I get the window in my pic2, which I have attached. I don't however know what step 2 of the above instructions means. I don't see a lib/ folder. And the project he is refering to in step 3 is on git. Any ideas on what he means? ![pic2]!1
Eclipse projects have a "type" and that controls what tools are available. You probably created a "Basic Project" which means there are no compilers or other Java tools associated with it. You would want to create a Java Project in Eclipse.
That project does not seem to have Eclipse .project and .classpath files checked into the repository. It does look to be a Maven project however. So you would either want the m2eclipse plugins installed, and check this out as a Maven project, which would handle configuring everything else, or you want to use the Checkout As ... option and use the wizard to create a new Java project to checkout.
These are more Eclipse IDE questions than SVN or Subclipse questions.

Netbeans. How to find out referenced libraries (not included in a project code)?

I have a netbeans project: java Web Application.
Some libraries in the project are'nt included in code directory. e.g.
....netbeans\7.1\var\cache\index\s717\java\14\gensrc\javax\mail\MimeMessage
so when I clone the project in other machine the library isnt found, because the netbeans directory is different. Is there a tool that check it? Maybe a netbeans plugin. thanks!
Try right-clicking on the Libraries in your Netbeans Project Browser, and selecting "Add JAR/Folder". From there, navigate to the JAR you want, and select "Reference as Relative Path".