Launch Java App from Windows Desktop

What's the best way to launch a Java application from a Windows XP desktop without the console showing?

If your class Main.class is part of a package, you cannot invoke Main directly without providing the package. You may have to include the -classpath option (depending of the working directory). The default value for -classpath is "."
You should try:
javaw myPackage.Main
(if the working directory is parent to directory 'myPackage')
or
javaw -classpath .;c:\xxx\xxx\. myPackage.Main
"c:\xxx\xxx\" is your root package's parent directory. Note that you may have to double quote the specified path.
For details:
http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/java.html

Similar Messages

  • Launching an Application from Windows Desktop

    Hi,
    I have just completed writing a "hotel reservation system" program.However, I need to have my program install into a Windows o/s and then launch it by clicking on an icon on the desktop or through the program group.
    I have no idea as to how to achieve this.I am only conversant with Java2 and have no knowledge of C or C++.
    Please help me out with the code and the theory behind it.
    Thanks.
    Kapila

    Jar information
    http://java.sun.com/docs/books/tutorial/jar/basics/index.html
    http://java.sun.com/j2se/1.3/docs/guide/jar/jarGuide.html
    http://java.sun.com/docs/books/tutorial/jar/
    http://java.sun.com/docs/books/tutorial/jar/basics/manifest.html
    Webstart information
    http://java.sun.com/products/javawebstart/1.2/docs/developersguide.html#req
    http://developer.java.sun.com/developer/technicalArticles/JavaLP/javawebstart/
    http://developer.java.sun.com/developer/JDCTechTips/2001/tt0530.html
    http://java.sun.com/products/javawebstart/faq.html
    rykk

  • Drag and Drop file FROM Java app TO native desktop

    I'm a litte new to Drag and Drop. After a few days of looking around I've been through enough examples to copy and paste some skeleton code and get it working in my own application.
    What I haven't gotten any answers to (after searching on google, newsgroups, and here) is if it's possible to drag something from a Java app to the desktop or file browser, and have java create a file there.
    I know you can drag text to native apps, so I was wondering if you could make a Transferable object that's different than StringSelection(), like a file stream or something.
    Thanks,
    Tristan

    Tristan,
    I am stuck in the same place. Perhaps we could work on this together.
    I am trying to drag a single item from a JList to a text editor, Word, etc. I have two problems:
    1) I can't seem to get just the item in the JList to drag. It wants to drag the entire JList component.
    2) How does one define the remote application as the drop target? Have not found any examples either.
    Is the drop target actually the system clipboard?
    Rp

  • After upgrading to Mavericks I can no longer drag an app from one desktop to another.

    On Mountain Lion I could move apps from one desktop to the other by simple dragging them to the right which would transition to the next desktop. Now the only way I can do it is to use mission control. Anyone else seeing this?

    I actually have the same problem, since I upgraded to Mavericks my MacBook Pro can't seem to find the Bose sounddock 10. Has anyone found a solution to this.
    It still works with the iPhone 5
    Thank you

  • I've downloaded the new version according to Creative Cloud but when I try to launch the app the window appears saying there is a new version, so I click on download now and it crashes. What's happening and what should I do? Thanks.

    I've down loaded the new version according to Creative Cloud but when I try to launch the app the window appears saying there is a new version, so I click on download now and it crashes. What's happening and what should I do? Thanks.

    Thank you so much. I finally got it to work. I don't know why it has to be such an ordeal when it comes to Adobe products!
    Todd
    Todd McVey
    Art Direction
    201-723-0104
    [email protected]
    www.toddmcvey.com
    @mctwitthis

  • How do you launch an app from a shell?

    how do you launch an app from a shell?  how about an example... say, launch the texteditor app.

    To open an app from the terminal use the command open followed by the fullpath pf the command.
    So for TextEdit you would enter
    open /Applications/TextEdit.app

  • How do I download an app from my desktop?

    I completely blanked out when trying to download an app from my desktop.
    I successfully downloaded it to my Ipod but would like to know how do it from my desktop.
    Thanks.
    D. Turner

    What do you mean from your desktop?
    You can sync apps (and other media) from your iTunes library to the iPOd
    iTunes: Syncing media content to iOS devices and iPod       

  • I'm downloading my apps from my desktop, but when i'm downloading apps from my laptop, the apps can't be transfered. what setting could i adjust so that i could transfer my apps from my laptop to my ipod touch4. Thank you very much-ariston

    i'm downloading my apps from my desktop, but when i'm downloading apps from my laptop, the apps can't be transfered. what setting could i adjust so that i could transfer my apps from my laptop to my ipod touch4. Thank you very much-ariston

    You can only sync to one iTunes Library/one computerbut you can manage music among different computers.  See:
    Using iPhone, iPad, or iPod with multiple computers
    The only way to sync app from the desktop computer is to make that the syncing computer.  You can't sync app from more than one iTunes Library/one computer.
    To make the desktop computer the syncing computer you have to:
    - get all apps and other item on the desktop computer
    - Authorize the computer for the iTunes accounts inquestion
    - Connect the iPod to the desktop computer and make a backup by right clicking on the iPod under Devices in iTunes and selecting Backup
    - Restore the iPod from that backup

  • How to launch an app from Java in Mac OSX?

    I would like to launch another application from my Java code which will run on OS X. Doesn anyone know how to do this? I think it involves the "Runtime.getRuntime.exec()" method, but I'm not sure how to tell it which application to launch.
    Thanks

    I dont know about OSX but i can give you a generalized
    solution. In all OS's there will be a way to get to
    command prompt. It is not really true: MacOS is one noticeable exception! Version 9, like every previous one, was completely extraneous to the notion of "command prompt", because the Macintosh, since its origin to nowadays, has been a "fanatically" User-Centric system: everything is iconic. A side effect of this approach is that MacOS was a pretty hard platform for low-level developers...
    In MacOSX things have dramatically changed: this OS is a powerful Unix-like one, with the beautiful dress that only a Mac can wear: and finally, all you Mac users, here it is: the shell!
    Of course, in MacOSX (and in MacOS "classic" too) there are paths and executable files.
    MacOS1-9 file-system was a very peculiar one: resource fork and data fork for every file, ":" as path components separator (but what "common" user has ever seen a Macintosh path?) and so on.
    MacOSX will use an Unix-like filesystem, I guess (I'm not a Mac user, I like every OS for its beauties - and therefore dislike Microsoft products even if often they give me bread).
    But the key question is: how do I tell the runtime which file it has to execute?
    Fortunately, every modern SO I know adopts a hyerarchical organization of its files. So, indipendently of what is considered the "root" ("C:\", "/" or whatever else), you can "trace" a relative path from your current path (if you use an Unix or URL idiom, "./") and the file you want to reach.
    So, if your java app ("JavaApp.class") is placed in a folder called "MyJavaApp", nested in another folder called "Programs" that you see when you click on the "MacHD" icon, and you can manually launch the Mac app you're interested in clicking on an icon called "MyMacApp Program", placed in a folder called "MyMacApp", nested in another folder called "Programs" that you see when you click on the "MacHD" icon (it's the same folder we said before :-) ), using Unix or URL sintax we have that:
    your java application is at: [...]/MacHD/Programs/MyJavaApp/JavaApp.class
    the Mac application is at:
    [...]/MacHD/Programs/MyMacApp/MyMacApp Program
    The relative path from the former to the latter is, therefore:
    ../MyMacApp/MyMacApp
    where two dots ("..") are the symbol for "parent folder".
    If the situation is similar to above, the code to launch MyMacApp should be something like this:
    import java.io.File;
    File currentDir=new File("");
    //supposing that double dot (..) is the symbol for "parent folder"
    Runtime.getRuntime(
         new File(currentDir,".."
         +File.separator
         +"MyMacApp"
         +File.separator
         +"MyMacApp Program"
         ).getAbsolutePath()
    in a more portable fashion - if you're not sure ".." works
    (? who cares? we're launching a native app :-)) )
    Runtime.getRuntime(
         new File(currentDir.getParent(),
         "MyMacApp"
         +File.separator
         +"MyMacApp Program"
         ).getAbsolutePath()
    );Hope it works... good work!

  • Invoking desktop app from Windows store App

    Hi,
    I have a Windows form desktop application developed using c#. I want to make use of the live tile feature available in WinRT apps (especially for Windows 10). The data in the live tile is to be fetched using WMI queries (Win32_LogicalDisk).
    How do I accomplish this? I don't want to rewrite the entire app. Live tiles should update on the background and on clicking the tile, my desktop app exe needs to be invoked. Is it possible to fetch WMI data and invoke exe from Windows Store apps?
    I tried using Brokered Windows Runtime components as given in http://blogs.msdn.com/b/dmx/archive/2014/04/30/how-to-trigger-a-desktop-process-from-windows-store-apps-the-easy-way-using-the-brand-new-visual-studio-templates.aspx . But could not get it to
    work as I get a 'TypeLoadException'.
    Thanks in advance.

    First, we'll assume that you're writing an LOB app, not an app intended for Store distribution, as you are trying to use a brokered component.
    The use of a brokered component is the correct thing for you to do in this case, as neither WMI nor Process.Start are available to regular Windows Store apps.  It's just a matter of proper creation of the brokered windows component for you to get going.
    My buddy Prashant wrote a cheatsheet for Brokered Components. I know it works as I've followed it myself:
    http://blogs.msdn.com/b/wsdevsol/archive/2014/04/14/cheat-sheet-for-using-brokered-windows-runtime-components-for-side-loaded-windows-store-apps.aspx
    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.
    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined
    objects and unknown namespaces.

  • Java Errors when using my Java App via Remote Desktop

    I have a Java App that runs fine if I invoke it and run it on a windows xp machine "x".
    If I remote desktop connect to machine "x" from another windows machine "y"
    I get the errors and the Java App is not displayed correctly. It becomes unusable.
    While remotely connected if I terminate the Java App and restart it the App
    will run just fine and not generate any errors.
    Specifically the steps are:
    Open a cygwin shell.
    invoke the app...java -jar xxx.jar
    use the app on the machine, works fine without any exceptions.
    Leave the app running and go home...eat dinner...then
    VPN into the office
    Startup Windows Remote Desktop to the pc running the app.
    Start to use the app. Now the exception occur as I click on buttons/enter data into fields.
    Then I terminate the App.
    Then I restart the app... java -jar xxx.jar
    It works fine without exceptions.
    This app was developed using NetBeans 6.5
    The errors are:
    in thread "AWT-EventQueue-0" java.lang.NullPointerException
    at com.sun.java.swing.plaf.windows.XPStyle$Skin.getWidth(Unknown Source)
    at com.sun.java.swing.plaf.windows.XPStyle$Skin.getWidth(Unknown Source)
    at com.sun.java.swing.plaf.windows.WindowsIconFactory$CheckBoxIcon.getIc
    onWidth(Unknown Source)
    at javax.swing.SwingUtilities.layoutCompoundLabelImpl(Unknown Source)
    at javax.swing.SwingUtilities.layoutCompoundLabel(Unknown Source)
    at javax.swing.plaf.basic.BasicRadioButtonUI.getPreferredSize(Unknown So
    urce)
    at com.sun.java.swing.plaf.windows.WindowsRadioButtonUI.getPreferredSize
    (Unknown Source)
    at javax.swing.plaf.basic.BasicButtonUI.getMinimumSize(Unknown Source)
    at javax.swing.JComponent.getMinimumSize(Unknown Source)
    at javax.swing.GroupLayout$ComponentSpring.calculateNonlinkedMinimumSize
    (Unknown Source)
    at javax.swing.GroupLayout$ComponentSpring.calculateMinimumSize(Unknown
    Source)
    at javax.swing.GroupLayout$Spring.getMinimumSize(Unknown Source)
    at javax.swing.GroupLayout$ComponentSpring.calculatePreferredSize(Unknow
    n Source)
    at javax.swing.GroupLayout$Spring.getPreferredSize(Unknown Source)
    at javax.swing.GroupLayout$Group.getSpringSize(Unknown Source)
    at javax.swing.GroupLayout$Group.calculateSize(Unknown Source)
    at javax.swing.GroupLayout$Group.calculatePreferredSize(Unknown Source)
    at javax.swing.GroupLayout$Spring.getPreferredSize(Unknown Source)
    at javax.swing.GroupLayout$ParallelGroup.calculateMinimumSize(Unknown So
    urce)
    at javax.swing.GroupLayout$Spring.getMinimumSize(Unknown Source)
    at javax.swing.GroupLayout$Group.getSpringSize(Unknown Source)
    at javax.swing.GroupLayout$Group.calculateSize(Unknown Source)
    at javax.swing.GroupLayout$Group.calculateMinimumSize(Unknown Source)
    at javax.swing.GroupLayout$Spring.getMinimumSize(Unknown Source)
    at javax.swing.GroupLayout$Group.getSpringSize(Unknown Source)
    at javax.swing.GroupLayout$Group.calculateSize(Unknown Source)
    at javax.swing.GroupLayout$Group.calculateMinimumSize(Unknown Source)
    at javax.swing.GroupLayout$ParallelGroup.calculateMinimumSize(Unknown So
    urce)
    at javax.swing.GroupLayout$Spring.getMinimumSize(Unknown Source)
    at javax.swing.GroupLayout$Group.getSpringSize(Unknown Source)
    at javax.swing.GroupLayout$Group.calculateSize(Unknown Source)
    at javax.swing.GroupLayout$Group.calculateMinimumSize(Unknown Source)
    at javax.swing.GroupLayout$ParallelGroup.calculateMinimumSize(Unknown So
    urce)
    at javax.swing.GroupLayout$Spring.getMinimumSize(Unknown Source)
    at javax.swing.GroupLayout$Group.getSpringSize(Unknown Source)
    at javax.swing.GroupLayout$Group.calculateSize(Unknown Source)
    at javax.swing.GroupLayout$Group.calculateMinimumSize(Unknown Source)
    at javax.swing.GroupLayout$Spring.getMinimumSize(Unknown Source)
    at javax.swing.GroupLayout$Group.getSpringSize(Unknown Source)
    at javax.swing.GroupLayout$Group.calculateSize(Unknown Source)
    at javax.swing.GroupLayout$Group.calculateMinimumSize(Unknown Source)
    at javax.swing.GroupLayout$ParallelGroup.calculateMinimumSize(Unknown So
    urce)
    at javax.swing.GroupLayout$Spring.getMinimumSize(Unknown Source)
    at javax.swing.GroupLayout$Group.getSpringSize(Unknown Source)
    at javax.swing.GroupLayout$Group.calculateSize(Unknown Source)
    at javax.swing.GroupLayout$Group.calculateMinimumSize(Unknown Source)
    at javax.swing.GroupLayout$Spring.getMinimumSize(Unknown Source)
    at javax.swing.GroupLayout.calculateAutopadding(Unknown Source)
    at javax.swing.GroupLayout.prepare(Unknown Source)
    at javax.swing.GroupLayout.minimumLayoutSize(Unknown Source)
    at java.awt.Container.minimumSize(Unknown Source)
    at java.awt.Container.getMinimumSize(Unknown Source)
    at javax.swing.JComponent.getMinimumSize(Unknown Source)
    at javax.swing.plaf.basic.BasicTabbedPaneUI$TabbedPaneLayout.calculateSi
    ze(Unknown Source)
    at javax.swing.plaf.basic.BasicTabbedPaneUI$TabbedPaneLayout.minimumLayo
    utSize(Unknown Source)
    at java.awt.Container.minimumSize(Unknown Source)
    at java.awt.Container.getMinimumSize(Unknown Source)
    at javax.swing.JComponent.getMinimumSize(Unknown Source)
    at javax.swing.GroupLayout$ComponentSpring.calculateNonlinkedMinimumSize
    (Unknown Source)
    at javax.swing.GroupLayout$ComponentSpring.calculateMinimumSize(Unknown
    Source)
    at javax.swing.GroupLayout$Spring.getMinimumSize(Unknown Source)
    at javax.swing.GroupLayout$ComponentSpring.calculatePreferredSize(Unknow
    n Source)
    at javax.swing.GroupLayout$Spring.getPreferredSize(Unknown Source)
    at javax.swing.GroupLayout$Group.getSpringSize(Unknown Source)
    at javax.swing.GroupLayout$Group.calculateSize(Unknown Source)
    at javax.swing.GroupLayout$Group.calculatePreferredSize(Unknown Source)
    at javax.swing.GroupLayout$Spring.getPreferredSize(Unknown Source)
    at javax.swing.GroupLayout$Group.getSpringSize(Unknown Source)
    at javax.swing.GroupLayout$Group.calculateSize(Unknown Source)
    at javax.swing.GroupLayout$Group.calculatePreferredSize(Unknown Source)
    at javax.swing.GroupLayout$Spring.getPreferredSize(Unknown Source)
    at javax.swing.GroupLayout$Group.getSpringSize(Unknown Source)
    at javax.swing.GroupLayout$Group.calculateSize(Unknown Source)
    at javax.swing.GroupLayout$Group.calculatePreferredSize(Unknown Source)
    at javax.swing.GroupLayout$Spring.getPreferredSize(Unknown Source)
    at javax.swing.GroupLayout$SequentialGroup.setValidSize(Unknown Source)
    at javax.swing.GroupLayout$Group.setSize(Unknown Source)
    at javax.swing.GroupLayout.calculateAutopadding(Unknown Source)
    at javax.swing.GroupLayout.layoutContainer(Unknown Source)
    at java.awt.Container.layout(Unknown Source)
    at java.awt.Container.doLayout(Unknown Source)
    at java.awt.Container.validateTree(Unknown Source)
    at java.awt.Container.validateTree(Unknown Source)
    at java.awt.Container.validate(Unknown Source)

    Crossposted
    [http://forums.sun.com/thread.jspa?threadID=5421349&messageID=10892967#10892967]

  • Slow start of app from Windows-Share

    Hi,
    i have an ZFD-App which has to start an *.EXE from a Windows-Server. The command ist like \\winserver\icd\path\boxes.exe When I start this ZEN-App I have to wait longer than 30 seconds before I can see a logon-windows of this program. If I make a good old local link on my WinXP-desktop and I start this I see the logon-windows after only 2 seconds. This is e very big difference.
    I tested this scenario with another EXE from another windows-share, it's the same problem.
    Any suggestions?
    Uwe Bassen
    Hamburg
    Germany

    Well, if the user/workstation isn't authenticated to your windows box before
    the app starts, its going to have different timeout issues (I'm not sure how
    you have the app assocated).
    My suggestion: copy the exe to a location that the user/workstation already
    has rights to. Not sure why you have to run the app from a server the user
    doesn't have rights to already.
    You might be able to build in the authentication prompt into your app with a
    pre-launch script (i.e. net use )
    >>> On 12/21/2009 at 3:46 AM, in message
    <[email protected]>,
    bassen<[email protected]> wrote:
    > Hi,
    > i have an ZFD-App which has to start an *.EXE from a Windows-Server.The
    > command ist like \\winserver\icd\path\boxes.exe When I start thisZEN-App I
    > have to wait longer than 30 seconds before I can see alogon-windows of
    > this program. If I make a good old local link on myWinXP-desktop and I
    > start this I see the logon-windows after only 2seconds. This is e very big
    > difference.
    >
    > I tested this scenario with another EXE from another windows-share,it's
    > the same problem.
    >
    > Any suggestions?
    >
    > Uwe Bassen
    > Hamburg
    > Germany--
    bassen----------------------------------------------------------------------
    --bassen's Profile:
    > http://forums.novell.com/member.php?userid=30002View this thread:
    > http://forums.novell.com/showthread.php?t=396411

  • Cannot launch FocPro app from SGD Webtop

    Dear forum users,
    My customer uses a FoxPro application for their IT heldesk. Basically they installed the application to their own PCs and able to launch the app.
    Behaviour of FoxPro IT Helpdesk app:
    - User login to windows Desktop.
    - User will double-click My Computer and check if the Shared Network drive is connect ( Drive F ). Drive F contains the IT Helpdesk Database.
    - Then user will click, Start, Program, and launch their app.
    From SGD Windows Application Object:
    Name: IT Helpdesk Client
    Command path: C:\telbruapp\helpdesk\telbru.exe
    Note: The rest of the setting are defaults.
    From a Firefox browser:
    - Launch browser and point URL to SGD.
    - Enter username and password.
    - On the left panel, click the IT Helpdesk Client app( I saw connection activity to Windows Server( blue back ground ) and the application did not launch and also i saw the error message " .ini file missing! Can't continue....(Network) ".
    Note: I think, when i click the IT Helpdesk Client from SGD, the SGD straight-away connect and launch the app WITHOUT waiting the Drive F to connect. The app required the Drive F.
    Can anyone help me on this ?
    Thanks in advance.
    Regards,
    Mohamed Ali.

    Hi Remold,
    Tks again for replying my post message.
    I have solved the FoxPro problem.
    Customer installed their FoxPro client app in Terminal Server and has created two users( user1 and user2 ). As in my previous post, i had mentioned the app required Network Shared Disk(Drive F) to connect bcos the database is in Drive F.
    So, i RDP to TS1 and logged in as user1. I also created "Map Network Drive"
    the Drive F and save the password.
    Then, i RDP to TS1 and logged as user2 and did the same as for user1.
    After that, i configured SGD's Windows Application Object and entered the full app path in App Command. Also in Advanced tab, i edit -dir "C:\telbruapp\helpdesk".
    Now, from customer PC and laptop, user launched browser and login using their IDs and they can successfully launch the app.
    Important: Previously in TS1, user2 does not have the Drive F access. So, i had created it and save the Network password.
    Thanks Remold for your HELP and Guidance.
    Really appreciated your help.
    Regards,
    Mohamed Ali.

  • Launching java program via windows right click

    I've written a Java Applicaton to display some data files we get from our cash registers. The app is stored in a jar file, with a manifest file. Double-clicking the jar file runs the program. Then we can select open from the file menu adn open our data files.
    What I would like to add is the ability to right-click a data file in Windows, have the Java app appear in the Open With... menu in the popup menu, and then have windows launch the jar file.
    I understand I would have to change the program to accept a parameter, and I know how to do that from the command line.
    Is it possible to add a jar file to the popup menu in windows, and pass the path of the file into the main class in the jar file?
    I did some Google searches this morning but couldn't find anything.
    Thanks
    Bill

    Well purely speaking no. But then you can do most anything you like if you are clever with C++ and JNI.

  • Error when launching promoted app from RemoteAPP

    Hi:
    We are receiving this error when launching any application from RemoteAPP, we tried promoting Calculator, Notepad, etc. and received the same error as well.
    "Personalization:
    This theme can't be applied to the desktop.
    Try clicking a different theme"
    Help!
    Thank you,
    Stangride

    If you launch the app directly from the session hosts using the same account that your using with remoteapp what are you getting? Try and RDP to the session host when you attempt it. I would also check rsop.msc to see if you have any GPO or scripts that
    are manipulating themes.

Maybe you are looking for