How do I run my application without the java prefix?

Hi, I am new to Java but have been created some cool applications that run in the terminal.
The problem is that every time I run my program I have to type "java +<program name>+", even after I compile the program with javac.
My question is how do I make it so I can just type "<program name>" without the prefix of "java"?

Write a shell script that includes the command you want to run.
Edited by: pbrockway2 on Apr 5, 2008 3:27 PM
I guess you're using Windows (or you wouldn't be asking ;). If so, shell scripts are called "batch files". Have a read of this:
[www.computerhope.com/batch.htm|http://www.computerhope.com/batch.htm]
(Executable jar files are another approach, but they are quite a bit more work. If your intention is to run a particular command like
java MyAppthen a batch file is easiest.)

Similar Messages

  • How can i run external application without specifying the full path?

    for example, ms word executable file is winword.exe, but in java i am using the following command:
    Runtime.getRuntime().exec("\"C:\\Program Files\\Microsoft Office\\Office10\\winword.exe\");
    the thing is, i dont know where ms word is installed on every machine, so rather than making an assumption, do you know how i can run ms word without specifying the full path?
    thanks

    1) You could ask the user to tell you where it's at (and remember for next time)
    2) You could do a file search for it (and remember it for next time)

  • On the mac mini 2011 how can I run windows 7 without the optical drive, On the mac mini 2011 how can I run windows 7 without the optical drive

    On the mac mini 2011 how can I run windows 7pm bootcamp without an optical drive.  I watch lots of football on sop cast and other such windows based programmes but can't work out how to do it.

    Actually Windows can be installed and booted from an external drive if the drive is connected eSATA (external SATA), since the drive is treated as if it's an internal HDD. I used the same method previously to dual-boot from 2 different HDD instead of partitioning.
    Most PC motherboards come with them as standard so it's pretty much plug and play but I don't recall seeing a recent Mac with eSATA connectivity though, so that might not be an option for you.

  • HT3131 how can i run in clamshell without the power adapter plugged in?

    just what the question states..I dont want to have to always connect the power adapter. thanks

    thanks this works well with the power adapter pluged into the mac, but I am looking for this exact setup without the need for the power to be supplied to the mac.
    in otherwords, run it off the battery only.
    I want to think that there is either a preferences setting, or function to be able to do this.
    currently it appears that the mac will only run in the configuration with external perpherials with the power supply.

  • How do I run Java7 Applications from the desktop

    I have a large application developed under the Eclipse RCP platform that I'd like to run on my Mac Pro.
    Previously, this was a Java 6 program, that I just clicked on in the finder, and it would start.
    This is a packaged app, not a applet or webpage.  The authors just recently updated the program to require Java 7 (of course - if it ain't broke - fix it).
    I installed Java 7  on my computer, and if I type Java -version it returns with Java 1.7.0_40-b43 as a version.  However, if I display the application in the desktop, and try to start it, it says it only has Java 6 installed, and I need to update to Java 7.  The Finder knows that it's an app, but the version of software displayed by the application is 1.6.0_65.
    Any way to make the Finder use the right version?
    Later-
    David

    It seems that the JDK proposed by Oracle does not include the possibility to run bundled applications directly (dont know why). I've succeeded in a similar case by following the instructions posted here: https://bugs.eclipse.org/bugs/show_bug.cgi?id=411361#c20
    Hope this helps !
    Cheers
    Alexis

  • How can I run  other applications at the same time as downloading email

    When I open my computer if I check mail on entourage first and there are 30+ messages I can not use other apps at the same time as the mail is downloading, is there a way to have email operating in the background. Curiously if I am using another application and a mail comes in , the first app runs with mail running in the background , Why is this not the case when Entourage is the first program running and it is downloading mail.

    http://www.officeformac.com/ProductForums/Entourage/ Alternatively, don't launch it at login, launch it after logging in.

  • How can i run Webdynpro application

    How can i run Webdynpro application without using Developer Studio? Where should i put a whole project and how shoud i start it.
    Thanks!
    Maciek

    Hi Maciej
    You wouldnt require a Developer Studio to run you
    application.But you would require it to deploy (if are
    using the JDI ,atleast to perform an Activation).
    However you can launch the application once deployed
    through the Web Dynpro Content Administrator
    http://<servername>:50000/webdynpro/welcome/
    The deployed applications are present on the
    lefthandside. They can be expanded to drill down to the
    Application and the press Run
    Regards
    Pran

  • How to run java application without having java environment in  a machine

    can i run java application without having java environment(JVM) in a machine.I mean i dont have installed j2se or jdk in my machine.And i have an j2ee application running on another host which is built in swings.I want to access that application in my machine
    can any one help regarding my problem

    If you only need to access the program from one machine and you are running a Unix-like operating system (e.g., Linux, Solaris), you can use the remote display capabilities of X11. In this case you have to choose the host where the app will be displayed when you start it:
    $ DISPLAY=<hostname>:0.0
    $ export DISPLAY
    $ java ...
    If you want to be able to display it on both machines at the same time, or if you are using windows, then try something like VNC (http;//www.realvnc.com). Or if you are running windows and your version supports it, you can use windows remote desktop.

  • Help! Run AIR Applications without Adobe AIR.

    Hello, I wanted to ask that is there any way to run AIR applications without having Adobe AIR in the computer. It's really annoying when you have to give someone your application to use and then the person needs Adobe AIR to run it. Any suggestions?

    Where to start...
    AIR is a lot like Java in the sense that it requires a run-time engine to be installed. This engine has all "things" required to for the application to run. In a similar way, applications such as 3DMax or Word require that the operating system be present for them to run. Those programs are written using API calls that are present within the target operating system. Likewise, AIR and Java apps are written using API calls that are present within their run-time. To bring it full circle, AIR is an application written in C, that uses APIs for the target operating system. So, when you perform certain functions within AIR, it then knows how to execute needed operating system functions (as needed). AIR also provides a lot of higher level functionality and management that make your life as a programmer a lot simpler.
    Looking at iOS or Android, we have the same thing happening. Some developers are writing apps using Objective-C (iOS) or Java (Android) that are using APIs specific to those operating systems. This is the same as writing your app in C like 3DMax.

  • How can I run ni488216.exe without any prompts during installation?

    How can I run ni488216.exe without any prompts during installation (Silent mode)?

    Typically you can do a silent install of the NI-488.2 software by running:
    setup.exe /S LV_INSTALL path=
    Regards,
    Greg Caesar
    National Instruments
    Applications Engineer

  • How can I attach an image without the image is in the email body? (using the new mail the Lion)

    How can I attach an image without the image is in the email body? (using the new mail the Lion)
    I want in attachment, not in the body mail.

    I think your only solution is to zip the image files first and then attach them.
    Read this from a site I found:
    Sending Graphical Attachments -- When you attach a graphical image to your message, the recipient of your message sees the image inline (that is, in the body of the message) if her email client supports inline display. ("Take Control of Email with Apple Mail" contains a table listing the capabilities of popular Mac and PC email clients.) If a client does not support inline display (or the recipient has turned off the inline display option), the file appears as an attachment that must be opened in a separate program.
    On the one hand, an inline image is easier for the recipient to see - all she has to do is look at it. On the other hand, inline images can be frustrating to scroll through. If you do not wish to send a graphical image inline, you must compress the file before attaching it - Mail, sadly, lacks a built-in compression option, though fortunately for Panther users, the Finder offers Zip compression without requiring a separate application.
    Note that when you compose a new message, Mail always shows attachments in the body of your message. You can manually drag them somewhere else, but many email clients display all attachments in a separate list, regardless of where you place them in the message body.
    If you paste an image into a message or drag & drop an image from another window (say, a Web browser), Mail converts the raw image data to an attachment in TIFF format. On the other hand, if you drag & drop the icon of an image file (or use the Attach button to locate the file using the file browser), Mail leaves the attached image in its original format. This difference is significant, because although most email clients can display JPEG images just fine, support for TIFF - especially in non-Mac email clients - is less common. If possible, I suggest attaching image files as opposed to pasting or dragging in raw image data.

  • Issue with How Do I Run an Executable in the Background ?

    Hi,
    I am trying to run a LabVIEw executable in the background, but none of the methods described in the discussion forum and on ni.com seems to be working. I am using LV 2011 on a Win 7 64-bit machine in case this matters.
    I tried the method described in "How Do I Run an Executable in the Background as a Start-Up Application?" (http://digital.ni.com/public.nsf/websearch/4A8B626​B55B96C248625796000569FA9?opendocument&Submitted&&​... but I still see a fragment of a window at the bottom near the start-button (Exhibit 1). Exhibit 2 shows that it only consists of the title bar. (I have customized the window appearance as described, and added the two items
    HideRootWindow=True
    UseTaskBar=FALSE
    to the *.ini file.)
    I also tried disabling all the other items in the Customize Window Appearance menu with the same result.
    Then I tried the method described in "Running a LabVIEW Executable as a Background Process" (http://digital.ni.com/public.nsf/allkb/EFEAE56A94A​007D586256EF3006E258B) adding the FP.Open method to the VI and setting the state to hidden. I got the same result (Exhibit 1).
    Is there anything I need to do in addition or different for my windows version? I appreciate your help. Thank you.
    Solved!
    Go to Solution.
    Attachments:
    LabVIEW Executable.zip ‏4058 KB

    (I have customized the window appearance as described, and added the two items
    HideRootWindow=True
    UseTaskBar=FALSE
    to the *.ini file.)
    No you did not
    They need to go in the exe's ini so the exe sees them
    Jeff

  • How do u run office mac on the new imac

    error message says cnnont open application microsoft word because power pc applications are no longer supported  how do i run office mac on the new imac

    Office 2004 probably was the best MS Office ever, works fine on PPC machines, badly enough on intel machines, unusable in Lion.
    Office 2008 was a step back, runs badly on PPC machines, not very good for newer, Intel macs either.
    Office 2011 seems the only rational solution for newer macs running SL and Lion.
    There are free and good solutions, OpenOffice, LibreOffice and NeoOffice, all based on OO language. Apple’s iWork also offers a good solution, may be a little problematic if you currently exchange files with Windows users, mainly if you must keep the original format, including inserted data.
    Summing up:
    - if you frequently / currently exchange data with Windows users, MS Office is the best solution from reasons of comfort
    - if not, any free office quoted above makes its job fairly well
    - iWork is also good, and smoothly integrated with Mac OS X, of course
    If you mainly need word processing, Mellel and / or Nisus are (very) good alternatives, may be tested for 30 days, then decide.
    The offer is, as you may see, rich, richer than in Windows, but this also means, as the French say, l’embarras du choix, difficulty of choosing something!

  • How can i use my account without the billing info, as i do not have a credit card. and my shipping and billing info is under US. i'm in singapore. how do i change this?

    how can i use my account without the billing info, as i do not have a credit card. and my shipping and billing info is under US. i'm in singapore. how do i change this?

    If you are just visiting Singapore, then leave the account as it is. If you have moved there, then view your account using the iTunes app on a Mac or PC and change the country/region to your current location and address. If you do not have a bank card, you can fund your account using iTunes gift cards if available in Singapore.

  • Trying to open Terminal I get;You are not authorised to run this application. The administrator has set your shell to an illegal value.

    Hi There Y'all,
    I have recently downloaded MacKeeper. It ran OK for a bit, but has recently stopped allowing Internet security updates and switching on of the internet protection options.
    Asked for help at MacKeeper. Their initial advice did not work, so a very nice technician was going to remotely attempt to fix the issue.
    He however needed/still needs access to Terminal, a to me unbeknown Utility feature of my MacBook pro with Mac OS X 10.6.8.
    While attempting to open Terminal the following came up
    You are not authorised to run this application.
    The administrator has set your shell to an illegal value.
    Did do a diskverify permission and repair and restart.
    Did check my admin settings in advanced options and have the /bin/bash.
    Any advice anyone.
    Thanks.
    in site out

    After finally localing private/etc/shells through Go>Go to folder and replacing the empty shells with the shells~orig I have permission again to open Terminal. Thanks. Another step.
    (Why though can't I access  /private/etc/...  through Finder's search?)
    Should work but the file or folder needs to exists to access it.  If you typed in /private/etc/shells and the file wasn't there there's no place to access.  Certainly /private/etc was there so that would have worked.
    So what will happen by inputting the lines
    ls -Fvl /bin/bash
    ls -Fvl /etc/shells
    more /etc/shells
    into Terminal?
    Basically to find out what you already seemed to find out.  The first command was to display owner, group, and permissions of  /bin/bash and to tell me whether it still existed.
    Similarly for /etc/shells.
    And the last command would have just displayed what was in /etc/shells.
    By the way /private/etc and /etc are the same folder.

Maybe you are looking for

  • Posting Period coming into the rows at the query runtime & couldn't drop it

    Hi All, We have a query on an InfoCube that we have copied to the Multiprovider containing two cubes, exact copies of the original cubes. Two cubes are one for the previous years and one for the current year. Now, the query is copied from original cu

  • Change Pricing procedure at Sales Order

    Hi. we have a lot of sales order without fill the field Pricing procedure due to wrong convert process. I think that, once the SO is generated, it is not possible change the field Pricing procedure (VBAK-KALSM), but i have my hope pinned on you can h

  • Why are my adobe complete picture vidios poor quality

    Why are my adobe complete picture vidios poor quality

  • BT Mobile Broadband dongle needs reactivating?

    Hi guys - I think my BT Mobile Broadband USB dongle may have been dormant for too long, I think I may need you to re-activate my SIM/phone number. It's been at least six months since I used it last. I get the following error message in the BT Connect

  • No Sound on iPhone 3gs after upgrade to 3.1.3

    Hi All, If anyboby elase has seen this problem or knows of a fix, I would appreciate some feedback. After upgrading my 3gs to 3.1.3 every now and again the sound stops working (i.e. no riniging, no music etc) the only way to fix this is to reboot the