| View previous topic :: View next topic |
| Author |
Message |
ellias2007
Joined: 12 Feb 2009 Posts: 31
|
Posted: Mon Dec 07, 2009 12:25 pm Post subject: Double Clickable Application |
|
|
Hi every body,
i am about making a DataBase application for a school...
i am using My Lovely Team MySql+Java+Swing (MySql for holding the DataBase - Java for programming the actions and others and Swing for making the Gui and i write my code in NetBeans6.5)...
... but i have a question :
How to make a "Double Clickable Application"... in fact, each time i have to run my code via the IDE...
Any idea to help me making such portable and executable Application??
Many thanks
|
|
| Back to top |
|
 |
Christopher Lam Posted via mailing list.
|
Posted: Tue Dec 08, 2009 7:27 am Post subject: Re: Double Clickable Application |
|
|
Hi,
I presume you have a main class where the main() method is. By right in Netbeans, when you first create your application, the main class is defined in the manifest file (MANIFEST.MF) which is normally resided in the META-INF directory in the application, an example of the manifest file looks like this:
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.7.1
Created-By: 14.3-b01-101 (Apple Inc.)
Main-Class: com.myapp.Main
Class-Path:
X-COMMENT: Main-Class will be added automatically by build
Everytime when you build your application, a jar file is created in the /dist sub-folder of the project. And if a java runtime is installed in your environment, you can simply double click on the jar file to start the application. Or otherwise, you can create batch file that has the command line:
java -jar myapp.jar
Hope this helps.
Regards,
Christopher Lam
On 07-Dec-2009, at 8:25 PM, ellias2007 wrote:
| Quote: | Hi every body,
i am about making a DataBase application for a school...
i am using My Lovely Team MySql+Java+Swing (MySql for holding the DataBase - Java for programming the actions and others and Swing for making the Gui and i write my code in NetBeans6.5)...
... but i have a question :
How to make a "Double Clickable Application"... in fact, each time i have to run my code via the IDE...
Any idea to help me making such portable and executable Application??
Many thanks :)
|
|
|
| Back to top |
|
 |
ellias2007
Joined: 12 Feb 2009 Posts: 31
|
Posted: Wed Dec 09, 2009 7:00 pm Post subject: ... i am using Mac OS 10.5.8 |
|
|
Thank for your reply...But
i am using Mac OS 10.5.8
and Not windows ....
is the info still right for the Mac??
i searhed such directories .... i found Nothing ...
|
|
| Back to top |
|
 |
Christopher Lam Posted via mailing list.
|
Posted: Thu Dec 10, 2009 2:00 am Post subject: Re: Double Clickable Application |
|
|
Yes, it still applies, fyi, I'm also using Mac OS 10.6.2. Just make sure you have the Java runtime installed in your environment. To confirm that, open a terminal window on your desktop and enter the command, "java -version", you should see the version details.
Cheers,
Christopher Lam
On 12/10/09 3:00 AM, ellias2007 wrote: | Quote: | | Quote: | Thank for your reply...But
i am using Mac OS 10.5.8
and Not windows ....
is the info still right for the Mac??
i searhed such directories .... i found Nothing ... :(
| |
|
|
| Back to top |
|
 |
ellias2007
Joined: 12 Feb 2009 Posts: 31
|
Posted: Fri Dec 11, 2009 8:24 pm Post subject: |
|
|
| Quote: | | I'm also using Mac OS 10.6.2 |
i am happy to hear this...
| Quote: | | Just make sure you have the Java runtime installed in your environment. To confirm that, open a terminal window on your desktop and enter the command, "java -version", you should see the version details. |
YES, i have it ... and this is what i get when i made such command :
java version "1.5.0_20"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_20-b02-315)
Java HotSpot(TM) Client VM (build 1.5.0_20-141, mixed mode, sharing)
| Quote: | | when you first create your application, the main class is defined in the manifest file (MANIFEST.MF) which is normally resided in the META-INF directory in the application |
BUT : i searched All my Hard Disk ... Where is such directory ???
Since u use MacOSX, Please explain how can i find such IMPORTANT file ....
Many Thanks
|
|
| Back to top |
|
 |
