Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: Shortcut executed or in-background running Java application

  1. #1
    Junior Member
    Join Date
    Apr 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Shortcut executed or in-background running Java application

    Hi All,

    I programmed myself a simple Java application with some Swing components. Now, I am able to run this app by double-clicking JAR file, or executing it in the console. What I'd like to do though is to be able to run the application as quickly as possible, that means with a shortcut I could use inside of any other program. I am using Windows 7, and the shortcut ability apparently doesn't work with files (neither .bats nor .jars). I have some apps that are running only in the system tray and can actually listen to my keyboard input all the time (and use shortcuts like win button + other key). That would be the best way for me to do it, but is it even possible with Java? If it was, I would just show my application's window upon pressing a shortcut.

    I will welcome any suggestions as to how to solve this problem.

    Thank you, xixixao


  2. #2
    Member DanBrown's Avatar
    Join Date
    Jan 2011
    Posts
    134
    My Mood
    Confused
    Thanks
    1
    Thanked 12 Times in 12 Posts

    Default Re: Shortcut executed or in-background running Java application

    As per my knowledge : you can also run your application in tray and can invoke your application by simply clicking on it or can invoke popup menu to ask what operation you want to perform.

    How to use System tray ?

    and if you want to invoke application using shortcut key , i think you need to Hook Keyboard for that.
    Thanks and Regards
    Dan Brown

    Common Java Mistakes

  3. #3
    Junior Member
    Join Date
    Apr 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Shortcut executed or in-background running Java application

    Quote Originally Posted by DanBrown View Post
    ...
    and if you want to invoke application using shortcut key , i think you need to Hook Keyboard for that.
    Thank you for that great advice, through a little searching I found this perfect solution for Java and windows, works like magic:

    jintellitype - JIntellitype is a Java API for interacting with Microsoft Intellitype commands as well as registering for Global Hotkeys in your Java application. - Google Project Hosting

Similar Threads

  1. List of shortcuts key for Eclipse
    By Flash in forum Java JDK & IDE Tutorials
    Replies: 3
    Last Post: July 18th, 2013, 08:40 AM
  2. Replies: 3
    Last Post: March 8th, 2011, 07:44 AM
  3. Replies: 3
    Last Post: January 28th, 2011, 09:37 AM
  4. How to schedule a Java Program for Background processing
    By rangarajank in forum Java Theory & Questions
    Replies: 5
    Last Post: May 13th, 2010, 03:57 AM
  5. Replies: 0
    Last Post: December 3rd, 2009, 04:43 PM