convert/compile a netbeans project to an .exe file - netbeans

I have a netbeans project and I need to create an .exe file out of it.
I want it to run this program on a friends computer who doesn't have netbeans installed.
So how do I do this?

If its a java project then just compile and build the project. go to the project folder->dist folder, copy the .jar file and give it to your friend to use. ur friend needs to have JRE installed on his system.

Related

Eclipse mars Installation folder in Mac

I need the Eclipse Installation folder, it was requested from another program, but there is no such a folder. When I installed eclipse I did not get any folder out of the compressed file, I only get the program itself.
However, I copied the contents and it says " it's not the installation folder since it does not have "plugins" subfolder.
The error message
The new path for the plugins is
/Applications/Eclipse.app/Contents/Eclipse/plugins
The eclipse will be installed where you decided to put it not always under /Applications necessarily. The easiest way I think to find the installation folder is to run eclipse, go to Eclipse > About Eclipse. Click "Installation Details" at the bottom. The configuration tab in installation details should have the location of eclipse for launcher and startup config. Hope this helps!
In mac os you need to select the eclipse ini file not ecllipse.app

Is it possible to make a Java project to executable file?

I have done a project in JavaFX. I used NetBeans IDE to do my project. I used MySQL as database. Currently I run my project with the help of NetBeans. Is there any way to make the project an executable file ?
What I meant by executable is to launch the project by double clicking on it. Suggest me some good and easy methods, with tutorial if possible.
What you are thinking of is a self-contained javafx application. Nifty guide here.
This is an .exe file (on windows, i tried it on kubuntu and it builds a nice .deb and a separate executable). You can place this executable somewhere else and it will work, even if no java is installed.
Netbeans has a folder for their projects. (Default: documents/NetbeansProjects)
There you will find your project.
First, click on the Clean and Build button inside netbeans.
Then you can find a .jar file in your project folder's dist folder.
You can use Launch4j to create executable file.
http://launch4j.sourceforge.net/

Import existing BlackBerry project in Eclipse

How can I import existing Blackberry projects into eclipse?
I found this development guide for BlackBerry Eclipse users, but I didn't find any .jdw file:
Import a BlackBerry application project from an existing workspace
When I make new project and copy all the folder src and res I obtain an error that there is a file missing and there is no specification of type of the name of this file
Error: Cannot run program "jar": CreateProcess error=2.
Can any one help me to run this project?
Click File-->New-->Blackberry Project-->Create project form existing resource --> then browse to your project folder and click finish.
Use this BlackBerry Java Plug-in for Eclipse guide: Add a .jar file dependency

Manual Install of GWT 2.1.0 in Eclipse Helios 3.6.1

I am behind an intranet that does not have access to the download sites. Assuming I have access to all of the correct zip and jar files. What are the step by step instructions to get Eclipse to the point where I can go to Windows -> Preferences and see the Google entry?
1) I don't have access to the http://code.google.com/eclipse/docs/getting_started.html site because I am on a closed network.
2) I tried using the dropins folder and when I re-open Eclipse and go to Windows->Preferences "Google" isn't listed.
Any ideas?
The official zip-file installation instructions are at http://code.google.com/eclipse/docs/install-from-zip.html
This uses the Eclipse dropins mechanism, which helps Eclipse to pick up the new plugins in a clean way, quote:
... the dropins folder can be used much like the plugins directory was used in the past. A subtle twist on old behavior here is that plug-ins and features added to the dropins folder are properly installed into the system rather than being forced in.
Note:
Make sure, that you extract the zip file into the correct destination. It can easily happen, that it gets extracted e.g. into some subdirectory - so please check twice. You should have the following structure:
eclipse (this is your Eclipse installation folder)
dropins
eclipse (this is the directory created by extracting the zip file)
features
com.google.*
plugins
com.google.*
features
(your already installed features)
plugins
(your already installed plugins)
...
Then (re-)start Eclipse.
Just install the plugin from here and you are set to go.
http://code.google.com/eclipse/docs/getting_started.html
If you get a correct zip file for plugin, you will see "plugins" and "features" as soon as you open the zip file.
If your eclipse is in a location "c:\eclipse", extract the zip file into "c:\eclipse". The files will go into the corresponding folders.
Drop them in the plugins folder

