How to start Swing programs without console

Hi, I'm working on Swing program, which can be started in the MS-DOS console by typing:
java myProgram
This works great, but for the end-users, I don't want them to see the ugly console that shows up and occasionally display exception code. How do I get the Swing program to start up without having the accompanying console?
Any help is appreciated. Thanks! :-)

you can also package it in a jar and make it executable. There's a good discussion in the Jar Forum about how to do that.

Similar Messages

  • Start SWING App. without console

    Hi!
    How can I start a SWING application in WINDOWS2000 without opening a DOS console?
    Thanks
    Torsten

    Java applications will only work if the classpath is set properly. Thus if you double-click on a JAR (or something else associated with Java) you might find that nothing seems to happen. Usually it'll open a DOS windows, start Java, chuck an Error and close the window quickly.
    This doesn't mean that you should go round setting the system classpath to get all your applications to run - that's a recipe for disaster!
    Sometimes it's best just to create a new shortcut for your application, specifying the full Java command for running your application and click on that:
    javaw.exe -cp [your classpath here] MyMainClass
    or
    javaw.exe -cp [your classpath here] -jar MyMainJar.jar
    If the classpath gets long, though, this won't work 'cos Windows will only allow a certain length for the shortcut. You'll have to use an external file to list the classpath contents then. I doubt this will affect you yet, however.
    Hope this helps.

  • Really stuck on how to start this program

    Okay, I know I should be posting some code here and showing where I've started and such, but I'm pretty lost as to how to start this program. Here's the problem:
    2. Making Change:
    This application, named ChangeMaker, will take as input a product price and an amount paid,
    both floating-point numbers representing euro and cent amounts. The application computes and prints the amount of change due the user, and also expresses the change amount in number of 2-euros, 1-euro, 20-cent, 10-cent, 5-cent, 2-cent, and1-cent coins.
    (Assume no change is given in bills, only in coins.)
    For example:
    Enter product price: 2.32
    Enter amount paid: 5.00
    Your change is 2.68 euros
    1 x 2 euro
    3 x 20-cent
    1 x 5 cent
    1 x 2 cent
    1 x 1 cent
    You can assume that the amount paid is greater than the product price, and that both inputs are
    "euro and cent" amounts: positive numbers with at most two decimal places.3
    Now, I know how to print the line asking for product price and enter amount paid, but I cannot figure out how to set up the rest of the code when switching from american USD dollars/coins to euros. I looked up the conversions and they are just intimidating as all get out when trying to take the equivalency of euros to each dollar thats entered and then taking the rest of the USD remainders and represent that in USD coinage. >.< Help is much appreciated thank you.

    thomas.behr wrote:
    random0munky wrote:
    ... when switching from american USD dollars/coins to euros. I looked up the conversions and they are just intimidating as all get out when trying to take the equivalency of euros to each dollar thats entered and then taking the rest of the USD remainders and represent that in USD coinage.Uhm, your requirement doesn't say anything about converting between USD and EUR. For starters, just write the program without any currency information at all. (That is only flavour anyways.)
    For example:
    Enter product price: 2.32
    Enter amount paid: 5.00
    Your change is 2.68
    1 x 2
    3 x 0.2
    1 x 0.05
    1 x 0.02
    1 x 0.01That deception would never fly in a Red State -- 20 cent piece? 2 cent piece? 2 dollar coin? All this smacks of Socialism!

  • How can I start the program without the run button

    How can I start the program the instant i open the vi?
    without the use of Run.
    Thanks
    Solved!
    Go to Solution.

    Under vi properties, execution, click run when opened like in Jeff's screen capture below . Don't post any code set to run when opened to the forums!
    =====================
    LabVIEW 2012

  • How to start / stop nodes without domain-controller / automatically on Win?

    Hi,
    we have a distributed installation of CMSDK 9.0.4.
    We have installed a 9.2.0.4 Database on Solaris and we are using the 10g(9.0.4) Infrastructure on Solaris with it.
    The first installation of CMSDK uses a J2EE-MidTier installation on the Solaris server and contains the CMSDK domain controller and a normal node with nfs protocol server running.
    The other installations are done on Win2003 Blades. Currently we are using two Blades. On each there is a J2EE-MidTier installation and within these we have installed CMSDK with HTTP-Node and normal node. We are using NTFS-Server within the normal nodes.
    The Blades are within one Domain and we have NLB-Cluster activated for both.
    The whole thing sounds complex, but it works fine. We only have some trouble regarding start/stop of the nodes:
    1. If the solaris backend fails, our cluster-configuration tries to stop and start cmsdk. While stopping cmsdk, all nodes - even those on the Win-Servers - are stopped. But starting does not bring em up again automatically.
    2. If a Windows Server is booted, the normal node does not start automatically.
    3. If one Windows Server is not available, the ifsctl check takes a very long time because it's trying to get information from the missing one.
    Is there a way to restart the domain controller and node on solaris without stopping the nodes on Windows?
    How can we start the windows nodes automatically after reboot?
    Is there a way to probably start the nodes without being managed / guarded by the domain controller?
    Thanks for help,
    Alex

    Try adding this script to your /etc/init.d directory:
    #!/bin/sh
    ifsctl start << EOF
    <ifsctl password>
    EOF
    Replace <ifsctl password> with the password that you would give at the prompt.
    It will complain about Inappropriate ioctl for device, but it works.

  • How to run c program without xcode

    i want to run my c program without using Xcode coz its a huge download,plz help me out I'm new to mac

    The Xcode install is worth the time and space (in my opinion).  To enable the command line tools you have to also install those:
    http://stackoverflow.com/questions/9329243/xcode-4-4-and-later-install-command-l ine-tools
    The nice thing about using Xcode is that you will have the debugger and also be able to build executables for other platforms (cross compile) since Xcode allows you to use an external build system.
    Here is another option... there are websites that allow you to compile and run code on the server side (through a web interface):
    http://ideone.com/jwTjgN

  • How to start a program with Admin rights without UAC dialog?

    I want to run a program with the user's admin rights,but i don't want windows pop up the UAC dialog.How can i do that?tks.

    Hello,
    The Windows Desktop Perfmon and Diagnostic tools forum is to discuss performance monitor (perfmon), resource monitor (resmon), and task manager, focusing on HOW-TO, Errors/Problems, and usage scenarios.
    Since your post is off-topic, I am moving it to the
    off topic forum.
    Karl
    When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
    My Blog: Unlock PowerShell
    My Book:
    Windows PowerShell 2.0 Bible
    My E-mail: -join ('6F6C646B61726C406F75746C6F6F6B2E636F6D'-split'(?<=\G.{2})'|%{if($_){[char][int]"0x$_"}})

  • Auto start a program without logon on Windows Server 2012

    I develop a software that starts at server startup without login, it works fine with older versions of Windows Server (2003, 2008) with 2012 my executable program that starts only when a session is opened (administrator or user). 
    My program uses a 32bit architecture it is found in: 
    HKEY_LOCAL_MACHINE \ SOFTWARE \ Wow6432Node \ Microsoft \ Windows \ CurrentVersion \ Run 
    How can i make my program starts automatically after any system reboot without logon? 
    Thank you for your cooperation

    Make it a service and configure it to start automatically.
    .:|:.:|:. tim

  • How to start process chain without sapall rigths...

    Hi everybody,
    I got the following problem:
    A (normal) user without sapall rights should be able to start a process chain by clicking a button in a bsp application. This works so far.
    The process chain is started by invoking the function module RSPC_API_CHAIN_START. The authority check in the fm throws an error because the user does not have the proper rights/roles to plan a batch job for the ALEREMOTE user.
    Does anybody has a solution for this? It's really urgent!!!
    Thanks in advance,
    Joerg

    Hi Joerg,
    You might opt to change the scheduling of the start step of your process chain so that it is triggered by an event. Here are the steps:
    1) Define an event in SM62
    2) Change your process chain so that it is triggered by the event you created in step 1.
    3) Change your ABAP code (that responds to the button in your BSP application...the planning function i think). You can then use the function module BP_EVENT_RAISE to trigger the event you created in #1.
    Advantage:
    The users don't need the extra authorizations.
    Disadvantage:
    In contrast to using the RSPC_API_CHAIN_START function module, you won't immediately know whether the process chain was started successfully (you might have to call another FM to check the status).
    If you can't change the trigger for the process chain, then the longer solution would be to construct an ABAP program that will execute the RSPC_API_CHAIN_START, schedule the program in a background job (to run under a powerful user id),  set the background to be triggered by an event, trigger the event when the user clicks the button.

  • How to Start BPMN externally without NWA?

    hi @,
    How can  I start the BPMN from out side without going to the NWA . I know I can use WEb service for the Process to trigger the start event but how can I embed this in a process. Because the Process is available within UWL and can be accessed from there only .
    Can we get the URL of the UI that is available in the UWL ?
    These are 2 different questions and I feel they are serious issues in any implementation.
    REgards,
    AMit

    Hi Amit,
    > How can I start the BPMN from out side without going to the NWA .
    I'm starting my processes at the moment with http://www.soapui.org/ - so you send a soap-message to the wsdl and retrieve a fault message which says the process has been triggered but this isn't what you want.
    > I know I can use WEb service for the Process to trigger the start event
    > but how can I embed this in a process. Because the Process is available
    > within UWL and can be accessed from there only.
    There is a tutorial about starting a bpm process programmatically, maybe this helps: https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/80ace13d-5182-2b10-a584-bfa2042061e6
    You may also have a closer look at this: https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/501bd56f-a5a6-2b10-4fbf-a61a64055fe4
    Another option could be, that you create a webservice in the CAF that sends a soap-message to start the process you need- but i dont know how to that and even if it is possible.
    Hope this helps.
    With kind regards
    Markus

  • How many start up programs do I need?

    right now there are 85  programs running everytime I start up. Could this be the cause of my internet connection running slowly and how do I d fix it.

    Basically what you need to have at startup are the Windows services, antivirus, sound control.
    You can set your startup programs by going to
    Start > Start Search > type msconfig > Startup > then uncheck all the other programs that is not necessary upon startup and after that it will require you to restart the computer for the changes to take effect.
    Message Edited by nicholaiCUTE on 12-05-2008 09:07 PM
    oOo
    *Read EULA before installing any software.

  • How to start JDBC program from web.

    Okay I have researched this alot on how you are suppose to connect to a database using JSP and all the example just show how to print the entire database. What I need to do is take a JDBC program I have written and make it run on a web page. How can I call the program to run on a web page. The JDBC program will search,update,add information into a database but how do I get the JDBC program run on a web server. I am a newbie in JSP.

    Then could someone tell me what is the point in learning JDBC if you can't use it for web applications? Could someone then tell me which to learn in order for me to implement using my database on the web. Should I learn how to do it as a servlet or in JSP. Which is going to require less time to learn. I am kinda in a time crunch on this one. I would really like to learn both and I will probably go back and do that but I don't have time to learn both so any advice would be helpful. Thank you for you time.

  • How to avoid swing program exit

    My application, while in a specific condition, need to avoid program exit. In my application program exit can be done:
    - through a menu bar menu item (exit): no problem to avoid exiting, I manage it with success.
    - by clicking the standard red button in the applcation title bar (in other words the standard close button): here I need your help since I didnt' found a way to avoid the program closure.
    To be clear, my application should avoid ( I mean avoid not delay) it's closure when is communicating (throgh RS232C connection) with other external devices, infact when the user select the exit item in main menù the application show a warning dialog with the mesage "you connot exit now, wait communication end". But I don't fiond a way to do the same whit close button, I can do something (i.e. showing the warnign dialog) creating a listener but I cannot "consume" the event so I'm not able to avoid the program exit.
    Do you know a way to do it?
    Thanks a lot for your help.

    I tried with setDefaultCloseOperation(...) but seems have no effect one exit (exit in any case). I don't know if is a matter of SingleFrameApplication implementation (that I use since my project is crated with NetBeans swing wizard).
    In any case at the end I found success using the SingleFrameApplication ExitListener interface, hereafter my solution (that works correctly):
    public class FuelFEPApp extends SingleFrameApplication {
        class ConfirmExit implements ExitListener
            public boolean canExit(java.util.EventObject e)
                boolean result= false;
                if (mainThread.areChannelsCommunicating())
                    // There are communications running, avoid exit...
                    Object source = (e != null) ? e.getSource() : null;
                    Component owner = (source instanceof Component) ? (Component)source : null;
                    JOptionPane.showMessageDialog(owner,
                                                  (Object)"Communications running, you cannot exit application",
                                                  "Warning",
                                                  JOptionPane.WARNING_MESSAGE);
                else
                    // No communications then exit
                    result= true;
                return result;
            public void willExit(java.util.EventObject e)
        @Override protected void startup() {
            FEPView= new FuelFEPView(this);
            show(FEPView);
            this.addExitListener(new ConfirmExit());
    ...

  • How to start managed server from console?

    Hi,
    After several unsuccesful attempts to start a managed server from admin console,
    which starts fine by script and stops by console, can somebody please mail me
    what to enter in the "remote start" tab!
    The documentation is very uncertain if the path have to be absolute or not. It
    seems to be a problem with the classpath.
    thanks in advance
    Kai

    The ServerStart element should look like below (WLS6.1sp1+). Using absolute
    path is definitely OK. Please provide us more info if you still have this
    problem such as files under WL_HOME\NodeManagerLogs\<mgr'ed servername>
    especially config and <mgr'ed server name>_error.log
    <ServerStart Arguments="-mx64m -ms64m" BeaHome="d:\bea"
    ClassPath="d:\bea\load1;d:\bea\load1\lib\weblogic_sp.jar;d:\bea\load1\lib\we
    blogic.jar"
    Name="Server-1005280911753"
    OutputFile="d:\bea\load1\config\NodeManagerClientLogs\managed1\startserver_1
    005280991998.log"
    RootDirectory="d:\bea\load1"
    SecurityPolicyFile="d:/bea/load1/lib/weblogic.policy"/>
    "Kai" <[email protected]> wrote in message news:3bea490f$[email protected]..
    >
    Hi,
    After several unsuccesful attempts to start a managed server from adminconsole,
    which starts fine by script and stops by console, can somebody please mailme
    what to enter in the "remote start" tab!
    The documentation is very uncertain if the path have to be absolute ornot. It
    seems to be a problem with the classpath.
    thanks in advance
    Kai

  • Download to an external hard drive: How to start the program?

    I seem to have successfully downloaded and installed the trial version of Adobe Photoshop CS5.  My hard drive shows several separate folders: Adobe, Adobe Photoshop CS5.1, Adobe Bridge CS5.1, Adobe Device Central CS5.5, and Adobe Extension Manager CS5.5.  How do I open the program and use it?
    Thanks.

    Which operating system are you using?  Typically you will want to double click on the application itself to launch the program.  They will typically end in .exe for Windows applications or .app for Mac apps.

Maybe you are looking for

  • How do I change the language back to english as it is running in dutch

    how do I change the language back to english as it is running in dutch in error at the moment. I have uninsatlled and reinstalled itunes to no avail

  • Itunessetup.exe removal

    Yesterday I bought a new laptop with Windows 7. I am not very computer savy and the first time I attempted to install itunes last night I saved the 32 bit version of itunessetup.exe file on my desktop, when i tried to install it, an error message app

  • Bookmarks on left disappeared and I can't get them back.

    They just did not appear this afternoon on booting. I do not have a 'view' option on my Firefox tab, so the help offered does not work for me.

  • Bookmarks in iPad2

    How can I manage the Bookmarks in Safari on iPad 2? Once placed on the Bar or in the folder, I'm not able to either modify or delete them. Thanks!

  • Some photos outside viewing area Bridge CS5

    Some of my files are outside the viewing area of my monitor when I try to choose them from the Bridge program.  At first there was a slider at the bottom of the screen, but after I loaded and installed the update from Adobe and restarted, even that o