shortcut to  execute java program

Posted on 2005-05-04
Last Modified: 2011-09-20
I would have a java program that is to be run by some non technical users. I want to create a short cut to that program on the desktop so that when the user clicks on it the program is executed. I also want the output/errors to be redirected to a directory.

the java program is in c:\javaproject\
the log is in c:\temp\java.log.
Question by:anumit
    LVL 8

    Expert Comment

    Why not create a batch file
    Open notepad
    Type (without quotes)
    "java HelloWorld >> c:\temp\java.log"

    then save it as HelloWorld.bat

    Now doublicking on it should save the output to the temp folder

    Note: java Helloword is how I am assuming you run the program using the command line, if not then just replace it with what you use.
    Hope I could help
    LVL 8

    Accepted Solution

    "java c:\javaproject\HelloWorld >> c:\temp\java.log"

    Actually you need the full path if you want to run it from your desktop

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
    For Sennheiser, comfort, quality and security are high priority areas. This paper addresses the security of Bluetooth technology and the supplementary security that Sennheiser’s Contact Center and Office (CC&O) headsets provide.  
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now