JFXtras and Netbeans compiler issue - netbeans

Would somebody be able to walk me through the proper way of adding the latest JFXtras package to a project in Netbeans? I'm not sure what I'm doing wrong... whether it be importing incorrectly, implementing incorrectly, or just simply downloading the wrong jar files. I'm using JavaFX 1.3 and NetBeans 6.9.
I've been able to get NetBeans to recognize the components in the library (I type XCustomNode, and it prompts me to import from org.​jfxtras.​scene.) Upon trying to build/run, however, I get a compiler error such as the following:
Note: An internal error has occurred in the OpenJFX compiler. Please file a bug at the Openjfx-compiler issues home (https://openjfx-compiler.dev.java.net/Issues) after checking for duplicates. Include in your report:
- the following diagnostics
- file C:\Documents and Settings\me\Local Settings\Temp\javafx_err_4220242024568343160.txt
- and if possible, the source file which triggered this problem. Thank you. C:\Documents and Settings\me\My Documents\NetBeansProjects\project\src\input\NumberWithLabelNode.fx:24: cannot access com.sun.javafx.runtime.location.ObjectVariable class file for com.sun.javafx.runtime.location.ObjectVariable not found public class NumberWithLabelNode extends XCustomNode { 1 error
I don't think I really need to go report this to Openjfx... my gut says I'm missing a file.

Not sure what version of JFXtras you're using, but I've had much better success with version 0.7rc alongside JavaFX 1.3.
In addition to making sure Common and Controls jars in in your library, I've had to add miglayout-3.7.jar and swing-worker-1.2.jar as well, available on the project downloads page

The problem you are facing is incorrect version of library. You are trying to use JFXtras compiled with JavaFX 1.2.* and your project is using JavaFX 1.3.. As you can learn on official site, JavaFX is not backward compatible yet. Get newer library or rebuild sources with JavaFX 1.3.

Related

How to get Eclipse Compiler for Java batch package 4.5.2+

Version 4.5.1 is the last one available from central - http://mvnrepository.com/artifact/org.eclipse.jdt.core.compiler/ecj/4.5.1
Unfortunately there is a nasty bug, which was fixed only in 4.5.2.
I cannot seem to find a binary package anywhere. I tried building it from sources but failed (details below). What is the recommended way to obtain 4.5.2 binary?
I tried https://github.com/eclipse/eclipse.jdt.core but it doesn't have any relevant tags.
I tried building the tag R4_5_2 from https://git.eclipse.org/c/jdt/eclipse.jdt.core.git/tag/?h=R4_5_2
Suprisingly it still has a snapshot version 4.5.2-SNAPSHOT and requires a parent of the same version. I can try building the parent project, but I'd expect it to be already available in some repository etc. Before proceeding I'd like at least to know if this path is going to lead anywhere.
Finally I came across Project Tycho but I think this is only relevant if I'm creating a new plugin.
I've found one here by random googling: http://download.eclipse.org/eclipse/downloads/drops4/R-4.5.2-201602121500/#JDTCORE
However the timestamp is different than what I get in my Eclipse Mars. Here it's 20160212-1500 and in Eclipse I have 20160128-0629

JAR file not found during build in Netbeans

hello i am trying to run java jsp/servlet application using netbeans but i am getting error message it say
C:\Users\isslam\Desktop\jsp2_allfiles\servlet_jsp\netbeans\book_apps\musicStore\nbproject\build-impl.xml:1009 Warning: Could not find file C:\Users\isslam\Desktop\jsp2_allfiles\Program Files\NetBeans 6.0 M9\enterprise4\modules\ext\standard.jar to copy.
BUILD FAILED (total time: 0 seconds)
I downloaded the standard.jar but i am not sure if it is the right one and i added it to the Libraries and still giving me the same error. the path he is giving me is not real path i can not find it in fact it is kind of wrong
I know this question is almost a year old, but I had the same problem and fixed it so I thought I'd chime in.
It looks like you're using Murach's Java Servlets and JSP exercise files, which is what I'm using too. Well, those are kind of old and include some old libraries.
To resolve the issue, open your project in Netbeans. Right click on it and select properties. Select libraries. You should see a JSTL library that is outdated. Remove it from the project. Now add the updated JSTL library by clicking Add Library and selecting the new JSTL library.

google-api-client-java eclipse build path and google app engine

I am trying to follow the instructions here:
http://android-developers.blogspot.ca/2013/01/verifying-back-end-calls-from-android.html
I have decided to download the google-api-java-client library and see if I can instantiate the code on the bottom half of the page referenced above. I have imported libraries in eclipse in my app engine project so that eclipse doesn't complain about anything BUT when I try this:
GoogleIdToken token = GoogleIdToken.parse(mJFactory, tokenString);
eclipse complains with red underlining on 'GoogleIdToken.parse()' and this text
The project was not built since its build path is incomplete. Cannot find the class file for com.google.api.client.auth.jsontoken.JsonWebSignature. Fix the build path then try building this project
and
The type com.google.api.client.auth.jsontoken.JsonWebSignature cannot be resolved. It is indirectly referenced from required .class files
I have gone to this site and have followed the instructions as closely as I can, but the error remains.
http://code.google.com/p/google-api-java-client/wiki/Setup#Download_Library_with_Dependencies
can anyone tell me how to get rid of this error?
see this link:
http://code.google.com/p/google-api-java-client/
The jars with version 1.12.0-beta were not working for me, (as described above) but 1.13.2-beta was released and seems to work fine.
BTW, I was willing to try anything, including different versions of eclipse and wiping my eclipse workspace metadata. I even tried older versions of the google api library, which actually worked. I was going to go with 1.9, but I found out the last one (1.13) had some useful options that I wanted to take advantage of. 1.13.2-beta got rid of the eclipse errors for me.

Eclipse RCP- org.eclipse.ui.plugin missing

I've written an Eclipse RCP application that runs fine in Eclipse, however, packaging it to be a standalone application has been tricky. I've worked my way though a few class path errors, but now I'm getting a new one.
After running the export wizard and launching my application, it throws a ClassDefError and ClassNotFoundException, specifically it's looking for org.eclipse.ui.plugin.AbstractUIPlugin. I did not find this in my copy of the eclipse SDK, and I downloaded the SDK again to be sure, and still couldn't find it. I found a jar online that supposedly contained the fiel along with some other eclipse packages, however, I then got this:
NoSuchMethodError: org.eclipse.ui.plugin.AbstractUIPlugin: method ()V not found
I figure the problem is more I did something wrong rather than this class is actually missing, but I've gone though all the configurations and I'm sure all the required packages and dependencies are included. Any ideas?
Download and install the new version of adt plugin 21.0.0.
Does your application works when you run from Eclipse? If so then try to open your plugin.xml, go to Runtime and on the bottom right part of the window you should see Classpath. Try adding the required plugins there.

How to use Scala in IntelliJ IDEA (or: why is it so difficult to get a working IDE for Scala)?

I recently gave up trying to use Scala in Eclipse (basic stuff like completion doesn't work). So now I'm trying IntelliJ. I'm not getting very far.
I've been able to edit programs (within syntax highlighting and completion... yay!). But I'm unable to run even the simplest "Hello World". This was the original error:
Scala signature Predef has wrong version
Expected 5.0
found: 4.1 in .... scala-library.jar
But that was yesterday with IDEA 9.0.1. See below...
UPDATE
Today I uninstalled IntelliJ 9.0.1, and installed 9.0.2 Early Availability, with the 4/14 stable version of the Scala plug-in.
Then I setup a project from scratch through the wizards:
new project from scratch
JDK is 1.6.u20
accept the default (project) instead of global / module
accept the download of Scala 2.8.0beta1 into project's lib folder
Created a new class:
object hello {
def main(args: Array[String]) {
println("hello: " + args);
}
}
For my efforts, I now have a brand-new error :)
Here it is:
Scalac internal error: class java.lang.ClassNotFoundException [java.net.URLClassLoader$1.run(URLClassLoader.java:202), java.security.AccessController.doPrivileged(Native Method), java.net.URLClassLoader.findClass(URLClassLoader.java:190), java.lang.ClassLoader.loadClass(ClassLoader.java:307), sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301), java.lang.ClassLoader.loadClass(ClassLoader.java:248), java.lang.Class.forName0(Native Method), java.lang.Class.forName(Class.java:169), org.jetbrains.plugins.scala.compiler.rt.ScalacRunner.main(ScalacRunner.java:72)]
FINAL UPDATE
I uninstalled 9.0.2 EA and reinstalled 9.0.1, but this time went with the 2.7.3 version of Scala rather than the default 2.7.6, because 2.7.3 is the one shown in the screen-shots at the IntelliJ website (I guess the screen-shots prove that they actually tested this version!). Now everything works!!!
I have encountered the same scalac error when trying to run a Scala project in Intellij Idea 9.0.2 and I've managed to find a solution by chance :). These are the steps I took in creating the project and running it.
I have created a Scala project in Intellij Idea 9.0.2 final (it was released today). I have installed the Scala plugin, restarted the IDE and created a new Scala project (with the name "TestScala") with scala-2.8.0.Beta1 as project library. Once the project is created and the scala libraries downloaded, I have created a Test.scala file with the following content:
object Test {
def main(args:Array[String]){
println("hello")
}
}
After that, I created a launch configuration ("Edit Configurations"), choosing the "Application" template. I set as main class Test and choose the project name ("TestScala") in the "Use classpath and JDK of module" combo box. When I run the configuration I get the same error as you reported ("Scalac internal error: class java.lang.ClassNotFoundException") .
Now comes the freaky part :). I right click on the project, choose "Module Settings", have a look on all settings but I don't change anything . Click "apply" and "ok", try to run configuration again and it works :) .
I use Intellij Idea 9.0.2 the final release (build 95-66); Ubuntu 9.10 and JDK 1.6.0_18. I also have to mention that I had a JDK configured in Intellij, otherwise there is an extra step to configure it.
UPDATE:
When checking the setting of the module, one needs to click on the Module->Scala and Facets->Scala (expand it and click on Scala(ProjectName)) . Both of these settings are about the scala compiler and scala library location. I would guess these values are not properly set when the project is created but are saved once the user touches them and saves the settings.
To answer your question, it's difficult to get a working IDE for Scala for two reasons:
(a) Scala is only just beginning to reach a wide audience and
(b) due to (a), there is no business case for spending time on a Scala IDE.
Also, if you are old enough to cast your mind back and young enough to still remember, you would know that for the first five or more years of Java, we were stuck with okay-ish tools like JBuilder that did little more than compile your code when you said so - no error highlighting, no auto-importing, and the word refactoring didn't even exist. If you want to pioneer, you need to be prepared to cut some of the road yourself, or at least bush-bash.
I know it won't help you, but I have successfully used IDEA for Scala on Linux, Mac and Windows. I typically have the Scala SDK installed somewhere locally and point IDEA at that rather than using the 'download' option.
Presently, I am mostly using an EAP version of IDEA 9 on Mac OS X with Scala 2.8.0.Beta1-RC5 and it's working well (except that fsc doesn't seem to worked with mixed sources).
You could try your luck over at the IDEA Scala Plugin Discussion Forum, though I haven't had a great lot of responses to my own postings there.
Installing the plug-in is prerequisite one.
The next thing you should do is define a library (global or project-specific; I use global) that holds the Scala library and compiler JAR files (at a minimum, that's scala-compiler.jar and scala-library.jar). Adding source JARs and a documentation JAR or URLs is a good idea, too. Then make this library a dependency of any modules in your project that include Scala code.
Lastly, find the Scala facets in those modules and de-select both check-boxes there.
I just did a fresh install and had exactly this same problem myself.
It turned out that, because I had created the file in the root package, IDEA had added a package statement at the top with naming a package. I assume that this then got compiled as "package object Main" - valid syntax in 2.8? Anyway, I deleted the line that said package and it all worked fine.
I had the same problem yesterday while trying to set it up. Solution is pretty simple, you just have to set scala somewhere in project settings.
You are mixing code compiled with two different Scala versions.
I use Netbeans to write scala programs. So far it works very well with my codes. You can try the plugin here: http://wiki.netbeans.org/Scala68v1.
I was getting this error and also had to right click on the project and "Open Module Settings". However, it was more than just hitting apply. I had to make sure that my Content Root was correct for each project. For some reason, there were some incorrect Source and Test Folders.
My project uses maven as the main build tool and importing the project into Intellij is probably what created these incorrect settings.
I had similar problem, following this blog post instructions solved the problem for me