How do you install JDK?

I have eclipse and I can test run java apps but I am not sure how to compile them. I read that I should type javac -version into my cmd.exe and see if it is recognized. It is not. So I went to sun's website and downloaded/installed JDK v6. Yet it still says 'javac' is an unrecognized command. What am I doing wrong?
Thanks!
UPDATE
OK after reading some replies it seems like what I am trying to do is create a .jar file that can be ran on another computer (with the runtime). However I am having trouble figuring out how to do that. This might be because I am using Flex Builder(eclipse), but I added the ability to create java projects as well.
Thanks
UPDATE
OK I do not want to make a JAR file, I am not trying to archive it...the whole point of making a program is to send it to users so they can use the program...THAT is what I am trying to do...why is this so hard?
To setup Eclipse to use the JDK you must follow these steps.
1.Download the JDK
First you have to download the JDK from Suns site. (Make sure you download one of them that has the JDK)
2.Install JDK
Install it and it will save some files to your hard drive.
On a Windows machine this could be in c:\program files\java\jdk(version number)
3.Eclipse Preferences
Go to the Eclipse Preferences -> Java -> Installed JREs
4.Add the JDK
Click Add JRE and you only need to located the Home Directory. Click Browse... and go to where the JDK is installed on your system. The other fields will be populated for you after you locate the home directory.
5.You're done
Click Okay. If you want that JDK to be the default then put a Check Mark next to it in the Installed JRE's list.
You don't need a separate compiler, eclipse already compiles the application for you. What you probably want to do is to create an "executable" JAR file, which you can do in eclipse by selecting File->Export->Runnable JAR file.
Note, however, that the resulting JAR file is not a "real" (i.e. Windows binary) executable - it still needs a JRE installed on the target computer. There isn't really a way to create windows binaries; that's not how Java works. On the upside, it will work without recompilation on a Linux or MacOS machine (if it has a JRE installed).
javac is located in the "bin" folder of your JDK installation. In order to run it you must either use full path or add this directory to your systems search path via the Control Panel.
If you installed to c:\program files\java\jdk1.6.0 your call will have to look like this:
c:\> "c:\program files\java\jdk1.6.0\bin\javac" -version
Umm, eclipse is an IDE, it compiles things as you go. You don't need javac.
If you have Eclipse installed and you can write new java apps from within it, your compilation should work already..
Eclipse automatically builds/compiles your system when you're saving new Java files. Just try to write a new simple Hello world app, printing something to the console (just type sysout and Ctrl+Space inside Eclipse)
Eclipse automatically compiles all project in the workspace. YOu can disable this option if you like under Project->Build Automatically.
A JAR file can function as an executable, when you export your project as a JAR file in Eclipse (as Michael Borgwardt pointed out) you can specify what's the executable class, that meaning which one has the entry point [aka public static void main(String[] args)]
If the user installed the JRE he/she can double-click it and the application would be executed.
EDIT: For a detailed explanation of how this works, see the "How do I create executable Java program?"
Eclipse to use the JDK you must follow these steps.
1.Download the JDK
First you have to download the JDK from oracle site.
Download link - > https://www.oracle.com/technetwork/es/java/javasebusiness/downloads/index.html
2.Install JDK
Install it and it will save some files to your hard drive. On a Windows machine this could be in c:\program files\java\jdk(version number)
3.Eclipse Preferences
Go to the Eclipse Preferences -> Java -> Installed JREs
4.Add the JDK
Click Add JRE and you only need to located the Home Directory. Click Browse... and go to where the JDK is installed on your system. The other fields will be populated for you after you locate the home directory.
5.You're done
Click Ok. If you want that JDK to be the default then put a Check Mark next to it in the Installed JRE's list.