javafx.scene.control.Pagination not found - javafx-2

I'm using java 1.7_07 which include javafx 2.2.1.
When I try to import the package javafx.scene.control.Pagination Netbeans doesn't find it. The class is present in the API documentation, I can't see the reason.

Check your javafx version: How to get the version number of JavaFX?
You may use Java Platform in NetBeans settings being setup to older JavaFX and Pagination is a relatively new control.

Related

Why is Intellij code auto completion in JSF with Primefaces not working?

I have installed intellij IDEA Ultimate Edition latest version and started to test the compatibility of it with primefaces version 6.2.
If it could be compatible with primeface we are gonna switch from eclips to intellij.
unfortunatly i cann't figure out how to get code autocomplition to work for primefaces.
I have done alreaday the following.
created maven project.
added primeface dependency in pom.
Added primeface framework by right clicking on the project and choosing Add framework support....
Does any one know how to fix this issue?
Does anyone know the best IDEA for working with primeface?
I did solve it by the following. I got inspiration from here.
Added primeface framework by right clicking on the project and choosing Add framework support....
Added JSF facet to my web modules from File | Project Structure | Modules - module - JSF facet Ctrl+Shift+Alt+S
Restarting intellij IDEA
Quickly looking into this issue revealed this link, https://www.jetbrains.com/help/idea/preparing-for-jsf-application-development.html.
The website states that in order to enable support for JSF development, you need the Ultimate edition.
I would suggest taking a look at NetBeans. It is continuously developed alongside new implementations of Java EE (and soon Jakarta EE) and is therefore the go-to IDE environment for JavaEE development. Everything works pretty much out of the box.

Netbeans cannot find the CDI package javax.enterprise.context.*

I am creating a simple JSF application with one of my university colleagues, and I am having some trouble when I pull down the application from our repository. When I import the project into NetBeans IDE 8.0.1, the program does not compile correctly on the following CDI based annotation:
#Named
#RequestScoped
public class LoginController implements Serializable {...
It is informing me that it cannot find the following package:
import javax.enterprise.context.*;
Initially I had thought that I did not have the EJB and EAR plugin installed, however I have installed the Java EE bundle which I downloaded from the netbeans website. Are there any other JAR's, which I may be possibly missing, causing this specific error.
On my colleagues local machine everything works as expected without any issues at all, so I am left unclear why this is not happening on my computer.
yeah it seem this netbeans version lacking javax.enterprise package. Here is the solution
1) If you are using maven project, add javax.enterprise(cdi-api.jar) as dependency
2) For other projects, download cdi-api.jar, add this as external jar from project properties, it will enable CDI.
Yes you need to include another library. You are using the part that belongs to Java EE. By default java includes Java SE. So you need to add this library in your project.
Go to
Project Properties -> Libraries -> Add Library -> Java EE Web 7 Api Library
I had this problem too. The glassfish library structure has changed somewhat so instead of using the "Java EE from Glassfish" library we used the "Java EE from API" library and that fixed it.
Both proposed solutions are valid but the simplest one is the second one because you've got already everything needed in NetBeans 8.0.
Your problem is clearly the consequence of the default Java EE bundle (version 7) present in GlassFish 4.1. Of course, it is a NetBeans bug. Netbeans should have added the needed library to your project when you chose to work with Java EE 6.

How to make a executable file of JavaFX 2.0 project?

I want to make a executable file of my project which I made in JavaFX 2.0. Can anyone help me with this?
The JavaFX team implemented support for this in the tools bundled with the JavaFX 2.2 SDK (included in Java7 from update 6). The JavaFX packaging toolset for packaging executables is documented in self-contained application section of the JavaFX deployment guide.
See RT-19446 "Add ability to co-bundle Java + JavaFX + App into a single native executable" for more information (anybody can sign up to view the jira).
3rd party tools such as the JavaFX maven plugin or the JavaFX gradle plugin, streamline integration of building native JavaFX executables using common build systems.
The JavaFX packaging tools can also be used to natively package any Java application, not just JavaFX applications. For example, a Swing application, as demonstrated by this shell script for packaging a Swing application using JavaFX on OS X.
If you want to do the packaging for the 2.0 or 2.1 versions of JavaFX (not JavaFX 2.2+), then you should review Packaging JavaFX Applications as Native Installers.
Javafx 2+ can now easily be packaged as a native exe (with an added payload, which the current JRE), the up to date (as in the end of 2012) article is here: http://docs.oracle.com/javafx/2/deployment/self-contained-packaging.htm
Out of curiosity I created an executable on Windows (copy-pasting the netbeans build code into netbeans' build.xml) from the canvas and the hello world examples: the app is around 20k, the executable/launcher is around 80k and the added runtime is 138mb.
By the way if you have an older netbeans install (installed with a pre 1.7jdk) you may have to update it or edit its netbeans.conf fixing the "netbeans_jdkhome" path, otherwise the bundled executable's packaging may fail.
There are several tools to generate a customized exe launcher for your Java application.
I have good experience with Winrun4J: http://winrun4j.sourceforge.net/
but you will always need an installed Java/JavaFX Runtime even if you have an .exe that contains all your code.

some javafx packages cannot be found (like "table")

I tried to start working with Netbeans with java7 and javafx for some GUI project.
Unfortunately, when try to run code I found in the following link (for creating table),
the Netbeans doesn't find some packages (attached!)
I already download the newest Netbean and the newest JavaFX with java 7 from the link below.
Does any one know how can I create those tables?
The download link:
http://www.oracle.com/technetwork/java/javafx/downloads/index.html
I copied the code from:
http://www.adam-bien.com/roller/abien/entry/hello_javafx_2_a_tableview
and the following packages cannot be found:
import javafx.application.Launcher;
import javafx.collections.Sequence;
import javafx.scene.control.table.TableColumn;
import javafx.scene.control.table.TableView;
import javafx.scene.control.table.model.SequenceTableModel;
Thank you,
Aviad
It seems you didn't use JavaFX NB project. Try next: File->New Project->JavaFX/JavaFX Application. Then copy your files to this project.
My solution was to uninstall java, netbeans and then reinstall java, netbeans in that order. Netbeans has issues updating itself. I had the same issue when updating to javafx 2.2.

Is this possible to use LWUIT in sun java wireless toolkit 2.5.2 midp2.0?

please let me know whether it is possible or not? if yes give me the procedure to setup and run the application.
You can easily use LWUIT with java wireless toolkit. You can use LWUIT 1.4 jar file. If you want to latest source code, checkout here... Use netbeans, build the LWUIT project and get latest LWUIT jar file. Netbeans already having sun java wireless toolkit 2.5.2. In eclipse you need to add the plugin for this. and use the LWUIT jar file for your application.
LWUIT is a framework.That builds upon j2me.Better u refer the oracle site for further information.

Resources