I'm extremely new to development and running an IDE. I'm using NetBeans and I've searched for an answer so if this is answered somewhere else, please direct me.
I've seen it suggested elsewhere, and it sounded like a good idea so I'm trying to use ControlsFX, but I think I have done something incorrectly.
In my fxml document, I have:
<?import org.controlsfx.control.*?>
However, I'm getting an error:
"Package org.controlsfx.control does not exist."
I have downloaded the zip file from http://fxexperience.com/controlsfx/. I just don't know where to put it or unzip it, or do whatever needs to be done so that I can use it. Will someone point me in the right direction?
The option that worked for me was to import it as a library
Rightclick on your Project and select Properties
Go to Libraries
Click "Add Library..."
Click "Create..."
under the tabs "Classpath" and "Sources" add the controlsfx JAR
If you also want to see your new components in the javaFX Scenebuilder:
In the Scenebuilder: Navigate to Library at the top left corner. There should be a small wheel at the right of the search text field
Click that and select "JAR/FXML Manager"
Select "Add Lbrary/FXML from file system" and then just select the controlxfx jar.
Now it should prompt you to confirm the new components and you're ready to use them.
I did some more digging and found this: https://bitbucket.org/controlsfx/controlsfx/wiki/Contributing%20to%20ControlsFX#markdown-header-importing-into-ide
Importing into IDE
Netbeans
Make sure Gradle Support is installed
Choose File > Open Project and select ControlsFX root directory
Press Open Project button
In addition, I found out that you need to add the jar files from the ControlsFX project to the project's properties>>Libraries>>Compile Tab
Related
Eclipse IDE - Can someone please tell me how I can group my external .jar files into a C:\lib folder? I'd really like have them all in a lib folder and not taking up vertical space in the root of my project (see attachment).
I have read some of the similar posts here and tried them but my projects still are not 'seeing' the needed .jar files! It's very frustrating.
I know how to add a Folder but how do I tell Eclipse my .jar folders are in c:\lib so my projects will execute? I'm not even sure if making a lib folder in my project is even related to the fact that my jar files happen to be in c:\lib.
Thanks...
(source: msgVault.com)
From your description it sounds to me like you want the jars to stop taking up space in the root of your project. I am not sure how you initially added them but if I am adding external jars this is what I usually do:
Right click on your project, select properties, then Java Build Path, and then click the libraries tab, click on add external jars and then you can select each one individually (which would be a pain) or you can select them all at once if they are in the same folder (hence the c:/lib). Click OK and it should add them into a Referenced Libraries folder like so:
Also, when you open the libraries tab initially, if all of your jars show there, remove them before proceeding as you don't want to import them twice into your application (If that's even posssible, not sure).
Edit
Switch to Package explorer:
Click on Window > Show View > Package Explorer
Update
If you want to add c:\lib to your project do this:
Right click on your project, highlight build path, click Add Libraries..., in the list select User Library, click Next, click User Libraries... on the right. A new window will open. Click New... and then give the library a name such as "clibs". Click OK and then highlight the new library and click add external jars. Select the jars you want from c:/lib and then click OK. Now you can add that User library to any application you want and it will not "pile" up in the root directory under Project View.
That is just eclipse's way of displaying what libraries are on the build path of the project. It doesn't mean that they are on the root of the project, those are just references to those jars ( that maybe any-where on the system ).
A good practice is to get all the jars required by your project and put them in a folder. Next, you can either declare that folder as a library from eclipse and add that library on your build-path or you can just add the jars directly. But they will still be displayed like you are seeing them already. The true path of where these jars are located will be written next to them (like you can see in the attachment C:\selenium....).
I create a simple Maven project in eclipse using m2elipse plugin, then I revise the pom.xml to what I need and save it. After the rebuilding of the project, there's a red cross on my project's icon, but with no red cross anywhere else in this project. According to my experience, this is caused by the java building path or library reference, so how can I find this out? because the library reference is auto produced by maven. Thanks a lot!
To see the listing of all errors and warnings, open the problems view.
You must upgrade the m2e connector. It's a known bug, but there is a solution
Into Eclipse click "Help" > "Install new Software..."
Appears a window. In the "Install" windows:
2a. Into the input box "Work with", enter next site location and press Enter https://download.eclipse.org/m2e-wtp/releases/1.4/
2b. Appears a lot of information into "Name" input box. Select all the items
2c. Click the "Next" button.
Finish the installation and restart Eclipse.
The root cause here is maven connector, you need to upgrade the connector.
Here how you can open the Problem View which is highlighted by another user #konstantin in his answer.
Select the pom.xml which is having the red cross on it and open this.
and then you will be able to see it like below
Current setup:
MainProject which is a Library Project
BranchProject which is a new projects and has MainProject as a Reference
Whenever I debug and a file from MainProject is on focus (actually BranchProject has only graphic and xml layout changes) the Debug window opens a .class file which is read only. I want it to open the .java file so I can edit it directly.
Skyler's answer from this post worked for me:
Opening source code from debug view edits .class after Android R18 update
Here is a summary:
The fix is to right click the Project name in the debug view, and select "Edit Source Lookup..." from the menu. From there, remove the Default lookup path. After that, manually add the associated projects (not jars) that your project references. This is done by clicking Add, selecting Java Project, then checking the appropriate projects.
When you're using a Library project one of the things you're in fact doing is compiling your Library project into a jar and then referencing that jar in your calling Project.
If you right click the Project, and select "Configure Build Path" you'll see a tab called "Libraries", if you look inside "Android Dependencies" you'll notice a list of jar's corresponding to your Library projects.
These jars are expandable, showing you that they have a slot for a source attachment. Usually this would be editable allowing you to directly link the source but in terms of ADT these are already filled and are uneditable.
When debugging these files you're linked to a read-only class file with this attached source. This is because you're not running against source files directly, you're running against a pre-compiled class file. Until the ADT team get this functionality in place, you're pretty much forced to jump to the direct source code and rebuild everything.
EDIT
See #Steven linked answer :)
I faced the same issue while debugging the a .java file using Eclipse IDE. As per my understanding this issue comes when we put the xyz.class file of xyz.java file or JAR at the project build path. Delete the .class or JAR file from the project class path and rerun .java file in the debug mode. This time you see a source not found window. Click on "Source not found" button and check "Find duplicates..." at the bottom of the window. Done your problem is solved :)
The problem is that the class file is preferred over the java (by default), here is how you can change that for Eclipse (tested on NEON 2):
Right-click on the Project in the Project-Explorer, click Properties
On the new window select: Run/Debug Settings
Create a new configuration (or duplicate another one)
Select the new config and click Edit...
Go to the tab Source
Select the Default and Remove
Create a new path with Add..., select Java Library, then JRE System Library
Create a new path with Add..., select the location where the sourcecode is by Workspace folder (if it is a project in the same workspace) or File System directory (it it is not)
I think this depends on, how you set up the dependency in eclipse. You should set up your BranchProject to depend on the source-Files of your MainProject. If you depend on compiles Class-Files is obvious that the debugger opens the class files, because it does not know about the source files.
I found a good solution for me here:
Using Android library in eclipse and jumping to class files instead of source file that is within eclipse workspace
Simply, select each library project your project depends on, and use Top or Up to move it above the projects outputs. Eg. move all library projects to the top.
Open main project properties -> Java Build Path -> Projects tab and add there projects the main project depend on.
Switch to Order and Export tab and uncheck Android Dependencies
Enjoy
If you tried all above hints and it still doesn't work try this solution, it worked form me:
Right-click on the Project in the Package-Explorer, click Build Path -> Configure Build Path...
Select tab Order and Export
select library that you can't reach code and then click on button Bottom
Then click on Apply and Close
hope this can help you
Most of the time it happens when specific source folder are not added in build path Sources tab.
Right-click on the Project in the Package-Explorer, click Build Path -> Configure Build Path -> Source Tab
Add the source folder if your project source folder is not there.
Select Add folder -> select your project source folder specifically. Eg: project_name/src . Then Apply it and restart server.
I recently installed Hadoop and am able to run simple programs.
However I would like to view documentation for Hadoop classes within Javadoc browser in Eclipse.
Please let me know how to enable that (I am a little novice with Eclipse IDE).
Thanks.
A couple of suggestions:
If you're using maven for your dependency management, you should be able to expand out the list of Maven dependencies in your Eclipse project, right click the hadoop-core-x.x.x.jar and select Maven -> Download Javadocs
Otherwise you'll need to source the Javadocs from the $HADOOP_HOME/docs/api folder and associated with your hadoop-core-x.x.x.jar in Eclipse. In Eclipse, right click your Java project and select Build Path -> Configure Build Path. Now click the Libraries tab and locate the entry for hadoop-core-x.x.x.jar. Expand the entry to show options for Source, Javadoc etc locations and click the Javadoc location entry. Now click the Edit button to the right and enter the location as the path $HADOOP_HOME/docs/api in the Javadoc URL text box (mine is file:/opt/hadoop/hadoop-1.0.2/docs/api/)
Either way now you should be able to hover over Hadoop classes in Eclipse and the Javadoc will popup. You can also show the Javadoc window that will populate for the class you are currently viewing, or just open an internal browser window and point it at the $HADOOP_HOME/docs/api/index.html file
Another easy solution for those who want to stay updated is to edit the Javadocs path like Chris said:
"In Eclipse, right click your Java project and select Build Path -> Configure Build Path. Now click the Libraries tab and locate the entry for hadoop-core-x.x.x.jar. Expand the entry to show options for Source, Javadoc etc locations and click the Javadoc location entry. Now click the Edit button to the right and enter the location as the path"
but instead of linking it directly to the api you have stored on your hard disk, link it to http://hadoop.apache.org/docs/stable/api/
I've recently started using netbeans for a few hobby projects. I've come from a JDeveloper background and I'm used to been able to see my ant build file from the project explorer window.
In JDeveloper this has the advantage of allowing you to right click on it, allow easy edits, or run a required target when you want to.
The only way I can seem to do this in netbeans is to open up the build.xml file, right click and select my target and run it.
Hope everyone is still with me.
I guess the build, compile, test, clean options you get in the project menu when you right click on a project are wired automagically to the ant targets. But I tried to create a new target and see if it was displayed in the normal project menu, and its not.
Does anyone know why Netbeans doesn't include the build.xml file in the project structure or whether it can be included in the project explorer display easily.
Kris
It sounds like you want to switch to the Files view. You can find the build.xml file in that view easily. If you right click on the file, you get a menu that includes items like 'Run Target' and 'Debug Target'.
If you want to have even more control over the mapping between menu items and ant targets, you should explore the Java Free-Form Project type.
Go to Files tab, find your build.xml, expand all targets, right click on the target you want to add and choose between the options provided.