NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Double Clickable Application

 
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users
View previous topic :: View next topic  
Author Message
ellias2007



Joined: 12 Feb 2009
Posts: 31

PostPosted: Mon Dec 07, 2009 12:25 pm    Post subject: Double Clickable Application Reply with 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 Smile
Back to top
Christopher Lam
Posted via mailing list.





PostPosted: Tue Dec 08, 2009 7:27 am    Post subject: Re: Double Clickable Application Reply with quote

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

PostPosted: Wed Dec 09, 2009 7:00 pm    Post subject: ... i am using Mac OS 10.5.8 Reply with 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 ... Sad
Back to top
Christopher Lam
Posted via mailing list.





PostPosted: Thu Dec 10, 2009 2:00 am    Post subject: Re: Double Clickable Application Reply with quote

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

PostPosted: Fri Dec 11, 2009 8:24 pm    Post subject: Reply with 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
Back to top
Christopher Lam
Posted via mailing list.





PostPosted: Sat Dec 12, 2009 2:12 am    Post subject: Re: Double Clickable Application Reply with quote

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







Manifest.png
 Description:
 Filesize:  44.09 KB
 Viewed:  3609 Time(s)

Manifest.png


Back to top
ellias2007



Joined: 12 Feb 2009
Posts: 31

PostPosted: Sat Dec 12, 2009 8:49 pm    Post subject: Reply with 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
Back to top
Christopher Lam
Posted via mailing list.





PostPosted: Sun Dec 13, 2009 3:14 pm    Post subject: Re: Double Clickable Application Reply with quote

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]







Manifest.png
 Description:
 Filesize:  118.18 KB
 Viewed:  3588 Time(s)

Manifest.png


Back to top
ellias2007



Joined: 12 Feb 2009
Posts: 31

PostPosted: Mon Dec 14, 2009 2:42 pm    Post subject: Reply with 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



MySceen.gif
 Description:
 Filesize:  43.95 KB
 Viewed:  3579 Time(s)

MySceen.gif


Back to top
Christopher Lam
Posted via mailing list.





PostPosted: Mon Dec 14, 2009 4:31 pm    Post subject: Re: Double Clickable Application Reply with quote

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




Properties-Run.png
 Description:
 Filesize:  59.09 KB
 Viewed:  3572 Time(s)

Properties-Run.png



Properties-Packaging.png
 Description:
 Filesize:  46.38 KB
 Viewed:  3572 Time(s)

Properties-Packaging.png


Back to top
ellias2007



Joined: 12 Feb 2009
Posts: 31

PostPosted: Mon Dec 14, 2009 7:30 pm    Post subject: Really Stranger ! Reply with quote

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 !! Confused
Back to top
ellias2007



Joined: 12 Feb 2009
Posts: 31

PostPosted: Wed Dec 16, 2009 9:18 pm    Post subject: Reply with quote

Hi every body...
Any idea please about this problem????!!!...
Thanks Embarassed Crying or Very sad
Back to top
ellias2007



Joined: 12 Feb 2009
Posts: 31

PostPosted: Fri Mar 19, 2010 2:53 pm    Post subject: Thanks....But... Reply with quote

Any Help?!
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo