Java code to minimize the command prompt window when we hit

Hi All,
I am using Command promt to convert frame maker files to pdf files... When I hit the batch file, Command prompt window is coming on to the center of the screen, customer doesnt want this one .
Is there anyway to minimize the command prompt window like we can show up in the status bar and not on the screen .

To get better help sooner, post a [_SSCCE_|http://mindprod.com/jgloss/sscce.html] that clearly demonstrates your problem.
Use code tags to post codes -- [code]CODE[/code] will display asCODEOr click the CODE button and paste your code between the {code} tags that appear.
db

Similar Messages

  • How can we write the code for opening the command prompt and closing the

    how can we write the code in java for opening the command prompt and closing the cmd prompt from eclipse (cmd prompt should close when click on the turminate button in eclipse)

    rakeshsikha wrote:
    how can we write the code for opening the command prompt and closing theBy typing in Eclipse (which you seemingly have)?

  • How to hide command prompt window when using system exec

    Hello, I'm using the system exec VI to do some file transfers for a LabVIEW application.  I'm worried that the black command prompt window with white scrolling text that pops up when system exec is called might frighten the non-tech savy users of this LabVIEW application.  Is there a way to hide the command prompt window?
    Solved!
    Go to Solution.

    Wire a TRUE to the Run Minimized input.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Is it possible to run a java program without using the command prompt?

    Hi,
    I was wondering whether it is possible to run a Java program (not an applet) without using a command line in the command prompt?
    Basically I want to run a program that will be continually running in the background and hence I don't want to have a command prompt screen loaded up as well - I just want the program to be running in the task bar.
    I know how to run the program in the task bar - but I still need to launch the program from the command prompt - is there anyway I can get a program running without having to start it from the command prompt?
    Cheers

    Or create a desktop shortcut (in Windows) or an application launcher ( in Linux GUI).

  • Unchanging header in command prompt window

    I didn't really know where to ask this. I'm writing a text-based adventure game, like Zork. And in Zork and most games like this, there is a header(or whatever you want to call it) at the top of the window that displays information relevant to the game (location, score, #moves, etc.). As new text is displayed and the old text moves up, the header stays at the top and doesn't move. And I was just wondering how I could do this in Java.

    Cifa wrote:
    zilk wrote:
    ......... there is a header(or whatever you want to call it) at the top of the window that displays information relevant to the game (location, score, #moves, etc.). As new text is displayed and the old text moves up, the header stays at the top and doesn't move. And I was just wondering how I could do this in Java.My understanding is he wants something that will look like a command prompt to display game info. First of all you understanding is not correct. I don't know why this is so difficult for you to grasp. Based on your other thread you are obviously not an idiot but why you are persisting in advice for a solution that the OP _clearly does not want_ is beyond me.
    Here is why I am right and you are wrong.
    1) The title of this thread is "Unchanging header in command prompt window " Note the "command prompt window" part. The OP says in the subject what they are looking for and no Swing or other GUI components are in any way implied by that.
    2) The first post says "I'm writing a text-based adventure game," which again is an indication. Now by itself it could mean a few things but in light again of "command prompt window" it's pretty clear what the OP is asking for.
    3) And this is a big one so please pay attention. You offered advice in reply #1 assuming the OP wanted a GUI. Now again based on 1 and 2 I think it's reasonable for you to have known that that wasn't wanted but whatever you gave some advice. And the OP returned and said in reply #2 "No, what I need relates specifically to the command prompt." I honestly don't know how either the OP or I could be any clearer than that. No, not GUI. Wants something that works "specifically to the command prompt"
    I mean really. This is very clear. The OP does not want to use Swing components_ .
    I am not "forcing" the OP into any decision. If the OP decides to use Swing great. If they decide not to, also fine with me. I couldn't care less either way frankly. But I, and I alone, am giving the OP the only correct advice in this thread based on what the OP has clearly stated several times that they are looking for.
    I have no idea why you are arguing with me. I don't know why you insist on saying that I am wrong, or implying that I am forcing the OP down a road they don't want to go. Your reply after my first reply with "And i don't quite agree with the previous post. " was a mistake. You were wrong. You are wrong. Just move on.

  • HT201413 how do i test a port on my windows 7 computer? i followed the steps in this article, but the command prompt said that "telnet" is not a valid command.

    So I havent been able to connect to the iTunes store since June. It's getting a tad annoying. I followed all of the troubleshooting steps that i could find, and I am currently on the last one, which involves making sure that the ports that iTunes needs to function are open on my computer. I followed the article that was telling me how to do this, found my ip address, and was on the step where you actually check the port. I was told to use the command telnet, but when i did, the command prompt told me that " 'telnet' is not recognized as an internal or external command, operable program, or batch file." So, I seem to be stuck. If someone could enlighten me on how to actually check if a port is open, or how to fix error code 11222, please let me know.

    Windows 7 may need telnet installed, as mentioned in http://technet.microsoft.com/en-us/library/cc771275(v=ws.10).aspx
    I think 11222 is actually support.apple.com/kb/TS4123. Is that what you see?
    I'm guessing you have one of the programs listed there and updating it may resolve.
    Tricky bit is some software is bundled with other software - like RealPlayer Plus bundles Speedbit.
    I hope that helps.

  • Code for how to read an integer array from the command prompt...

    hello,
    Could anyone give me the code for how to read an integer array from the command prompt...its very urgent!..

    If you are using a recent version of Java (5 or later) you can use Scanner:
    http://java.sun.com/javase/6/docs/api/java/util/Scanner.html
    That page has some example code on it, too.

  • Testing Java Concurrent Program on the command line in Windows

    I'm using the suggestions in:
    http://blogs.oracle.com/xmlpublisher/2007/05/02
    to test my Java concurrent program on the command line. Our production environment is running on Unix. I've been able to test it successfully on the Unix environment from the command line. However, it fails when I try to test it on the Windows command line with the following stack trace:
    Exception in static block of jtf.cache.CacheManager. Stack trace is: oracle.apps
    .jtf.base.resources.FrameworkException: IAS Cache initialization failed
    at oracle.apps.jtf.cache.IASCacheProvider.init(IASCacheProvider.java:225
    at oracle.apps.jtf.cache.CacheManager.activateCache(CacheManager.java:14
    44)
    at oracle.apps.jtf.cache.CacheManager.initCache(CacheManager.java:752)
    at oracle.apps.jtf.cache.CacheManager.<clinit>(CacheManager.java:378)
    at oracle.apps.fnd.cache.Cache.setCacheFullName(Cache.java:228)
    at oracle.apps.fnd.cache.Cache.initCache(Cache.java:114)
    at oracle.apps.fnd.cache.Cache.<init>(Cache.java:89)
    at oracle.apps.fnd.cache.AppsCache.<init>(AppsCache.java:86)
    at oracle.apps.fnd.cache.AolCaches.getCache(AolCaches.java:155)
    at oracle.apps.fnd.profiles.Profiles.<clinit>(Profiles.java:241)
    at oracle.apps.fnd.profiles.ExtendedProfileStore.init(ExtendedProfileSto
    re.java:498)
    at oracle.apps.fnd.profiles.ExtendedProfileStore.<init>(ExtendedProfileS
    tore.java:119)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
    orAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
    onstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
    at oracle.apps.fnd.common.AppsContext.instantiateProfileStore(AppsContex
    t.java:4312)
    at oracle.apps.fnd.common.AppsContext.makeProfileStore(AppsContext.java:
    1171)
    at oracle.apps.fnd.common.Context.setProfileStore(Context.java:970)
    at oracle.apps.fnd.common.Context.setProfileStore(Context.java:952)
    at oracle.apps.fnd.common.AppsContext.initializeContext(AppsContext.java
    :958)
    at oracle.apps.fnd.common.AppsContext.initializeContext(AppsContext.java
    :918)
    at oracle.apps.fnd.common.AppsContext.<init>(AppsContext.java:752)
    at oracle.apps.fnd.cp.request.CpContext.<init>(CpContext.java:141)
    at oracle.apps.fnd.cp.request.CpContext.<init>(CpContext.java:124)
    at oracle.apps.fnd.cp.request.Run.main(Run.java:127)
    Caused by: oracle.apps.jtf.base.resources.FrameworkException: null
    null
    CacheDefaultConfig.properties (The system cannot find the file specified)
    at oracle.apps.jtf.base.resources.FrameworkException.convertException(Fr
    ameworkException.java:607)
    at oracle.apps.jtf.base.resources.FrameworkException.addException(Framew
    orkException.java:585)
    at oracle.apps.jtf.base.resources.FrameworkException.<init>(FrameworkExc
    eption.java:66)
    at oracle.apps.jtf.base.resources.FrameworkException.<init>(FrameworkExc
    eption.java:88)
    at oracle.apps.jtf.base.resources.FrameworkException.<init>(FrameworkExc
    eption.java:202)
    at oracle.apps.jtf.base.resources.FrameworkException.<init>(FrameworkExc
    eption.java:218)
    at oracle.apps.jtf.base.resources.FrameworkException.<init>(FrameworkExc
    eption.java:249)
    ... 26 more
    Exception in thread "main" oracle.adf.mds.exception.MDSRuntimeException: Cache n
    ot initialized
    at oracle.apps.fnd.framework.mds.cache.ATGCacheMgrDelegateImpl.<init>(AT
    GCacheMgrDelegateImpl.java:325)
    at oracle.apps.fnd.framework.mds.cache.ATGCacheFactoryImpl.<init>(ATGCac
    heFactoryImpl.java:44)
    at oracle.apps.fnd.cp.request.CpContext.getMDSContext(CpContext.java:116
    9)
    at oracle.apps.fnd.cp.request.Run.main(Run.java:130)
    I've put the appsborg2.zip file in my classpath. I've also copied the entire (1 GB) worth of Java .class files for Oracle apps onto my computer and placed it on my classpath. Is there something that prevents me from testing out my Java concurrent program on my Windows machine from the command line?

    i think if u run the ap in the command line then it has to stay open, you could try writing a .bat file then when that is executed it will only open the command line for the program execution (i think)

  • How can I pass a value to the command prompt?

    I was wondering how can I pass a value to the command prompt with Windows and Linux? I'm more interested in Linux's system than Windows though. Is there a way to return info from the command prompt?

    Here is a snippet from http://mindprod.com/jglossexec.html that explains how in detail.
    Runtime.getRuntime().exec("myprog.exe") will spawn an external process that runs in parallel with the Java execution. In Windows 95/98/ME/NT/2000/XP, you must use an explicit *.exe or *.com extension on the parameter. It is also best to fully qualify those names so that the system executable search path is irrelevant, and so you don't pick up some stray program off the path with the same name.
    To run a *.BAT, *.CMD, *.html *.BTM or URL you must invoke the command processor with these as a parameter. These extensions are not first class executables in Windows. They are input data for the command processor. You must also invoke the command processor when you want to use the < > | piping options, Here's how, presuming you are not interested in looking at the output:
    Runtime.getRuntime( ).exec ("command.com /E:1900 /C MyBat.bat" );
    Runtime.getRuntime( ).exec ("cmd.exe /E:1900 /C MyCmd.cmd" );
    Runtime.getRuntime( ).exec ("C:\\4DOS601\\4DOS.COM /E:1900 /C MyBtm.btm" );
    Runtime.getRuntime( ).exec ("D:\\4NT301\\4NT.EXE /E:1900 /C MyBtm.btm" );
    There are also overloaded forms of exec(),
    Runtime.getRuntime( ).exec ("command.com /E:1900 /C MyBat.bat", null);
    Runtime.getRuntime( ).exec ("command.com /E:1900 /C MyBat.bat", null, "C:\\SomeDirectory");
    The second argument can be a String [], and can be used to set environment variables. In the second case, "C:\\SomeDirectory" specifies a directory for the process to start in. If, for instance, your process saves files to disk, then this form allows you to specify which directory they will be saved in.
    Windows and NT will let you feed a URL string to the command processor and it will find a browser, launch the browser, and render the page, e.g.
    Runtime.getRuntime( ).exec ("command.com http://mindprod.com/projects.html" );
    Another lower level approach that does not require extension associations to be quite as well set up is:
    Runtime.getRuntime( ).exec ("rundll32 url.dll,FileProtocolHandler http://mindprod.com/projects.html" );
    Note that a URL is not the same thing as a file name. You can point your browser at a local file with something like this: file://localhost/E:/mindprod/jgloss.html or file:///E|/mindprod/jgloss.html.
    Composing just the right platform-specific command to launch browser and feed it a URL to display can be frustrating. You can use the BrowserLauncher package to do that for you.
    Note that
    rundll32.exe url.dll,FileProtocolHandler file:///E|/mindprod/jgloss.html
    won't work on the command line because | is reserved as the piping operator, though it will work as an exec parameter passed directly to the rundll32.exe executable.
    With explicit extensions and appropriately set up associations in Windows 95/98/ME/NT/2000/XP you can often bypass the command processor and invoke the file directly, even *.bat.
    Similarly, for Unix/Linux you must spawn the program that can process the script, e.g. bash. However, you can run scripts directly with exec if you do two things:
    Start the script with #!bash or whatever the interpreter's name is.
    Mark the script file itself with the executable attribute.
    Alternatively start the script interpreter, e.g.
    Runtime.getRuntime( ).exec (new String[]{"/bin/sh", "-c", "echo $SHELL"}";

  • Compiling via the command prompt?

    Hi, I need to compile a program via the command prompt, and I need help setting up the windows environmental variables. I have followed multiple online tutorials on how to do this, but I keep getting the classDefNotFound exception. Can somebody please tell me which variables I should set? Thanks.

    since you are getting a java error, you don't need to change your PATH. All what remains is your CLASSPATH variable. Let's say you have created a directory c:\classes and you store all your classes in subdirectories according to their package. Then your CLASSPATH would like like this:
    .;c:\classes
    Note the dot at the beginning, that means "current directory", so the directory where you invoke java/javac is also part of the classpath. Note also that each item in the classpath is seperated with a ; .
    If you need to add jars to the classpath, don't add the directory containing the jars but add the jars themselves.
    .;c:\classes;c:\jar\yourjar.jar;c:\jar\otherjar.jar
    Hope that helps.

  • Command prompt window problem

    Hi,
    Can anyone tell me how to open a command prompt window from a Java GUI application? The application is started as a excutable JAR file and there is no command prompt window showing up in the beginning.
    Thanks a lot
    Wenly

    Thank you guys, I have checked the doc and it seems the Runtime.getRuntime().exec(); will start a seperated process.What I need is to open a command prompt window in the same process of my application and display message on it by using System.out.println()
    Is it possible?

  • How can i run application client from the command prompt ?

    Hi,
    I'm new to java & EJB. so can any body tell me the command to run the application client from the command prompt. Here is the code to print hello world:
    /* Remote interface */
    public interface Hello extends javax.ejb.EJBObject
         public String hello() throws      java.rmi.RemoteException;
    /* Home interface */
    public interface HelloHome extends javax.ejb.EJBHome
         Hello create() throws java.rmi.RemoteException, javax.ejb.CreateException;
    /* Stateless session bean class */
    public class HelloBean implements javax.ejb.SessionBean
         private javax.ejb.SessionContext ctx;
         public void ejbCreate(){
              System.out.println("ejbcreate()");
         public void ejbRemove(){
              System.out.println("ejbRemove()");
         public void ejbActivate(){
              System.out.println("ejbActivate()");
         public void ejbPassivate(){
              System.out.println("ejbejbPassivate()");
         public void setSessionContext(javax.ejb.SessionContext ctx){
              this.ctx=ctx;
         public String hello(){
              System.out.println("hello()");
              return "Hello, world!";
    /*Client class */
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import java.util.Properties;
    public class HelloClient
         public static void main(String[] args) throws Exception{
              Properties props=System.getProperties();
              Context ctx=new InitialContext(props);
              Object obj=ctx.lookup("HelloHome");
              HelloHome home=(HelloHome)javax.rmi.PortableRemoteObject.narrow(obj,HelloHome.class);
              Hello hello=home.create();
              System.out.println(hello.hello());
              hello.remove();
    I have stored .java files in c:\ejb
    I have successfully created the .class files using javac command in the following directory :
    c:\ejb
    I have also created Helloworld.ear file in c:\ejb using sun application server which contains the following files:
    ejb-jar-ic.jar
    app-client-ic.jar
    sun-j2ee-ri.project
    application.xml
    sun-application.xml
    Manifest.mf
    But the problem is that i'm not able to run the HelloWorld.class file successfully from the command prompt. So please suggest me the comand.
    Thanx in advance.
    Best regards,
    Pankaj

    Hi
    You can run this code from the command prompt in the same way as you run any other simple java program. The only thing is you need to set the Home and Local interfaces in the classpath.And obviously if u had deployed the bean in ur app server container, then its all over.
    And one more thing is that u need to set the provider URL in the InitialContext created in the client program.
    Thanks
    Arun B

  • Hiding the command prompt when executing bat file

    Hi,
    I hava a bat file which contains following
    java -jar MyJar.jar
    When I execute the bat file, the jar file is executed. But a command prompt also opens along with it. I dont want to display the command prompt to the user. Is there any way to hide that command prompt ?
    regards,
    Jatin.

    Is your problem solved?
    If not then
    insted of creating a batch file create a form file in visual basic and write following code in it
    shell "java -jar MyJar.jar"
    Endand then create its exe file.
    It will just launch your jar file and then exit.

  • How to hide the command prompt

    I want to hide the command prompt as soon as the execution begins.
    please can you guide me
    thanks

    Hi,
    I tried as suggested but got the following exception :
    java.io.IOException: CreateProcess: start /B cmd /c myprogram.bat error=2
    at java.lang.Win32Process.create(Native Method)
    at java.lang.Win32Process.<init>(Win32Process.java:66)
    at java.lang.Runtime.execInternal(Native Method)
    at java.lang.Runtime.exec(Runtime.java:551)
    at java.lang.Runtime.exec(Runtime.java:477)
    at java.lang.Runtime.exec(Runtime.java:443)
    I have the myprogram.bat file [other commands like "echo also do not work].
    The O.S is Windows 2K [it does have the start command] and I am using Jdk 1.3.1x
    Thanks !

  • Set Title of Windows Command Prompt Window

    I'm running a text-only Java application in a Windows XP Command Prompt window. Is there a way for my application to change the title of the window as it runs?

    GaryS wrote:
    I'm running a text-only Java application in a Windows XP Command Prompt window. Is there a way for my application to change the title of the window as it runs?no. command prompt actions in java are weak/nonexistent. probably due to the lack
    of cross platform similarities. you can always run your program using a batch file and
    set the title in there.

Maybe you are looking for

  • Error with opening a connection to a url (for cgi use)

    i still am having trouble using a cgi executable on my server, but i cant seem to narrow down what my problem is. i followed the following tutorial, but am still getting errors. http://java.sun.com/docs/books/tutorial/networking/urls/readingWriting.h

  • Why can I not attach multiple files on iPad ???

    Why does iPad not allow multiple files to be attached. This is one of the very basic feature all computers must have...why is apple trying to complicate the like of people without this simple feature ??????? Please add this feature in your iOS update

  • Design mode could not load playerglobal.swc.

    I'm getting this warning Design mode could not load playerglobal.swc. It may be incompatible with this SDK, or invalid. (DesignAssetLoader.CompleteTimeout)   I installed Flash Builder 4 Beta 2 And added the Player Global SWC Create content using the

  • SAP Query: Transport tool(program: RSAQR3TR)

    Does the SAP Query: Transport tool(program: RSAQR3TR) transport addtional fields and code in Extras of an InfoSet from one system to another? TKS in advance.

  • BIll of Material (BOM)

    Hi All, I would like to know how BOM(IDNRK - Material No.) available in (STPO table) is linked with Operation/Activity Number(VORNR) and Group Counter(PLNAL). Transaction Code IA07 Thanks, Pratibha