Getting error while creating JavaFX11 application in Apache Netbeans 10 - javafx-11

i am new to java fx and i have downloaded Apache Netbeans 9 which runs on java 11.
since java fx is shipped separately, i have downloaded openjfx-11.0.1_SDK and followed steps in this link https://openjfx.io/openjfx-docs/#install-javafx
when i try to create java fx application in apache netbeans , i am getting below error
Failed to automatically set-up a JavaFX Platform.
Please go to Platform Manager, create a non-default Java SE platform, then go to the JavaFX tab,
enable JavaFX and fill in the paths to valid JavaFX SDK and JavaFX Runtime.
Note: JavaFX SDK can be downloaded from JavaFX website
attaching screen shot of netbeans 10.

This is for the future developers that will stumble on this problem. You can follow this video for Installing JavaFX13 and integrate it with Apache Netbeans 11.2. Try following the instructions here
There might be problems with CSS autocomplete but you can create a JavaFx project now.
Edited: As suggested from the other answer, you can download the JavaFX from the official page of JavaFX.

I had the same issue on Netbeans 11. I solved this issue by following below steps.
Download the javafx.zip file from the website and after downloading it put it on JDK folder.
First, click on Manage Platforms and then click on Add platform and after clicking on Add platform it will ask of the filename, so give the path till JDK folder.
After giving path click on next and it will ask for platform name and platform sources so in platform sources give the path till src.zip (jdk/lib/src.zip) and press finish button.
After finishing button, you will see the new platform is added with the same name you have given platform name then click on it and go-to sources and click on Add Jar/Folder button and give the path till javafx.zip file which is saved on JDK folder.
After giving path click on add Jar/folder and close it. After closing it click on JavaFX platform and in that you will see the platform name is there click on it and create the project.

The problem is fixing by jdk1.8. Download and install at the page - https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html for your platform. For me, it was "Linux x64 Compressed Archive"(https://download.oracle.com/otn/java/jdk/8u241-b07/1f5b5a70bf22433b84d0e960903adac8/jdk-8u241-linux-x64.tar.gz)
after that:
setting up 1
setting up 2

It may be too late, but I figured it out nonetheless. You, and all other people reading this while trying to figure out how to use JavaFX with any Apache Netbeans version should:
create a new Library, name it JavaFx and in it, put all the .jar files(not the src.zip file) inside the lib directory of the unzipped javafx installation.
create a new normal java project. Go to project properties, and to module path, add the library JavaFx.
create a new module-info.java file (netbeans automates it) in that project and in it, you should put a dependency to all of the JavaFx components, if netbeans didn't already do that (in my case, it did. I didn't even have to hand code a single dependency). And yes, declare the module as "open module".
In essence, I just told you to modularize your project

Related

Cocos Studio: Cocos Framework is not installed error

I installed Cocos Studio v2.3.3 to C:\Cocos using the link to a non-framework included package on the cocos2d-x.org site. I then unpacked cocos2d-x v3.9 using the zip file provided into the C:\Cocos\frameworks\cocos2d-x-3.9 - but Cocos Studio doesn't recognize that the Cocos2d-x framework is installed.
When I look in the Platform section of the Preferences menu item under the Edit menu, it show this:
And as expected, when I try to modify an already created project options, I see this:
I've tried all the suggestions posted in the Cocos2d-x forums, including but not limited to editing the Frameworks\FrameworksVersionList.xml to include the entry for cocos2d-x-3.9 (it was already there), editing the cocos2d.ini file in tools\console\bin, removing various combinations and then all cocos environment variables and quite a few others. None of the solutions either by themselves or in combination with one another worked.
Has anyone gotten Cocos Studio to work with a separate installation of Cocos2d-x framework?
Details of the solution with various things I tried are listed in this blog post: http://vijay.tech/talks/solved-cocos-studio-cocos-framework-is-not-installed-error/ Note that the post has a registry edit script (.REG file) attached for convenience.
But the essential steps are listed here:
Download and install Cocos for Windows V2.3.3 (the one without framework) to C:\Cocos
Download and unzip cocos2d-x-3.9.zip to C:\Cocos\frameworks\cocos2d-x-3.9
Manually create the following registry entries on Windows (64 bit):
HKLM\Software\Wow6432Node\CocosFramework\InstallDir as a REG_SZ and set it to C:\Cocos
HKLM\Software\Wow6432Node\CocosFramework\3.9\EngineVersion as a REG_SZ and set it to cocos2d-x-3.9
HKLM\Software\Wow6432Node\CocosFramework\3.9\Path as a REG_SZ and set it to C:\Cocos\frameworks\cocos2d-x-3.9
Create a file named version with the contents cocos2d-x-3.9 in C:\Cocos\frameworks\cocos2d-x-3.9
If you also want to do Android development, then Android SDK, Android NDK, Ant and JDK paths should be set in the Platform section of the Edit/Preferences menu item, else skip this step.