Christopher Lam Posted via mailing list.
|
Posted: Sat Dec 12, 2009 2:12 am Post subject: Re: Double Clickable Application |
|
|
See attached screen shot, it is within the jar file after Netbeans build it.
Best regards,
Christopher Lam
On 12-Dec-2009, at 4:24 AM, ellias2007 wrote:
| Quote: |
| Quote: | I'm also using Mac OS 10.6.2
|
i am happy to hear this...
| Quote: | Just make sure you have the Java runtime installed in your environment. To confirm that, open a terminal window on your desktop and enter the command, "java -version", you should see the version details.
|
YES, i have it ... and this is what i get when i made such command :
java version "1.5.0_20"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_20-b02-315)
Java HotSpot(TM) Client VM (build 1.5.0_20-141, mixed mode, sharing)
| Quote: | when you first create your application, the main class is defined in the manifest file (MANIFEST.MF) which is normally resided in the META-INF directory in the application
|
BUT : i searched All my Hard Disk ... Where is such directory ???
Since u use MacOSX, Please explain how can i find such IMPORTANT file ....
Many Thanks
|
| Description: |
|
| Filesize: |
44.09 KB |
| Viewed: |
3665 Time(s) |

|
|
|
| Back to top |
|
 |
ellias2007
Joined: 12 Feb 2009 Posts: 31
|
Posted: Sat Dec 12, 2009 8:49 pm Post subject: |
|
|
Thanks ... but Just a small final thing:
Your Attached Photo is very small so i can see Nothing..
Thanks to Re-send it in a convinient size...
|
|
| Back to top |
|
 |
Christopher Lam Posted via mailing list.
|
Posted: Sun Dec 13, 2009 3:14 pm Post subject: Re: Double Clickable Application |
|
|
Hi, here it is again.
Regards,
Christopher Lam
Mobile: 94501641
Email: address-removed
On 13-Dec-2009, at 4:49 AM, ellias2007 wrote:
| Quote: | Thanks ... but Just a small final thing:
Your Attached Photo is very small so i can see Nothing..
Thanks to Re-send it in a convinient size...
[Wink]
|
| Description: |
|
| Filesize: |
118.18 KB |
| Viewed: |
3644 Time(s) |

|
|
|
| Back to top |
|
 |
ellias2007
Joined: 12 Feb 2009 Posts: 31
|
|
| Back to top |
|
 |
Christopher Lam Posted via mailing list.
|
Posted: Mon Dec 14, 2009 4:31 pm Post subject: Re: Double Clickable Application |
|
|
Right-click on the Project and select Properties, look at the settings of the 2 categories: Packaging and Run, make sure they look something like the attached images.
Regards,
Christopher Lam
On 14-Dec-2009, at 10:42 PM, ellias2007 wrote:
| Quote: | As we can see in The attached Photo,
There is NO Directory in the Name dist ... )and then No file with the extension .jar)
like in your Photo ???
What is the trick??
[Crying or Very sad]
Attachments:
http://forums.netbeans.org//files/mysceen_117.gif
|
| Description: |
|
| Filesize: |
59.09 KB |
| Viewed: |
3628 Time(s) |

|
| Description: |
|
| Filesize: |
46.38 KB |
| Viewed: |
3628 Time(s) |

|
|
|
| Back to top |
|
 |
ellias2007
Joined: 12 Feb 2009 Posts: 31
|
Posted: Mon Dec 14, 2009 7:30 pm Post subject: Really Stranger ! |
|
|
Really Stranger !
The settings in the 2 categories: Packaging and Run
ARE EXACTELLY like your setting in your attached Photo....!
(especially the option "Build JAR after Compiling" : YES it is checked)
i opened the file project.properties and tried Change the directory dist.dir from dist to many other choises ... each time i compile the project i find NOTHING in all expected folders and places...
what is the trick?
is it possible because when i create the project i choose "Java Application" and Not "Java Dektop Application" ??!! i don't think !!
|
|
| Back to top |
|
 |
ellias2007
Joined: 12 Feb 2009 Posts: 31
|
Posted: Wed Dec 16, 2009 9:18 pm Post subject: |
|
|
Hi every body...
Any idea please about this problem????!!!...
Thanks
|
|
| Back to top |
|
 |
ellias2007
Joined: 12 Feb 2009 Posts: 31
|
Posted: Fri Mar 19, 2010 2:53 pm Post subject: Thanks....But... |
|
|
| Any Help?!
|
|
| Back to top |
|
 |
|