How do you make a .java run on a desktop

I'm fairly new to java, only 2 semesters worth, and I did a final project this past semester that tied into our tutoring lab at school. Although I completed it for the class, it needs more for the lab.
I need to know what I need to do so that the lab can just run the program from the desktop and not have to run the compiler each time. I'll be dealing with non-computer people. I'm still developing the GUI and need to add time stamps and a couple of other things that I'm relaying on books for, but I'm looking now for this answer in case I have to redue a lot of stuff.
Like I said, I'm new to java and have been told that I can't just make the program a .exe. I also understand that all java needs to run is the language installed on the machine. So anyone know how I can do this?
Thanks

hi,
Can NetBeans package into a jar file for
me? If not what do I use? I dont know for sure, but IDE's normally provide this feature.
I know it will be running on a Win, at least 2k, machine, but I would rather do
the first method you suggested
grins good decision, especially since urs is an academic project.....BUT, if u ever (in the future), go for a java-based project that u wud want to distribute, then remember that the "users" of ur project wud hv to have JRE installed for this, something which ppl dont always like.
is the JRE available for download on the Sun website? Do I just install
it like I did to set up NetBeans on my machine and
the program will call it when run?Since u already have JDK installed, there is no need for additionally installing JRE. but if u want to run this application on some other system where JDK is not installed (and neither required ;), then u have to download and install JRE from Sun's download site.
it is pretty straightforward to install the JRE. make sure that u hv the correct version of JRE, for example, if u developed ur project using JDK1.5, then download JRE1.5
======
Kiran