Unity3D cannot open Assets from Web page

I have installed Unity3D 5.1.0f3 Personal on Ubuntu. I have not installed Wine for Ubuntu.
When I tried to open link: Open in Unity, on the page https://www.assetstore.unity3d.com/en/#!/content/25794. I've got error:
The address wasn't understood
Firefox doesn't know how to open this address, because one of the
following protocols (com.unity3d.kharma) isn't associated with any
program or is not allowed in this context.
You might need to install other software to open this address.
Can someone help me to resolve the problem. My browsers are Firefox and Chrome.
Thank you!
You can open a project (new if necessary) and import the asset using the Unity editor.
Unity3D is beta in Linux, does not work the schema to store.
I was having the same issue, but you should be able to get around this by opening the Asset Store in the Unity editor and downloading the asset from there
1.5 years later. I'm using Unity on Linux as well. The protocol is still not understood, but there's no Asset Store in Unity itself either (Window » Asset Store button does nothing). Unity will not recognise that here's a Unity Hub installed, even though it was installed by Unity Hub, and the My Assets window therefore only ever shows an error. It seems there's no way to get Assets into Unity on Linux.
If you are using a newer version of Unity, you can click Add to My assets on Browser Asset Store then install them via the Package Manager.
Open a New or Existing Project -> Window -> Package Manager, then by selecting "My Assets" in the source drop down will show all assets that you have added on the browser.

How to properly update Monogame with a Github PR

Heey,
I got a little problem. The current Monogame 3.2 build available hasn't got a working template for Windows Phone 8. This will result into a black screen and a non working app. So I went onto their git hub and found the issue https://github.com/mono/MonoGame/pull/2089 and someone who fixed it and posted a Pull request.
The problem now is I have close to zero experience with building my own version or editing project template files. I got some common knowledge and started to delve into this all and already tried copying the template files to my visual studio files and building projects and throwing around the new .DLL but it all doesn't want to work properly. I started to work with the older template but I need the new version due to proper support for landscape in windows phone 8 that we need to utilize for our game.
Now is my question if someone knows the right/proper way to do this. A short summing up from what to copy where will do.
Thanks in advance.
Okay it took me some time but I figured out what to copy,build,set and run.
You download the .Zip or make a pull with your Github into an empty folder and when finished extract it.
In the map open the MonoGame.Framework or MonoGame.Framework.”your
target platform” which will startup visual studio.
Build the solution/project (don’t forget to build in ARM, x86 and
x64 if enabled and needed) and navigate to “Extracted
folder”/MonoGame.Framework/bin/”your targeted platform” at the same
time open a new explorer and navigate to your MonoGame installation
by default C:\Program Files (x86)\MonoGame\v3.0
Navigate in your extracted folder to your targeted platform and
build and copy the MonoGame.Framework.dll to the opposing C:\Program
Files (x86)\MonoGame\v3.0\Assemblies\”targeted platform”\”build”
Rebuild your Project/Solution
Gratz you now updated your MonoGame :)
This could fix your problem but it’s possible that you still get an error when initializing your app on your phone or emulator DXGI related.
If this occurs then follow these steps. The problem lies probably by your SharpDX.WP8.dll how to fix this? In my case download and install the newest SharpDX http://sharpdx.org/download/ you could also look further how to only download the SharpDX.WP8.dll & .winmd!
Navigate to your SharpDX install (by default C:\Program Files
(x86)\SharpDX) navigate further to
Bin\DirectX11_1-“platform”-“build”\ and copy the SharpDX.WP8.dll and
.winmd to C:\Program Files
(x86)\MonoGame\v3.0\Assemblies\WindowsPhone\”build”
Rebuild your Project/Solution (if this still doesn't work you may
need to manually add the references again to SharpDX.WP8.winmd for
both builds)
So if it’s alright this should fix most issues but there is one left. Between MonoGame 3.0.x and 3.2 the project template of a windows phone game has changed but this didn't went well in the code. So we’re now going to update the project template of our Visual Studio.
Go back to your extracted Monogame map and head into the folder
“ProjectTemplates”\”your visual studio version”\WindowsPhone
Select all files and create a .Zip (could be done by the integrated
windows option “Send To”) make sure when you open the .Zip you will
immediately see all the files and they aren't nested into a folder
inside the .Zip
Navigate to C:\Users\”your PC name”\Documents\Visual Studio
201X\Templates\ProjectTemplates\Visual C#\MonoGame and copy your
just created .Zip and overwrite the existing file.
You may have to follow these steps if you use different version of Visual Studio because of the lack of support for XNA inside VS2013.
Now you should've fixed any possible problem. If your project still gives errors try to recreate a new one (this would now use the new updated template you just copy pasted and would work) If this still doesn't work than please post what goes wrong but this all should do! These instructions should also work for all other platforms (at least which you could build of course)
Pretty easy to do pull it in to your own version.
Follow these steps:
Fork the Monogame repository
Clone your version to your local machine
Find the repository of the fixed code.
In a command prompt, move to your MonoGame folder, and pull the changes in using this line on your machine. (the branch is most likely master)
git pull http://github.com/other/repo branch_name
Once you have the pull request pulled into your local branch, just build it using Visual Studio.
You can also follow these steps if you think you'll be doing this often.
https://help.github.com/articles/syncing-a-fork
For some reason MrME, I couldn't get your solution to work because of some missing SharpDX reference which REFUSED to be added manually. While your solution may be valid I would like to present an alternative if you have the patience to transfer the code to a Monogame 3.2 project and are still getting the black screen:
Set the DrawingSurface to a DrawingSurfaceBackgroundGrid in the GamePage.xaml. Full details are found in the commented explanation at the bottom of the GamePage.xaml file.
Source: https://github.com/mono/MonoGame/issues/2081

