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.
Related
I'm getting my java project to a finish and I'm about to export it to an easy useable program on the desktop.
In my program I'm using .txt files to keep all my data, so I've made a folder for my databases and my images.
The problem comes when I'm exporting the project to the desktop and it looks like everything mashes up and becomes one big pile of files instead of a folder structure I made it like in eclipse.
From eclipse
What is the right way to export the project, and how does I keep my filestructure?
Exporting to JAR file at the moment.
EDIT:
I'm also getting this error when I try to follow exampels from the internet.
'Utforsking/src/org/eclipse/wb/swing/FocusTraversalOnArray.java'
You can choose export->General->File System.
Then choose "Create directory structure for files" and that should work. I am using Luna.
If you hit problems, let me know.
I developed simple Window application using java.
I used Eclipse Juno as my IDE.
I used Hibernate to do database operations.
Now i want to create the complete setup of this project how can i do it?
I know we can create JAR file using Eclipse using Export option.
But i mean to say i want to create setup in such a way it must include all the things like my database, imported jar files and any other files that are used in my project.
I think it already gets the imported jar file but it is not including database how to include it?
In Visual Studio it remains easy to create setup it gives all the options to include database or not and many other.
How can we do it using Eclipse?
You can try exe4j, installer4j kind of tools to create an .exe or a setup.
But I'm not quite sure whether you can pack your database with the application.
I want to open my web application which I made using Terminal/Text Editor on Linux into eclipse on windows.
I tried to open it by doing Import existing project but I don't see my servlet files i.e .java files in it and i also see error mark on my WEB.XML.
ty154 is my project name.
My Directory structure is
Tomcat -> Webapp->ty154
Ty154->Images & ->webinfo
Webinfo->classes
I have my JSP files in the ty154 folder and Images inside Image folder.
I have my .JAVA and .Class file inside Classes folder.
Please help me how to open and configure my project in eclipse.
Thanks in advance !!
Its not possible to import the project that you have created using terminal/text editor in to eclipse.You have to create a Dynamic Web Project under eclipse and copy paste the java files under source directory of the project. The jsp and other html files will go in to WebContents folder of the project. Once this is done the eclipse project can be copied and can be imported in to any other eclipse installations.The best read is:http://goo.gl/hPVapt
As you have written source code in terminal environment so you wouldn't be having an eclipse project file to be imported properly. First you need to create an eclipse project and then you can add source from your code directories. This link describes it pretty well:
http://thusithamabotuwana.wordpress.com/2011/06/15/importing-existing-source-code-into-eclipse/
If you have the war file, then you can import the war file directly in eclipse. Go to File>import then select war
For this you need to have Eclipse IDE for Java EE developers
The "Import Existing Project" entry only works for Eclipse projects.
In your situation with a simple project I would create a new Dynamic Web project and copy in the sources to the source folder - just Ctrl-c the files outside Eclipse, and Ctrl-v them inside Eclipse - and the static files to the publish location. You essentially need to know what has been done to ensure it has been done right.
Right now i've written a simple SWT application using eclipse, and I want to pack it into an executable .jar file so I can give it out to friends and such. But I have the following problems:
-Right now i'm reading files by using their filename in the program, and putting them in the root folder of the eclipse project. That works fine for running in eclipse, but when I export to jar they're not in the jar. Is there a way to put them in the jar and access them in the code?
-I also need the SWT .jar dependencies or whatever its called(the files you need for SWT).
Does anyone know how to do this?
Take a look at ClassLoader.getResourceAsStream() API.
All you need to do is include these files in the with the source code of your project, then to have access to then have a look at this link
I just heard of library for reading/writing excel files without COM, so I figured I'd go check it out.
I downloaded jexcelapi_2_6_12.zip from this page http://sourceforge.net/projects/jexcelapi/files/ but I have no idea how to open it in Eclipse.
I know it's a silly question, but I'm sure it's not the first time someone's asked it, how do I open this in Eclipse in Windows, compile, run and debug it?
Primarily what you need from that zip is the jar which contains the library. You'll still need to actually write a Java app that uses it.
So what you need to do is:
Unzip the file you downloaded
create a new java project
add a lib directory to the project
copy jxl.jar from the zip into your projects lib directory
right click on the jar in eclipse and select "Build Path>Add to build path"
The classes in the library are now available to your project
Next create a new java file in your projects source folder and start coding.
Extract the zip file somewhere, put the jar file in your project's directory somewhere (e.g. under a lib directory) and then right-click on it and select "Add to build path" or something similar.
It's not runnable on its own though - you'll need to write some code in order to debug.
If you want to debug into the source code of the library itself, you'll need to tell Eclipse where the source is - but that's unlikely to be necessary.