JavaFx not showing up in preferences window - java

I am trying to work with JavaFx for the first time . Right now, I cannot see the option for JavaFx in my preferences window (Eclipse -> Preferences -> JavaFx?) as shown here:
Preferences Window.
I have Java 1.8.0. installed on my mac.

Eclipse itself does not know anything about JavaFX and in fact it does not have to because a JavaFX program is nothing but a plain Java program.
In order to get some additional tooling you can however install this plugin. e(fx)clipse This is helpfull but not necessary to write a JavaFX program in Eclipse.

Sometimes you may need to manually look up the repository.
I used this walkthrough to do it Install efxclipse into eclipse
The actual repository is here (as of Feb 24,2020): http://download.eclipse.org/efxclipse/updates-released/3.0.0/site
You will need to restart your Eclipse instance.

Related

Can't create java application project in netbeans8.1.(ubuntu)

I am new to NetBeans and I can't create a "Java Application" project, like shown in all tutorials. I can only create a Java Free-Form Project, but this requires a build script, which I don't have either.
Do I have to download a plugin for it and if so which plugin? Or did I download the wrong NetBeans version?
I am using ubuntu version 15 and NetBeans IDE 8.1.
http://imgur.com/90AeiDG screenshot.
Just make sure you have JDK installed on your system. (I am pretty sure, it would be as Netbeans doesn't install if JDK is not found on your machine, but just to be sure about it). Also, You might have missed to select Java in Select Languages during installation.
To activate a feature manually:
Open the Tools > Plugins menu
Go to the Installed tab.
Select and activate the feature you need.
Return to the New Project dialog.
Visit this link for more help:
http://wiki.netbeans.org/FaqMissingProjectCategories
Found the plugin:
It was in the the "Ant" or the "Ant 1.9.4. Documentation 1.9.4" or Mobility plugin. I downloaded those 3 at the same time, but If I have to guess it was the Mobility plugin.
Not sure if this will help you. I've been working on Windows. I have Netbeans 8.1 and JDK 8 (version 1.8.0.73). When I first started with Netbeans and tried to create my first new Project it opened the New Project window with the Categories portion of the new Project screen focused on the Samples section. I also thought I couldn't create the type of project I wanted to create. If this is what is happening to you, see if you can scroll up in the Categories box. If you can, you should find Java at the top. If you click that, you should then be able to select Java Application in the Projects part of the window.

Eclipse (SWT composite): How to run and where is build?

I am new to Eclipse and Java programming having mainly worked with Microsoft Visual Studio.
I installed Eclipse (Kepler 4.3) with no issues along with WindowsBuilder and SWT.
I created a new project adding in references to SWT, both WindowsBuilder JARS, and resty. Into the project, I created a new package and selected a SWT composite. I gave appropriate names.
The GUI designer came up with no issues. I added in a couple of controls. The idea is to create a hello world application, display that application, and build it. Eclipse has automatically build checked.
Okay, the IDE in designer view shows the GUI of my Hello World application and the source view the source, so no problems there.
I press Run, and the first time I had to select a run configuration, which I selected EclipseStarter. There was not many options. I click on run and nothing happens.
If I go to the project's bin package folder, I see a file with a ".class" extension.
Why does pressing Run|Run (Ctrl+F11) do nothingness? There is a brief hour glass showing, but then nothing after that.
How do I launch the application from within Eclipse?
Is the generated ".class" file the correct runtime? I double click on that and Windows does not know what to do with it?
The end platform will be CentOS, but Java as I understand things, should be platform independent, so my Hello World application should run on my Windows 7 Pro box just as nicely. (I did not try CentOS yet) as I want to see it work on my desktop and know what file to copy over.
I think you selected the wrong option EclipseStarter.
Try running it as a Standalone Java Application.
It is a Standalone Java Application that you're building, right?
(I mean, the analogue of a Windows Forms App in .NET)
1. I guess because you selected the wrong type.
2. Ctrl+F11 is for Running it, F11 only is for Debugging it.
3. The class file has to be run by a JVM, Windows cannot run it directly,
it is not anything like a native executable or like a .NET assembly
(which Windows 7 knows how to run). But as you're using Eclipse you
already have a JVM.
The solution is multi-fold.
I had to delete Eclipse and install the 32-bit version of everything. That simplified life, as 64-bit caused issues running.
Create a new package
From the toolbar, select "Create new visual classes" drop down. Select "SWT" --> "Application windows".
Create the application window
Press the play button, 8th icon having selected the package first.
That enabled to run my Hello World on Windows. The output is a .java.
I still have a problem running from the command line, but that is a different issue.
Summary: My main issue was creating a SWT application window first and that I should have 32-bit for everything.

How to run Java code on Eclipse Juno

I'm learning Java and using Eclipse as main IDE right now, but i can't run Java code from it (There are no Run as or Debug option in the Popup menu).
And personally, i don't to use 2 difference version of Eclipse.
Thanks
Edit : I'm using Eclipse Standard 4.3 and it doesn't have run as \ Java Application 's option. It only exists in Eclipse IDE for Java Developers.
This is not the same version of Eclipse but the button is identical.
#illunara , I am using Juno since a long time now. You can run the program using one of the following way and it's pretty simple where is your confusion ??
1) refer to the following screen shot : You can right click on the java project you will see the run as option and from there you can choose on of the option to run as java application
2) You can go to run-> run as-> java application
3) you can right click the mouse on a java program and you can run from their too.
================================================================================================
EDIT
Just as you mentioned you have eclipse standard so you need to add the JDT plugins before you do the above. you can find more details at the following site :
http://www.eclipse.org/jdt/overview.php
Hope this is helpful.

