Control NetBeans Programmatically using a NetBeans Module - java

I know I should probably be using Eclipse but whatever...
Usualy at computer science contests I go to, we are given some sample data sets for the problems, such as "prob01.in, PizzaProblem.text, ect.". I am writing a NetBeans Module to make a project and then fill the project with java files of the input files, in the specified location.
So, on to my question. Is there any way to "control" NetBeans, and use it to make and open projects and files?
I did a breif google search and did not find anything useful.
Thanks,
-EpicDavi

http://wiki.netbeans.org/OpenProjectsProgramaticallyInNetBeansIDE#Tutorial_.7C_Open_Projects_Programatically_in_NetBeans
This page only tells you how to open a project programmatically in a Netbeans module, but it should set you on the right path. Unfortunately, I'm not well versed in NetBeans so I don't have much other insight to offer.

Related

Is there a way of comparing two open files without using package explorer/project/navigator?

For large projects I dont want to be manually finding files on the left- navigator/project-explorer or package explorer. It takes too much time if project has hundreds of files.
How can I compare two files that are open in editor?:
I looked up other answers and could not find what I need. This post shows how to do it using navigator (not what I need). How to compare two files in Eclipse?
UPDATE:
I do not want to be finding other file manually in project/navigator/whatever. Takes too long.
UPDATE2
AnyEdit eclipse plugin suggested by ngueno helps speeding up comparison.
Even though I still need to use side-bar/explorer it speeds up the work.
At the time of writing this post this problem was recognized by Eclipse community (https://bugs.eclipse.org/bugs/show_bug.cgi?id=224562).
Yes you can do that using the Eclipse, after installing the AnyEdit plugin (can be found on Eclipse Marketplace)
The plugin will show the following option:
This will show a selection dialog to you choose which editor you want to compare:
And after the selection:
There are a few discussion around this feature in the bugs 224562 and 39126, they also mention the AnyEdit workaround. It seems they did not have anyone from the community available to work on this improvement yet.

Plugins to add features to java

I'm working on a project that requires to add some features to an existing java application using Netbeans. After searching the net, i founded that I should use "plugins". I didn't hear of plugins before.
I have a java application that I should download it from the net, then lets say I have to add a button, when clicked, calls a function that is written in some class in the application. In other words I want to make a new class that is able to access the classes and functions that are written in this application.
What I understood from searching the net is that:
-In the downloaded project's folder there is a folder named plugins.
-This folder contains zip files that contains classes and other stuff.
-I should make a plugin and add it to this folder in order to add a specific feature to the application.
That's what I know, if there is something wrong in what I said, I'll be thankful to correct to me.
Now, my question is that I want a link or website that can teach me how to create and add a plugin to an existing java application. Thank you :)
That entirely depends on the java application you're talking about. Not every application has a Plugins functionality. And not every Java Application uses the same Plugin API. The best bet is to go to the site of the App you're talking about and see if they offer a documentation about their Plugin API.

Javafx SceneBuilder not shareable or derby not connecting in .exe

So I am a new programmer in my second term of Java programming. The term is over, but some of us students turned in our final projects only to find out when we gave over our projects some of the .jar files do not seem to follow the project.
We did all of our work in Netbeans because these were the rules and when using SceneBuilder things went wonky.
The solutions I'm looking for are:
How can I share this project with my teacher and have it work on a different machine than mine, (I did make this into a .exe file and .jar file, not a complete solution).
If number 1 can't be done, how do I get my derby database to work in the .exe file?
When the .exe file executes the GUI pops up and I have full functionality as I would when running in Netbeans. Cool right? Ehh. Only problem is the derby database does not get built as it should. Then the select statements do not get called, because there is no DB to connect to.
Any help would be amazing and if a solution for sharing the non .exe in Netbeans can work I think it will help my instructor also.
If your are using derby in an Make sure you have derby.jar in your class path. Am assuming you are using derby in an embedded environment if not please clarify. Make sure you connection path points to the location of your database

Writing Java from a Text Editor

As a project, I wanted to build a personal website using Java for the server-side code. I am very new to Java and wanted to know if it was possible to write Java using a simple text editor, upload the file into a file directory in Apache Tomcat where the corresponding JS and HTML file sits (for practice purposes only), and then run the web project through the HTML file.
I do this with php through LAMP all of the time, and was hoping Java might work that way as well.
Yes its very much possible. Even though you may find it bit difficult without the help of IDE, this should not make any difference. Convert the files to proper class files and upload it, that should do
Though i agree with above answer.But you can also go for hot deployment plugins for example mvn:jetty plugin for hot deployment of your website, but for that it needs to be maven project.Also grails and many other framework has this features inbuilt.

How do I include JavaHelp with my Eclipse project?

I am writing some applications that require to have a Help Contents system tied to it. I came across JavaHelp which seems perfect for what I need.
The issue I am having is that when you download JavaHelp, it comes with its own bin folder which looks like you are suppose to use separately. However, I am pretty sure if I just copy some of the JAR files I should be able to just place them in the hierarchy in my Eclipse and use it in the project.
What JAR(s) would I need to copy so I can use JavaHelp in my application?
Update
I got JavaHelp working rather easily. I had issues with the built in Eclipse Help though. But I appreciate both of your answers!
If anyone is interested in knowing how to add JavaHelp to your project (doesn't have to be Eclipse specific), I will be more than happy to provide the answer here.
The JavaHelp README details the redistributable jar files that are supplied in the download. Select the jar that suits your needs and add it to your Eclipse project.
While JavaHelp is a good api, Eclipse has its own api for help, and (IMO) it's a much better option for SWT based applications. See this developerworks article on developing help using the Eclipse help system.
If you're actually creating a swing application, and want to package java help with it, you'll need to create the help documents (help topics, helpset file, map file, TOC, index, full-text search db) and then package those files into a jar for distribution with your application. See the JavaHelp Users Guide for details.
For running the help viewer from the Eclipse IDE (and from your application at runtime), all you need is the jar file jhall.jar from the JavaHelp distribution.

Categories

Resources