The Artima Developer Community
Sponsored Link

Java Answers Forum
JFrame help

8 replies on 1 page. Most recent reply: Aug 14, 2002 1:39 AM by Suraj Butala

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 8 replies on 1 page
jake

Posts: 83
Nickname: onorok
Registered: May, 2002

JFrame help Posted: Aug 5, 2002 6:12 PM
Reply to this message Reply
Advertisement
How do I create an application in java that doesn't need dos/the method main() to run it. Like when I want to run my application with a gui I have to create a new instance of it in my main method. And then when I run the application a dos window comes up first and then the frame with my gui. can anyone help? I would just like to create an application that doesn't have a dos window appear first before the gui.


Trung

Posts: 9
Nickname: chitrung
Registered: Jun, 2002

Re: JFrame help Posted: Aug 6, 2002 2:09 AM
Reply to this message Reply
Hi,

just pack your classes to an executeable jar file.
first you have to create a manifest file that contains this line : Main-Class: MainClass
(type enter after this line)
save this file as manifest or something else.
than use the jar tool to create the jar file like :
jar cmf manifest jarname.jar *.class

regards, trung

jake

Posts: 83
Nickname: onorok
Registered: May, 2002

Re: JFrame help Posted: Aug 6, 2002 9:10 AM
Reply to this message Reply
I'm sorry but I have absolutely no idea how to do that. can you please explain. I am using the Jcreator ide and excelsior jet to put it into an exe.

jake

Posts: 83
Nickname: onorok
Registered: May, 2002

Re: JFrame help Posted: Aug 7, 2002 7:07 PM
Reply to this message Reply
so no one, knows how to do this, I have researched it and I still can find anything.

Matt Gerrans

Posts: 1153
Nickname: matt
Registered: Feb, 2002

Re: JFrame help Posted: Aug 7, 2002 7:33 PM
Reply to this message Reply
I don't even understand what you are trying to ask.

jake

Posts: 83
Nickname: onorok
Registered: May, 2002

Re: JFrame help Posted: Aug 7, 2002 9:31 PM
Reply to this message Reply
ok, when you create an application with a Frame, and you run it through an IDE like JCreator. Before you see the Frame appear, a dos window appears, and a few seconds later your JFrame appears. I want to know how to make that dos window not appear, and just have the frame appear. Do you understand?

Michael Wiedmer

Posts: 15
Nickname: micks
Registered: Aug, 2002

Re: JFrame help Posted: Aug 8, 2002 2:24 AM
Reply to this message Reply
Hi jake,

You can start the whole thing either with the command
java or javaw.

Funnily enough, the command you are looking for is javaw (meaning NO console window).

RTFM ;-)

Micks

Matt Gerrans

Posts: 1153
Nickname: matt
Registered: Feb, 2002

Re: JFrame help Posted: Aug 8, 2002 9:02 AM
Reply to this message Reply
Additionally, you can probably customize your development environment to use JavaW.exe instead of Java.exe. However, keep in mind that the value of using Java.exe is that if you have any uncaught exceptions, you will see them in that DOS box (or command shell, as it were). For this reason, I would leave the development environment as is (using java.exe) and not worry about the command shell window. When you are finished with development (ha!) and want to run your application separately, or if you set up a link to it, then use Javaw.exe.

Suraj Butala

Posts: 1
Nickname: suraj
Registered: Aug, 2002

Re: JFrame help Posted: Aug 14, 2002 1:39 AM
Reply to this message Reply
Hi there !!!

I have a good solution to that .. what u can do is
1)Make a jar of ur frame application.
2)Download Nativej ver 1.0.4 from the net.
3)follow there instructions which results in a exe file of ur application
4)Double click on that exe .. ur frame is opened without a dos prompt window !!

Flat View: This topic has 8 replies on 1 page
Topic: jdk 1.4 swing gui Previous Topic   Next Topic Topic: jdk1.4 popupMenu problem

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use