JavaFX missing from JDK 1.7/1.8 in Linux? - linux

I have a problem that allegedly isn't possible, so I'm having a heck of a time finding an answer.
I have the latest version of NetBeans 7.4, running on fully-updated Fedora 20 x64. Officially, this can work with JavaFX. Period. I have both the JDK from the repo (1.7.something) and the very latest version I could find (1.8.0). Officially, these have JavaFX with them. Period.
If I try to create a new JavaFX project, it has this to say:
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.
Well alright, I'm used to things getting confused, I think I can fix this. Go create a new platform, and... there's no "JavaFX" tab. It took a bit of research to even find out what it was talking about, and in the process I discovered that the tab has actually been removed from 7.4. Because NetBeans 7.4 will absolutely, definitely recognize JavaFX automatically. Period.
Going to the actual JavaFX site tells me, as expected, that it's bundled with the Java SE 7 JDK I already have. Period.
Since the end result I'm after could technically be achieved by integrating one JavaFX component into my Swing application, I attempted that, but NetBeans still can not find anything related to JavaFX and therefore yells at me if I try to import such a thing.
So, given that things that are supposed to just plain work just plain aren't... where can I go from here?

Currently in Debian and Ubuntu (probably others) JavaFX is a separate package from the OpenJDK (openjdk-8-jdk) and so needs to be installed:
sudo apt-get install libopenjfx-java libopenjfx-java-doc
Notable issue (this issue does not impact a Maven, JavaFX application so if that is your preferred build method then ignore the following issue):
If you try to create a new project:
Categories > JavaFX
Project > JavaFXApplication
You'll get:
Internal error. Missing resources [/resources/web-files/javafx-loading-100x100.gif]
/home/ken/NetBeansProjects/vestFxReports/nbproject/jfx-impl.xml:1465: The following error occurred while executing this line:
/home/ken/NetBeansProjects/vestFxReports/nbproject/jfx-impl.xml:3093: The following error occurred while executing this line:
/home/ken/NetBeansProjects/vestFxReports/nbproject/jfx-impl.xml:2055: Error: -includedt requires the java deployment toolkit, which is not included in this distribution
BUILD FAILED (total time: 1 second)
To fix the above error [following steps are derived from here: http://hongouru.blogspot.com.uy/2015/09/solved-error-building-new-project-using.html]:
Switch to the files tab (usually you're on the Project tab).
Expand the node for your project >
expand the nbproject node > open the "project.properties" file.
Find the line javafx.deploy.includeDT=true and change true to false.
Now you can create and run a JavaFX application, on OpenJDK.
Next steps, although beyond the issue at hand you'll probably at some point want to download the JavaFX scene builder: http://www.oracle.com/technetwork/java/javafxscenebuilder-1x-archive-2199384.html

Apparently, the issue is indeed a discrepancy between the open-source OpenJDK provided by most Linux distributions, and the proprietary Oracle JDK. Ironically, this is a well-known issue, but you have to specifically search for it to find it, and by then you already know.
The solution is to download the official Oracle JDK, and if necessary create the matching platform in NetBeans (located under /usr/java/jdk... at this moment). It should work perfectly fine after that.

Perhaps the official documentation
https://netbeans.org/kb/docs/java/nb_fx_screencast.html
https://netbeans.org/kb/72/java/javafx-setup.html
may help you to set it up

Related

Eclipse, Ubuntu - Eclipse IDE not starting (Well kinda)

I am very experienced with eclipse, using it since its Juno days, but today i have ran into one of the strangest bugs and want to know if any of you have had this bug and if you may have an answer as to how to fix it. (Or at least a work-around to getting my favorite IDE working again).
I recently updated to Ubuntu 16.04 (Xenial) and it seems nothing wants to work like it did when i had Wiley, namely eclipse. I used the installer to download the IDE and launched it and i got a strange issue where the IDE would load and ask for a workspace, but would then show a dialog box that is using the screen buffer as its data.
Screenshot with strange eclipse launch
I then thought that it may be an issue with the downloaded file (Corruption or something) so i downloaded the tar from eclipse.org directly. I extracted the tar and launched the eclipse executable and it loaded up and asked for a workspace again and began to launch, and finally it came up, the same old back buffered box.
So i got the idea to run it from the console and got this output, but i have no idea what it means. I saw no stack traces so im sure its fine (Again it may be a GTK error, so any ubuntu people this is where you come in)
Console Run with the same problem
I started to think it was my java version (Oracle JDK 9 for Linux)that was the problem so i did a test compile of the hello world program and everything was fine, it all worked.
(Would add screen shots but im new here so i dont have enough reputation to do so :( )
Any idea what it might be? Any help would be great!
I found the problem, i installed the latest version of java in the apt repository. This version was JDK9 which Eclipse does not support (At least not until Eclipse Oxygen). I purged the computerof JDK9 and installed JDK8 and everything worked fine!
Moral of the story, don't use JDK9 on Neon
I am running a dual boot windows 10 and Ubuntu 16.04, I have similar issue where I can see all the file menu and the eclipse launched on the tool bar, I have selected the application and used ctrl+WindowsKey+left,right to split the application to half of my screen and then magically it appeared,Then I adjusted to fit to my screen.
Would a fresh install work? I didn't have any issues. Perhaps ask this on ask ubuntu, too.

AndroidStudio update destroyed everything and I need help as to which way I should rebuild (details of fiasco within)

After this huge mess from one AndroidStudio update, am cleaning everything and starting from scratch.
I'd like to ask if anyone knows if I should go with specific versions of Java.
But first my headache, although I just cleaned my computer of AndroidStudio.
I have Win 10 64 bit
HAD AndroidStudio 1.51 (it said it was JRE:1.7.0_79-b15 amd64)
After the update I had a "Unsupported major.minor version 52.0" error
Following some posts I upgraded the Java on my machine.
First "1.8.0_74" but AndroidStudio couldn't find the JDK directory, so I installed "1.8.0_73" and AndroidStudio found the JDK directory. But then I started getting rendering errors but with Rendering Problems Exception raised during
rendering: com.android.ide.common.rendering.api.LayoutlibCallback.getXmlFileParser(Ljava/lang/String;)Lorg/xmlpull/v1/XmlPullParser;
Anyway, that's it. This has become such a tragedy that I would rather start from scratch, but if anyone could point me as to the proper (steps) of which way I should go, I would really appreciate it.
Thanks ahead,
Sergio
I met this issue when I updated the api android 23 N (preview). In xml editor, change the Api to render into Api 23 android 6.0 and Autimatically Pick best.This would solve the problem.
refer: link
Yes.. i also faced same problem,I have resolved with changing the version to api 23.generally it will take best/latest version ,in my case its set to N preview.

Eclipse Luna Not Working (Kali Linux)

Every time go to run the Linux Version of Eclipse Luna SR2, it just stops at the little Splash Screen (The window that comes up before you select your work space) and it just stays like that for about 30 seconds, and then closes. Any help please?
It generates this error log which is found Here
New Answer: This is a known bug and a workaround that has fixed the issue in at least one case is to run
export SWT_GTK3=0
before starting Eclipse. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=430736 for more information. If this workaround does not fix your issue make sure GTK3 is installed and upgrade glibc to at least version 2.14 to ensure Eclipse uses it. Apparently when Eclipse detects an older glibc it tries to use GTK2. If none of these suggestions fix your issue you should submit a bug report at http://bugreport.java.com/bugreport/crash.jsp to work it out with the Eclipse development team and also to help inform other people about it.
#ElectroMan - This got too long for a comment. Yes, the error log says the same thing. That means you are running Java 6, "JRE version: 6.0_34-b34" according to the log. I suggest you try running Java 8 or at least Java 7. Java SE 8u40 is the current release from Oracle and it can be downloaded for 64 bit Linux from a link on http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html. It is best to use the latest Oracle release and get away from the OpenJDK version, especially one that is two major releases outdated. However, if you opt for Java 7 its final release is available at http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html. You should be able to install either in a non-default location and keep OpenJDK 1.6.0_34 as your main version of Java on your platform. Eclipse can be configured to use Java 8 or 7 after it is installed by project or as its default for all new projects, but the main thing is to tell it to use Java 8 or 7 when it runs, since it is a Java application. Some instructions for this are at http://www.cs.umd.edu/eclipse/install_java8_luna.html. One of the main reasons for upgrading from Eclipse Kepler to Luna is to get built-in Java 8 support. Another option is to follow the instructions in the error log and file a bug report at http://www.cs.umd.edu/eclipse/install_java8_luna.html and wait for a reply. Or maybe there is already a new Luna update and you could try it.

Selected location does not represent a valid JavaFX Scene Builder installation

I have Netbeans 7.3 Beta 2 with latest Java 7 JDK on 32 bits, on Windows 8 Pro.
Problem: I removed Scene Builder 1.1 b07 and Installed the latest one b12, but now I can't set "Scene Builder Home" in Netbeans.
I get the following error:
"Selected location does not represent a valid JavaFX Scene Builder installation"
I tried pointing to all possible folders (Scene B. Folder, child folders, Oracle folder etc) (I know that it shouldn't be necessary).
The version before was OK and Netbeans detected it automatically.
I had Scene Builder 1.1 b07 before.
Now it doesn't want to be added into "Scene Builder Home" from Netbeans Options->Java->JavaFX.
That's quite annoying, because now I have to manually open each FXML from the source folder. Annoying.
I searched NetBeans bugs, but I didn't find anything. I wanted to add a new one, but I couldn't. Maybe because I already have 2 reported bugs.
Any suggestions?
I didn't remove and install NetBeans again, because I don't want to reimport the projects and configure it again just for this.
Edit:
I managed to report the bug. I had to delete the cookies from netbeans.org and log in again in order to be able to use the "report a bug" page. Let's hope for a quick fix. http://netbeans.org/bugzilla/show_bug.cgi?id=223994
It works flawlessly with the latest NetBeans 7.4, Java 7 JDK and SceneBuilder.
I assume it was a bug that was fixed. SceneBuilder 1.1 is a stable release now, which wasn't at that time, so this could be the explanation.
You Can use it outside of netbeans, I faced the same Error in Ubuntu linux. according to this bug you have to wait antil they fix it.
right now just use it outside of netbeans

Problems creating a Java Mobile Application project

I have installed the Netbeans 6.7 IDE with Java ME included, but cannot create a Mobile Application project from the Java ME category. When I select the project type the wizard stops at "Finding Feature" with the message:
Not all requested modules can be enabled:
[StandardModule:org.netbeans.modules.mobility.end2end.kig jarFile:C:\Program Files\NetBeans 6.7\mobility8\modules\org-netbeans-modules-mobility-end2end-kit.jar.
I am attempting to run this on Vista Home Premium. I have tried to run the IDE as Administrator with no luck.
I am at a loss for where to go next as I cannot seem to find any information regarding this issue. Even if you don't have the solution any insight into this error message would be helpful.
I am unable so far to get the project running via the Netbeans IDE install. I have, for the time being, installed the Java ME SDK which includes a very stripped down version of the Netbeans IDE for mobile development.
I originally had some issues starting the SDK as well on Vista. The IDE reported that it could not connect to the device manager on localhost. After some searching I found this link: Java ME SDK Startup Problem which suggests changing the hosts file localhost entry from IPv6 to IPv4. The fix worked perfectly and I can now compile and run code in the emulator.
This is not an optimal solution as the SDK does not include the visual design tools, however I am able to get a basic project going in the mean time.
I have given up on the 6.7 version and have instead located and installed 6.5.1. This previous version has been working just fine and seems to do everything I need.
I ran into the exact same error today while installing NB 6.8 beta. To resolve it we need to install two plugins:
Java Web Applications (as mentioned by Ali above) and
Sun Java System Web Server 7.0
Note that these two are part of the Category called "Java Web and EE" hence the confusion that we need to install Glassfish App Server. But we need these two plugins because they are required for debugging using breakpoints in emulator. Netbeans runs a web server when we do breakpoint based debugging.
Also note that the Java Web applications needs SOAP Web Services and JavaScript Debugger plugins to run and so these plugins are also installed when you try to install it.
You also need to install "Java Web Applications" plugin.
Tools->Plugins->Available Plugins
If the module is present, you should try unzipping it to check its content makes sense.
You should also be able to rebuild it from Netbeans sources.
You can also try to figure out why this happens by debugging the module loader inside Netbeans from its sources, using another IDE, presumably the latest version of Netbeans you can find without the issue.
If the module is missing, you might want to get the missing jar file from an installation of a previous version of Netbeans, see if it is compatible.
6.5.1 isn't missing any module.
back in version 5.5, the mobility module had to be downloaded and installed separately from the main IDE.
If you want to consider using Eclipse for developing your J2ME app...I've written a post related to that some time ago: here.

Resources