java apache poi importing into netbeans 6.9 - java

i downloaded apache.poi-src-3.7-20101029.zip and i want to use this package in my java application using netbeans 6.9 to get use of doc files.
How to configure that zip file into netbeans to get use of the package into java application

Go to Projects...Select your Project...Right click on Properties->Libraries. Under Compile Tab Click Add. Browse to your zip and add it. Done! If your library is a Run time library [Which I think it isn't] you need to add it under the Run tab.

Related

how to untie Java EE tutorial examples from NetBeans and use them with Eclipse?

I am trying to go through the Java EE 6 Tutorial samples with Eclipse.
It seems it will be very hard.
I just started.
I found the Hello and Hello1 samples cannot be used in Eclipse directly.
Other than these NetBeans specific files/folders,
the java files are under "src/java/" folder but the "java" folder is NOT a package name. Eclipse doesn't like this structure.
Is there an easy way to convert these samples to be usable with Eclipse?
Are there any other Java EE sample sets can be used in Eclipse?
Install Maven plugin for eclipse (ME2Eclipse) or use an Eclipse version, which already contains the plugin like Eclipse for Java EE Developers.
Then import the hello1 example as existing maven project.
In Eclipse you can build and deploy the project with Run maven install.
If you don't use maven, you have to set the source folder in Java Build path as mentioned from DwB in the post before.
A detailed description for your first project you will have in the Firstcup example installed with the glassfish server.
Eclipse does not care which folder is used for the java source;
however, you will have to tell eclipse which folder to use by choosing the source folders in the project properties!Java Build Path!Source tab
(open project properties, select the Java Build path option on the left side, select the Source tab).

Netbeans Where is my Library JAR/Folder that I have added

I have added a jar named freetts in Libraries in my Project, I copied the whole netbeans java project to another system but I could not compile it as the freetts library was missing there. So how do I locate the library on disk so that I can copy it to the system I have copied the project to.
Right click on the folder/JAR and click on edit
and in there you will be able to see where the folder/JAR is located on your disk

WebService Client in Java with jax-rpc

I need to use jax-rpc in a project using the Eclipse IDE. The problem is that I don't know what JDK to use because when I write:
import javax.xml.rpc;
or
import javax.xml.rpc.Stub;
I get an error error telling me Eclipse IDE can not find it in the library.
I downloaded the JDK 7 and JDK 6, but neither solves it.
There is a Jax-ws library but, I know I need to use jax-rpc.
It seems like you didnt add the library in the project. please add rpc jar in the project. RPC is older version of webservice for the tutorial you cans use http://docs.oracle.com/javaee/1.4/tutorial/doc/JAXRPC3.html. You can also use apache axis which more better than the rpc style of webservice.
open www.google.com
write "download javax.xml.rpc library"
download jar file.
Place the jar file in plugin folder of eclipse.
Right click on your java project->Build path->Add library-> browse the jar from plugin folder.

Adding downloaded .js file to existing Project in Netbeans

I have downloaded a .js file to use in my Java Webservice-Project. I have using Netbeans as the development IDE. I understand how to create a new JavaScript file as described here.
However, I am not sure how to add a downloaded file to the existing project structure. I can create a .js file and copy paste the content, but was wondering if it is possible to directly add it. I remember doing similar things on Visual Studio, where we can import existing files by using "Add existing item". I am wondering if similar thing is available on NetBeans.
I'm using NetBeans in ubuntu and you can just copy the js file into your project folder. You don't need to import or anything like that.

Google web toolkit with Netbeans?

I prefer to use Netbeans as my IDE rather than Eclipse. A few years ago when I looked into Google Web toolkit, there was no good Netbeans plugin for GWT and everyone suggested to use Eclipse. How is the situation now? Is there any better plugin on the market, or is Eclipse the best option?
I prefer Netbeans over Eclipse too. To develop for GWT, I used the following setup steps without installing gwt4nb plugin. Since I use an IDE for code analysis and editing help only, and feel quite comfortable manipulating files and directories in the source tree directly. Though this may not fit your case, I guess for many developers the steps should be good enough because you can treat gwt development just a normal java project.
Install JDK, NetBeans-SE. Extract gwt package. I have a note for gwt-1.7.1. If running on a windows 64bit version, install 64bit netbeans and jdk, and also a 32 bit JRE.
Copy the Hello sample from gwt directory to a directory out of gwt package directory. Create a project of existing java source code, and put the project under the same Hello directory. Then netbeans will create two files in the Hello directory: nbbuild.xml and manifest.mf, and create its own nbproject directory under Hello. I simply ignore these files.
In netbeans "Projects" window, right click on "Libraries" and choose "Add JAR" to add the jar files from the gwt directory.
In netbeans "Files" window (not the "Projects" window), you will see the original "build.xml" file that comes with the Hello sample. Edit this file so the "gwt.sdk" points to the location of gwt package directory. On windows 64bit, also add a "jvm" property under "java" task. It shall look like (only jvm=... is newly added):
<target name="hosted" depends="javac" description="Run hosted mode">
<java failonerror="true" fork="true" classname="com.google.gwt.dev.HostedMode"
jvm="C:\\Users\\youhere\\Programs\\jre6.32\\bin\\java">
<classpath>
Use "Files" window, click to expand "build.xml" file node. Then right click on "hosted" ant target under "build.xml" and choose "Run Target" in the context menu to build and run the hosted mode.
The ant targets from "build.xml" you usually use:
"build": Use this to build the javascript.
"hosted": Use this to build java and start hosted server and browser.
Once the hosted server is started, you can run "build" target to build the javascript and to have the result served by the running hosted server immediately without restarting the server. Use your normal browser to see the javascript version at "localhost:8888". You can set a different port by editing the "build.xml" file.
Usually I copy the Hello sample to a different directory, and use that as a start point of a new project. After that manually edit the files to match the project naming and directory structure.
I also copy the other samples from gwt package to a new directory, then build and run them to use that as a code reference. If you want to also develop the servlet, take a look at the servlet of DynaTable sample and create or copy the files into the same directory structure in your project.
A note about gwt4nb plugin: I installed it but figured out it is too heavy weight for me. With the above manual setup, I can do everything that I need to without any difficulty.
I would say Eclipse is the best free option. Intellij IDEA (paid edition) has also good GWT support but it is not as good as Eclipse.
I think the only official support goes for eclipse, see here : https://developers.google.com/web-toolkit/download
Based on my personal experience, if you want to have a good integration between GWT and your IDE, go for Eclipse. If you intend to use Maven, I also suggest M2E http://m2eclipse.codehaus.org/
EDIT
Forgot to say the most important thing. Netbeans by the way, seems to have a nice support of GWT but I never tested, see : http://netbeans.org/kb/docs/web/quickstart-webapps-gwt.html
I am sure this is not the correct and suitable answer. But if you like to trade off, this is just an idea.
sudo -i
cd ~/gwt
./projectCreator -ant build -out projects/myapplication
./applicationCreator -out projects/myapplication myapplication.client.MyApp
Then, you can import the project ...
In Netbeans create a new projects and choose 'Java Project With
Existing Ant Script',
Set Location to the myapplication folder created earlier
Set Build Script to the build.ant.xml file created by projectCreator
Set Project Name to something more appropriate
Open the project properties and under Java Sources click Add Folder.
Select the projects/myapplication/src folder and press OK
Please excuse, if you didn't like this approach.
Sounds similar with Battle for Eclipse and Netbean but you are talking about concern with GWT.
So , I think you can choice as you more prefer depends on your experiences. You can do GWT developing in various IDE because I assume GWT runs on it's SDK not on IDE . But there has some points of views. Example : easy to generate , test , develop ..etc on each IDE.
I also personally love NetBean due to beautiful GUI :) . But I am working with Eclipse IDE because our team has been developed and configured on it for a long time so we have hard to change IDE (sometimes very hard to change Eclipse version because we can't imagine new version will more reliable for our projects).But I don't mean Eclipse is the best option , as I described you may configure your GWT projects on any other IDE also as your experiences via GWT SDK.
"...and everyone suggested to use Eclipse." . Yes you will see most of sample projects for it were figured with Eclipse IDE. Only aspect for GWT , I think you have chance to choose NetBean IDE without any worries.
You can develop GWT project on NetBean IDE as follow...
1.) First off, download and install the gwt4nb plugin. ( you may have exp for install plugin on NetBean IDE )
2.) download GWT SDK and extract it to your specific location.
3.) create a new Java Web –> Web Application. Name your application and hit Next until you get to the Frameworks tab. If you have successfully installed the gwt4nb plugin you should see Google Web Toolkit listed. Select the Google Web Toolkit framework.
4.) Next, browse to the GWT SDK installation folder. Name your GWT module and hit Finish.
5.) Clean and Build your project.(don't be forgot to wait until successfully finished Build.)
6.) Run the project, your browser should launch and the button “Click me!” and the text “Hello, GWT!!!” should be visible.
Cheer ! now you can create GWT sample project on NetBean IDE.
You can also create GWT's
Test Case
Constants
Module
RPC Service
UiBinder
By right click on your_project > Other... > Google Web Toolkit.
Have some useful tips for you !

Categories