Similar Messages

  • Newbie Question...  How do you make sure java can find all the imports

    Hi everyone,
    I am new to Java and so far I really like it. But I am having problems porting applets to my websites. How can you make sure that all the references can and will be found in the applet...
    for example,
    I import javax.media.ControllListener in a project I am using and it works great in the applet viewer but when I try to port this to my website I'm working on, java can't find it. I really would appreciate any help on this cause then I would have java power :) and will keep me from losing my hair :).
    Thanks for those who help me.
    - Stan

    Hey jwenting,
    Thanks for the quick response. Classpath definitely makes sense so I have been reading up on that... But do you include .classpath file in your website too? And how would you reference it if you need to reference it?
    - Stan

  • How do you make a program run when any user logs in?

    I have an application which will need to run when any users logs in.
    Such that Joe downloads and installs the application, logs out, then Sally logs in and the application runs for Sally.
    Does anyone know how to do this?

    Hey Steve, thanks for that link. It seems to be what
    I am looking for. What is the meaning of the
    ~/Library vs /Library ? They are definitely
    different folders.
    Yes, they are definitely different folders. The "~" character represents the current users home folder, so "~/Library" represents the Library folder that's located inside a users home folder. Anything placed in there will only affect the one user whose home folder you've accessed.
    The "/Library" folder is the Library folder that exists at to root of the boot volume. Things placed in this Library folder will affect all users of the system. Basically it's sort of a "global" Library.
    Also, from a script, how do I add an item to execute
    for that kind of PList?
    That could be tricky based on the structure of that particular plist file. I haven't really looked at it closely but one place you could start is to read the "man" page for the "defaults" command... enter "man defaults" in Terminal. The "defaults" command allows you to read/write plist files, but defaults is not very good at accessing deeply nested plist items.
    Related to that, how do I tell if the logging item
    for my App is already there? I do not want to keep
    adding to the list if it is there. If someone
    deletes my app and then reinstalls it, I do not want
    it to run twice, three times, etc..
    Again, you could possibly read the plist using the defaults command and determine whether your item was already present or not.
    Do you know of the one in the ~/Library path, what
    user it execute as? Since it is all users, it
    probably is root or something like that.
    No, the one in ~/Library is in each individual user home folder. It will execute with the current user's privileges. This is where Login Items normally go when you go through the GUI... "Sys.Prefs -> Accounts -> Login Items" and add a login item for one user.
    Even items placed in /Library, which should execute for all users, will execute with the current user's privileges.
    In the near
    future we might need root privileges, so I might need
    a program to startup for all users as root instead of
    the user.
    Is your app, that needs to run at login time, a GUI application or is it a faceless shell script (or something similar). Your original post gave me the impression that you needed to launch a GUI application. However, if it's a shell script then you probably want to look at doing a LoginHook instead of using the Login Items procedure at the web page I posted earlier. I believe a LoginHook will also give you the ability to run the script as root.
    Check out this link at the ADC website.
    or
    Take a look at this information and this utility at Mike Bombich's website.
    Steve

  • How Do You Make OS X Run Strictly Only 64-bit?

    Hi. I've set OS X to run on 64-bit on boot (editing the plist. Apple should have a control panel for 32 and 64-bit mode. I hope Lion will have those) but how is it running a 32-bit of Flash on Safari? I thought on this mode it strictly runs only 64-bit programs? So if you're using 32-bit mode, that's really the same as when you're on 64-bit mode coz' on 32-bit mode it'll still use 64-bit apps when it's available (or 64-bit programs won't run when you're on 32-bit mode?).
    Is Safari 5 64-bit by the way? There's a preview of the 64-bit Flash player which might be good to try on a 64-bit OS and Safari. Thank you in advance.
    Gbu.

    Do not confuse user mode application programs with the kernel and device drivers. This is NOT Windows, and does NOT have the limitations that Windows has.
    The 32-bit Mac OS X kernel can run both 32 and 64 bit applications. Just launch Applications -> Utilities -> Activity Monitor and the "Kind" column will show you that with the 32-bit kernel you are currently running tons of 64-bit programs.
    Today, the only reasons for booting a 64-bit kernel are:
    o You are a developer writing a 64-bit device driver
    o You need to use a special limited edition 64-bit device driver and have no choice
    o You have one of the newest Mac Pros or Xserver boxes and have put more than 32GB of RAM in the box
    o You would like to blaze a 64-bit trail testing all the beta 64-bit device drivers so the above mentioned developers get some real world field testing.
    Otherwise, the 32-bit kernel gives you all the benefits, and none of the hassles.
    Apple released a 64-bit capable operating system that by default boots into a 32-bit kernel so that developers had a nice long period of time to develop and test their 64-bit drivers and applications. I suspect that 10.7 may default boot 64-bit kernels on Macs that are 64-bit kernel capable (ie. they have 64-bit CPUs and have 64-bit firmware), but that is only a guess.
    And with respect to a 64-bit kernel running 32-bit apps, yea, Apple can do that too, so again you do not need to get new apps just because you are booting a 64-bit kernel.
    Message was edited by: BobHarris

  • How do you make devices show up on the desktop?

    When I plug ina  device, it only shows in the finder and doesn't display an icon on the desktop. How do I fix this?

    Finder > Preferences and activate "external discs" and "CD, DVDs and iPods"

  • How do you make an array of image icons and then call them?

    How do you make an array of image icons and then call them, i have searched all over the internet for making an array of icons, but i have
    found nothing. Below is my attempt at making an array of icons, but i cant seem to make it work. Basically, i want the image to match the value of the roll of the dice (rollVal)
    Any help would be greatly appreciated, some code or link to tuturial, ect.
    /** DiceRoller.java
    * Roll, print, Gui
    import javax.swing.*;
    public class DiceRoller extends JFrame
         private ImageIcon[] image  ;
         public String[] images = { "empty", "dice1.jpg",
                   "dice2.jpg", "dice3.jpg", "dice4.jpg",
                   "dice5.jpg", "dice6.jpg" };
         public Dice die;
         private int rollVal;
         public int rollNum;
         private JLabel j1;
         public DiceRoller(){
              j1= new JLabel("");
           die =new Dice();
           int rollVal;
           rollVal = die.roll();     
           image = new  ImageIcon[images.length];
         for(int i = 0; i < images.length; i++){
          image[i] = new ImageIcon(images);
         if (image!=null){
              j1.setIcon(image[rollVal]);
         System.out.println("Roll = "+die.roll());

    Demo:
    import java.awt.*;
    import java.net.*;
    import javax.swing.*;
    public class IconExample {
        public static void main(String[] args) {
            EventQueue.invokeLater(new Runnable(){
                public void run() {
                    launch();
        static void launch() {
            try {
                Icon[] icons = new Icon[6];
                for(int i=0; i<icons.length; ++i) {
                    String url = "http://www.eureka-puzzle.be/cast/images/dice" + (i + 1) + ".jpg";
                    icons[i] = new ImageIcon(new URL(url));
                display(icons);
            } catch (MalformedURLException e) {
                throw new RuntimeException(e);
        static void display(Icon[] icons) {
            JPanel cp = new JPanel();
            for(Icon icon : icons) {
                cp.add(new JLabel(icon));
            JFrame f = new JFrame();
            f.setContentPane(cp);
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.pack();
            f.setLocationRelativeTo(null);
            f.setVisible(true);
    }

  • In windows 8 how do you make the bookmarks column "flexible"? I used to be able to make it narrower.

    Windows 8 how do you make the bookmarks column "flexible"?

    Is the problem with the Bookmarks Sidebar -- the one you can open and close by pressing Ctrl+b? It does seem to have a minimum width and won't get narrower than that, but I'm not sure whether you are running into that limitation or whether for some reason you are not getting the resizing arrow when you mouse over the thin border between the sidebar and the page.

  • How do you make Mozilla listen to users and stop FFFFirefox Auto Updating despite being set to NOT auto update?

    I am spitting nails
    After all the STUPID problems outlined here
    https://support.mozilla.org/en-US/questions/999831?esab=a&s=&r=0&as=s
    I set Firefox to stop auto updating,
    Then the other day I installed a new user on my laptop, when they loaded Firefox it auto updated MY version of Firefox.
    Has NOTHING been learnt?
    STUPID STUPID STUPID STUPID STUPID
    So I have 2 questions
    How do you make Mozilla listen to users?
    and how do prevent what happened to me happening again?

    SuperSluether
    Not a millionth, you have only provided 150 answers and I doubt they were all this issue.
    If you don't like it, don't use it.
    If a business took this attitude they would soon be out of business
    Updates help KEEP YOU SAFE
    Sometimes, but in my experience FFirefox updates can really screw up your system, lose you data, mess up your user interface. I have run IT for one of the biggest intranets on the planet and we never allowed even Mictosoft updates until we did User Acceptance Testing and understood the impact of the upgrade. I am a grown up not a child, I have system where I test updates for performance, security and impact, I WILL DECIDE when I want to install it. If Mozilla wants to provide real security updates I would take them but if you look at the link in my OP you will see it said an update was security and it completely messed up.
    Updates add tons of great new features
    Actually with FFirefox in my experience they take more away than they add, things I did not ask them to take, they do not look at my config and leave my settings as they were and then tell me about new options, no they completely screw my productivity as it takes days to figure out how to undo the kwap they have added. Copying the AWFUL Chrome interface is not an improvement, Google has one of the worst UI's on the planet accross all their products.
    Firefox is designed to be customized PER USER, NOT CROSS-SYSTEM
    There are some things that benefit from being per user and some that are per machine, windows has group policies per machine and per user. My OP is telling Mozilla that this is another area where they have "designed" badly, I tell them this so that they improve it and in the vain hope that there is some config setting that will stop this nonsense.
    So SuperSluether you have not really helped, all you seem to say is FO if you do not like it. Good job you do not run a business. With that attitude probably best you do not contribute.

  • How do you make imessage work? The icon is there. You can type in the recipient but are not allowed to hit the send button

    How do you make imessage work? We upgraded to verision5. The icon is there. You can type the message but the send button is not available.

    There is some instability in  iMessage.  It is a versatile and confusing app even though there are so few options in its use. 
    I had issues trying to get iMessage work on both my iPads and my iPhone. 
    ON the iPhone, turning off WiFi service and then trying iMessage fixed the problem.
    On the iPad 2, same thing.  Turning off WiFi service fixed it.
    On the iPad 1, I took a suggestion from zoomzoom and changed the WiFi network configuration on the iPad to use 8.8.8.8 as a DNS server and then use iMessage.  That fixed it.   Now I put the DNS back to default and it still works.
    I suspect the iPod Touch will have the same fix as the iPad.
    If you have a WiFi and 3G iPad or iPhone, try turing off WiFi and see if that fixes it. 
    Why?  (beware, some of this is guesswork)
    iMessage can talk SMS to cellphones and smartphones (that are using the cell-network).  It can also talk Apple iMessage format to iPhones and iPads whether they are on cell-network or on WiFi.  If you are talking to an SMS cellphone, iMessage figures that out and blindly sends your message.  If you are talking to a iOS5 device, iMessage figures that out too, checks to see that they are on-line, and then does something different if they are or are not on-line.  If you type in an email address, and not a phone number, I think iMessage attempts to see if the email address is registered with Apple (or iCloud or whatever) and if it is not, it does something to let you know, possibly by making the Send button not light up. 
    In order to register iMessage and an email, you have to let the iOS device see whatever service it is that iMessage uses.  That is where the problem happenes.  zoomzoom suggested manually setting the WiFi DNS to google's 8.8.8.8 IP address, then run IMessage, and that seemed to fix the problem.  Setting the iOS device to use 3G-only (by turning off WiFi) also fixed the problem.  I suspect going down to StarBucks or McDonalds and using their WiFi would also fix the problem.  Once the problem is fixed, it doesn't seem to come back so I can't test these 'fixes'. 
    To change the DNS on your iPad find your WiFi networks configuration, click on the blue arrow, touch DNS, backspace over the number that is shown, type in 8.8.8.8    Then click on the WiFiNetworks button at the top of the screen.  Now go run iMessage.  After that, you can delete the DNS entry again and leave it blank.  Your iPad will fill it in from the WiFi router when it needs it.

  • How do I make the plugin run automatically when a photo is imported?

    I am trying to write a new plugin where the metadata will be automatically added to the photo when I import the photo in the Lightroom.
    How do I make the plugin run automatically when a photo is imported?
    Thanks for  your help!
    Regards,
    Prosenjit

    psaha84 wrote:
    What I want is, when I import a photo in Lightroom the plugin will run and assign the metadata.
    As John said, there is no mechanism to receive notification of import. The likely recourse is continuous polling (unless you get very creative..).
    You can try optimizing. e.g.: every second (or less), see if the count has changed, if it's gone up, something's been imported, if not then probably not (check anyway once in a while..).
    psaha84 wrote:
    How do I save the custom metadata with the image file?
    Lightroom 5 has the limitation, plugin  cannot link the custom metadata fields to XMP file or save them with image file.
    So, is there any alternative way to save the custom metadata?
    Yeah: Lightroom won't save custom metadata in xmp, nor read it if it's there, so you are pretty much on your own - you can save in a file, but if you save as non-standard sidecar Lr won't attend to it like it will jpg or xmp sidecar. For that reason it's often better to save in a separate dedicated location. You can save in image file itself, e.g. using exiftool if raw file, but that would make me nervous, and of course you'd have to have the logic to read it somewhere too..
    Good luck,
    Rob

  • How do you make it send an email on a condition? Or automate emails?

    How do you make it automatically send emails or even on a condtiion? (like qty left of inventory is 0)

    As far as making the report emailed conditionally, if the report is an exception report (only showing items with inventory = 0, for example), then you could add this to the report footer to prevent an email from being sent if no exceptions exist (basic syntax):
    WhilePrintingRecords
    dim noEmail as number
    if count({any field}) = 0 then  ' If no records processed...
      noEmail = noEmail / noEmail ' divide by zero failure prevents email from being sent
    end if
    This assumes that the data coming back from the database will only be exception records.  If that is not the case, then you'll have to manually count the number of records with inventory = 0 and use that formula field in the IF statement above.
    The down sides to this technique are that this will cause BOE to not generate anything (not even a blank report), and the status of the run will be Failed...
    HTH,
    Carl

  • How can I make my phone run faster?

    anytime I have to download or upload or search the web it is very very slow .

    ray miranda wrote:
    I have my iMac purchased in 2008 and it is running very slow.  I have a time capsule.  I believe it only has 1 GB of SD Ram.  Will it run faster/better if I increase the Ram?
    YUP!
    How large is you HD and how much space do you have left?
    Care to share which OS you are using?
    How can I make my iMac run faster?

  • How can i make my iphone run faster

    How can I make my iphone 4 run faster?

    ray miranda wrote:
    I have my iMac purchased in 2008 and it is running very slow.  I have a time capsule.  I believe it only has 1 GB of SD Ram.  Will it run faster/better if I increase the Ram?
    YUP!
    How large is you HD and how much space do you have left?
    Care to share which OS you are using?
    How can I make my iMac run faster?

  • How do you make a clip move on a frame

    how do you make a clip move on a frame

    777
    It is not clear what you are asking about. Could explain another way?
    Please start with what version of Premiere Elements you are working and on what computer operating system it is running?
    From what you wrote, I am not sure if you are saying
    a. The Timeline Indicator is stuck and will not more from left to right when you try to play back the Timeline content in the Edit area
    or
    b. You want to create an animation
    or
    c. You are doing a Picture in Picture (PiP) and want the picture (or video insert) to move to different locations within the frames over the course of
    time.
    or
    d. Other
    We will be looking forward to your clarification with details so that we can give you the information that you seek.
    Thank you.
    ATR

  • How do you make a web browser?

    I would like to make a Web Browser of my own but how did you make FireFox?

    Read this:
    http://thepattysite.com/window_sizes1.cfm
    You don't want to try to launch your site to full screen,
    honest, as you'd
    drive your (potential) visitors away.
    Jo
    "Steve Zavodny" <[email protected]> wrote in
    message
    news:escrfa$s7$[email protected]..
    > How do you make a web browser launch your site to a
    specific size or even
    > full screen?
    > Thanks...

Maybe you are looking for

  • IPAD1 is no longer recognised by my MAc. Itunes freezes when I restart everything. My  iphone 4 works fine. How do i fix this?

    My IPAD1 is no longer recognised by Itunes on my Mac deskop. I have follewed the steps recommended by Apple Support aand sometimes after shutting everything down & restarting Itunes briefly recognises my ipad before freezing. Thereafter it sometimes

  • GPS on 3G IPad not functioning

    In the past I have been able to use the GPS in my 3G IPad with no data plan. Now it will not work and I get a message that the map server is not available. Is this something new or how can I rectify this?

  • BEA vs. Oracle Portal

    Were a BEA shop using BEA application server 8.x and currently evaluating Portal solutions, for the most part we have settled on BEA but Corporate has asked us to consider Oracle. I already have some competitive info from our BEA sales guy but I was

  • Logo outline transparent for web

    I have created a logo. I did it with black fill and white lines. This works well for a white background, like in print; but for the web the white needs to be transparent so the background colors show through and where lines cross you can see the back

  • DESIGN MODE: VERY SMALL FONT SIZE

    WE just bought CS3 and when I open my Dreamweaver 8 html files the font sizes are all over the place. I use size 2 for my titles and size 1 for some of my copy. While in Design mode, the size 2 type is not readable. I checked my settings and everythi