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.
Related
i got a web project.i used gof[struts,hibernate,spring,.,.]pattern. actually i not good in struts so my friend taking care of the struts part.well, the problem is ,*
how to merge our project and
we both want to see our code every time whatever the change happen
* .bec we are beginners
You may want to actually keep your project split in modules and use a Code Versioning System(CVS). At the moment, most popular/used are Git and SVN. If you don't have a server, you can use BitBucket to host your code in private or GitHub/Google Code if you want to open source it.
Use SVN or CSV if you have server. other wise you can use online Repository like GitHub.
I'm trying to read pdf files in my android application. I don't want to use the default pdf reader and simply open a new intent because I need my own GUI, and want to use the first page as a cover. Therefore I need to make my own pdf reader. I did some research and came across muPDF and Android PDF Viewer Library.
I tried to follow tutorial to implement Android PDF Viewer Library, from the github description. But the problem is that it loads pdf file forever. Do I need to do something else than just the steps in the description?
I can't find any tutorials for the muPDF library, are there any? How to implement it?
If there is no useful answer for the previous two questions, are there any good pdf library out there with tutorials and good documentation?
Thank you, hopefully, I will be able to solve my problem
MuPDF is a very good library, you can definitely use it. If you need a complete example of Android app using MuPDF, I suggest you to take a look at this customizable magazine app on Github.
first of all, if you want to use MUPDF inside an existing android app project you can follow the guide you find at this link (all credits go to the author, I didn't write this).
I am trying as well to integrate a very simple PDF reading/printing solution inside my app and i am struggling to strip down/simplify the MuPdf application demo you get by following that guide. I already managed (somehow) to remove annotation and file-picking features, but i would really need some help as well to get all the job done. There's really a lot of stuff and absolutely no documentation about this. I am simply trying to read the code and figure out what is needed and what is not, removing features one by one and being driven by the errors you get in catlog.
Also, as we both (if I understood correctly your needs) need just the PDF rendering features, would be great if someone points out how to (if possible) disable some of the unnecessary features built in the MuPDF library when building it from source (as DjVu support, just as an example).
Hope this helps, even if it is not a real answer to your question.
This is how I succeeded in building a MuPDF lib on windows with Cygwin, android-ndk
Download MuPDF 1.3 Source from https://code.google.com/p/mupdf/downloads/list
unzip to folder c:/mupdf-1.3-source
Install Cygwin:
Download and run Run setup-x86.exe from http://cygwin.com/install.html
when installing cygwin, make sure you selected make packages and C++ compilers
Make generate. open cygwin terminal, run
cd /cygdrive/
cd c/mupdf-1.3-source
make generate
Install android-ndk:
download android-ndk-r9d-windows-x86.zip and unzip it to
c:/android-ndk-r9d
Build mupdf lib: on windows cmd console:
preparation:
cd c:/mupdf-1.3-source/platform/android
copy local.properties.sample local.properties
edit local.properties, uncomment
#sdk.dir=C:\\Program Files (x86)\\Android\\android-sdk
and change to
sdk.dir=REAL andforid-sdk Folder
build:
while still on c:/mupdf-1.3-source/platform/android, run:
/android-ndk-r9d/ndk-build
Upon the completion of the build, a folder named libs will be created under
c:/mupdf-1.3-source/platform/android
Create android apk.
Open eclipse, create a new android project from existing code, browse to c:/mupdf-1.3-source/platform/android, now you can create a mupdf apk.
Starting with Android 5.0 you can also use Android's internal PDF renderer and for manipulating PDF you can always use iTextg - just some alternatives for the future.
This SO answer lists some steps on how to rip essential pieces from the MuPDF Java sample app to one's own.
Preferably, I'd like to have a "ready to use" Java library I could attach to as a dependency. Is JNI preventing this or is it simply that no-one's gotten up to doing one?
Well, jmupdf is there (mentioned in this duplicate) but that lists Windows and Linux (not specifically Android) as the tested platforms. It seems desktop and dead to me (no changes in 12 months). At least compared to the vibrance of MuPDF itself.
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.
I'm just starting out on Android and Java programming, coming in from a C++ background. I was wondering - whats the best way to go about making a library/UI widget/component that I can license to third-party developers?
In C++ I'd ship the customers my headers and *.a files, but I don't know the equivalent in Java.
Are there any good resources or links about this, maybe even from general Java development standpoint.
you can define activities/services that are available for any other application running on android:
"A central feature of Android is that one application can make use of elements of other applications (provided those applications permit it). For example, if your application needs to display a scrolling list of images and another application has developed a suitable scroller and made it available to others, you can call upon that scroller to do the work, rather than develop your own. "
http://developer.android.com/guide/topics/fundamentals.html
Activities and services have some use but there is a whole class of functionality (fancy table viewer for sql) that isn't covered. You can do jars but I don't think you can have android resources in that file. The work around would be to have a Jar and require the user to copy and paste some text into the apps resource directory. You can look at the admob.com android SDK for an example of this.
Not sure about how Android handles this, but the typical distribution of Java code is a .jar file. A .jar is basically a zip file containing all of the compiled .class files in a Java project. There might also be resource/text/etc. files within the .jar. There is no concept of a header file in Java, so all you need are the .class files, and possibly a manifest file to provide some additional meta info about the .jar.
http://java.sun.com/docs/books/tutorial/deployment/jar/
(This is just a general Java answer, it may or may not apply to Android)
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.