JavaFx 2 applicaton does not run when i run it through HTML page

I have downloaded the javafx 2 samples and want to run in from its HMTL. For example there is one javafx application called BrickBreaker. For the specific sample the following files exist : BrickBreaker.jar, BrickBreaker.jnlp and BrickBreaker.html
When double clicking on jar or jnlp the application runs as expected but when i click on the html the application does not run. Instead i get the message "View the conectes of the page. Please install javaFX"
Why is that happening ? ( i have the javafx installed as the application runs when choosing the jar and jnlp files). My guess is that the html should be called from within the context of a webserver meaning that i should deploy my application first to a server and call the url from my explorer. For example if using glassfish i should call the url http://localhost:8080/Brickbraker
The problem is that i don't know how to deploy the javafx application in the server.
i tried to copy paste all the above three files in the autodeploy folder but it didnt worked...
Could you please help me?
Thanks in advance
EDIT: some more info - I have installed JDK 7 and JavaFX SDK 2.0.2
No, JavaFX is client technology, you don't need Glassfish to run it. JavaFX should run in browser the same way as Java plugins do.
If you can't run an application directly from html file it means your browser doesn't recognize you have runtime installed.
There can be next reasons for that:
JavaFX runtime is actually not installed (check in Windows Control Panel)
pure java plugin is not installed (you can check on java.com)
javafx runtime is 32bit and you are using 64bit browser (or vice versa)
you are using not supported browser (e.g. Safari)
you are using not supported system (at this moment, January 2012, only Windows supports runtime)

package javax.ejb does not exist

I have opened a project in netbeans to view the project but there is a same error in most of the files. It says that "package javax.ejb does not exist". This is a working project and I am not sure what is wrong. Can anyone help me?
Try this first: http://forums.netbeans.org/topic44810.html
If that doesn't fix your problem, you can right click on your project and go to the properties section. Click on the Libraries section and select "Add Library". Then scroll down until you find the Libraries that start with "Java" (for example: Java EE 6 API Library). I add all of the Java libraries to my project to resolve this issue, however you might add them one at a time and see which one resolves it.
you just need to import Java EE Web 6 API Library to fix this issue, these libraries must be imported under the libraries folder:
right click Add library, click on import library, scroll down and look for Java EE Web 6 API Library, click on import library and finally click on add library.
That should fix any issues
In my case I was working with java with ant java web app, i was also using Java EE Version Java EE 6 web
I had the same problem when I tried to open a Java web service application and managed to resolve it after trying out a few things. For a Java web service application, there can be multiple causes to the problem. You may have "EJB and EAR" plugin already installed, however, Netbeans may not know the web server to use to run your application. It may have complained that "One or more projects do not have the target server set properly" when the project was opened. To resolve this problem, you have to assign a web server for the project. This is to be done not only for the main project, but also for the required projects that the main project may be dependent upon.
You first need to ensure that you have opened not just the main project, but also the required projects. To open the required projects, right-click on the main projects name in the main projects window and select Open Required Projects -> Open All Projects. After opening, the project names may be colored red in the project window to indicate problem.
In order to use a web server, you need to have one already installed. I chose Glassfish. Download and install Glassfish from https://glassfish.java.net/download.html, if you haven't done so. Also install the "Glassfish Server" plugin for Netbeans, if it's not already installed.
Now, in the Netbeans project window, right-click on the main project name and select "Resolve missing solver issue". If you see "Glassfish server" in the pop-up window that appears, select that one and click ok. If you don't see it, click "Add Server" then select "Glassfish Server", and setup the Glassfish server. Here you need to provide the installation directory of your Glassfish server, but I simply used the default values for the rest. Later I used username "admin" with blank password for running the project. Also perform the same steps to resolve the missing server for all of the required projects.