how to use java fx - source code in netbeans

I have downloaded the JavaFx sample source codes and examined "Ensemble" codes. I have some interest on working on those animations, however when I have copied the source code and pasted into Netbeans, I get the following error.
-JavaFX deployment library not found.
I am not too familiar with Java, so would you please tell me how to integrate the codes into my own project? I think that I could not load the libraries.
Thank you.
Perhaps you have an older version of JavaFX installed and NetBeans is using this as "Default JavaFX Platform" (see NB-Menu Tools|Java Platforms) ?
The newest Ensemble is using the Canvas and this is not supported with older JavaFX (<2.2).
In this case deinstall all old versions and get the new Java7 with integrated JavaFX Runtime here http://www.oracle.com/technetwork/java/javafx/downloads/index.html
You don't need to copy and paste the source codes yourself. In Netbeans click to "Open Project..." and navigate to <javafx_sample_dir>/src directory where the Ensemble will be detected as a Netbeans project. If you are interested in a particular component or feature, just run the Ensemble application and open the related component page and click the "Save NetBeans Project..." button then you can open it in Netbeans.
If you still facing that error try first to create a new javaFX project and run it in Netbeans.

Unable to run Java program in Eclipse Juno 4.2

I reinstall my Eclipse environment every year when the new version is released. The most recent release - Juno - however, does not work as expected.
Currently, when I try running demos from Oracle, for example, it asks me to select an Ant file to run before compiling. After creating a blank Ant file to bypass the requirement (which I thought was rather dumb, since I don't think TDD is something that should be forced on people), it still refused to run, saying the "Selection could not be launched."
I understand that Juno is an update from the 3.x track to the 4.x track, but this seems a little ridiculous to me. What can or should I do so I can get Eclipse back up and running again?
Just to clarify:
All files in question are on my Eclipse workspace path
I don't do much in the way of Java development, though I know I'll need to do so soon. Hence, my unfamiliarity with the most recent version of Eclipse.
I would like to run my files & projects without Ant files. I know it has something to do with Run configs, but I don't know how to change them.
Here's what I did to run the demo from Eclipse Juno:
Downloaded the project from http://docs.oracle.com/javase/tutorial/uiswing/examples/zipfiles/components-FrameDemoProject.zip (if this is not the correct demo, then please provide the link you're using)
Unzipped it to my projects directory (not my workspace), so that you have:
PROJECTS_DIR/components-FrameDemoProject/src
PROJECTS_DIR/components-FrameDemoProject/nbproject
PROJECTS_DIR/components-FrameDemoProject/build.xml
From Eclipse, File > New > Java Project
List item Uncheck Use default location and navigate to <PROJECTS_DIR>/components-FrameDemoProject
Hit Finish
Drill down to src/components/FrameDemo.java
Right-click on FrameDemo.java and select Run As > Java Application
Let me know if any of these steps give you trouble.
Take a look at you project properties and select the Builders entry. Do you see an Ant Builder entry? Try to select or create a Java Builder entry instead.
I just created a new Java Project in Juno and added the FrameDemo.java source. In my case, the Java Builder was selected as the default for this new project.

Categories