Can't get to run

All I need is a method that returns the int instead of void to get to run. There is an error under ALL of the .setSeeds. If I could correct this I could get it to run. Please help.
import java.util.Random;
import javax.swing.JOptionPane;
public class MilkDelivery {
public static void main(String[] args) {
int delivery1, delivery2, delivery3, delivery4, delivery5;
Random eagleID = new Random(900364417);
delivery1=eagleID.setSeed(900364417);
delivery2=eagleID.setSeed(900364417);
delivery3=eagleID.setSeed(900364417);
delivery4=eagleID.setSeed(900364417);
delivery5=eagleID.setSeed(900364417);
long currentTime = System.currentTimeMillis();
System.out.println("Delivery 1 took " + delivery1 + " minutes");
System.out.println("Delivery 2 took " + delivery2 + " minutes");
System.out.println("Delivery 3 took " + delivery3 + " minutes");
System.out.println("Delivery 4 took " + delivery4 + " minutes");
System.out.println("Delivery 5 took " + delivery5 + " minutes");
System.out.println("The system time is " + currentTime);
int total=delivery1+delivery2+delivery3+delivery4+delivery5;
JOptionPane.showMessageDialog(null, "The total time is " + total + " minutes");
}

Yet another double post.
What is your fucking problem pal? Are you too slow to realise that creating multiple posts asking the same thing pisses people off and you are less likely to get any help?
Go read the API. Go and read your textbook. Go and read your lecture notes.

Similar Messages

  • How can I get iTunes running on Windows XP as well as a newer laptop running Windows 7 to both recognize my new iPhone 4S?  It seems to work fine with Win 7 PC so far, but not at all with the XP OS separate laptop.

    How can I get iTunes running on a Windows XP machine as well as, separately on a newer laptop running Windows 7 to both recognize and sync with my new iPhone 4S?  I have different libraries on each machine which I need to sync with the iPhone, both in iTunes.  It seems to be workiing fine on the Windows 7 machine, but not even reconizing the device at all in iTunes on Windows XP.
    Thank you for your assistance.

    Hi turingtest2 - thanks for the reply. As you say It is how it is - and I have three workstations in this home (not counting three for my children and one for the family) and I pretty much always have more than one OS on each - that's how it is for me. I shouldn't have to worry about how many OSs I have (or how often I change them) just to have music while I'm working - through the PC sound system that is. I never have to worry about any other software, only iTunes. Once in a while (in the past) I've made a vendor call if I changed to many things to often (like CPU, GPU, memory, etc - or even a replacement MB) - but that hasn't happened in a couple years (at least since Vista) so I think (hope) they have fixed that for good. And even then it was a quick call and problem resolved. The only (glaring) constant problem is iTunes - limiting my own use of my own music (by counting an OS as a physical PC). Even with VM (which is just another OS) - although you can Attach things to multiple active OSs - it's still your own (purchased) music - and all on one PC. Thanks again!

  • Can't get MDB run-as to work

    I am trying to configure J2EE security on OC4J standalone 10.1.3 for a set of EJBs. I have a stateless session bean that I want to control access to. I have assigned method permissions to it so that only a certain role can access it. I then configured a client with J2EE credentials for a user in that role and remote EBJ lookup/access is working great.
    The problem is that I also have a JMS-based MDB in the same application that needs to access the session bean, but I can't get the run-as declaration to take effect. When the MDB tries to call create() on the session bean's home interface, the following Exception gets thrown:
    ERROR javax.ejb.AccessLocalException: anonymous is not allowed to call this EJB method, check your security settings (method-permission in ejb-jar.xml and security-role-mapping in orion-application.xml).
    Below is the relevant sections from my deployment descriptors, if anybody has any input I'd appreciate it.
    -Patrick
    <!--ejb-jar.xml-->
    <enterprise-beans>
    <session>
    <ejb-name>MyStore</ejb-name>
    <security-role-ref>
    <role-name>MyApplication</role-name>
    <role-link>MyApplication</role-link>
    </security-role-ref>
    <security-identity>
    <use-caller-identity />
    </security-identity>
    </session>
    <message-driven>
    <security-identity>
    <run-as>
    <role-name>MyApplication</role-name>
    </run-as>
    </security-identity>
    </message-driven>
    </enterprise-beans>
    <assembly-descriptor>
    <security-role>
    <role-name>MyApplication</role-name>
    </security-role>
    <method-permission>
    <role-name>MyApplication</role-name>
    <method>
    <ejb-name>MyStore</ejb-name>
    <method-name>*</method-name>
    </method>
    </method-permission>
    </assembly-descriptor>
    <!-- orion-ejb-jar.xml (I've also tried the same security-role-mapping in orion-application.xml -->
    <assembly-descriptor>
    <security-role-mapping name="MyApplication">
    <group name="users" />
    </security-role-mapping>
    </assembly-descriptor>

    Password for what?

  • In LV6.1, can I get the run-time menu refnum of a VI from the VI Path?

    Actually, for any version of LabVIEW, can I get the run-time menu refnum from the VI Path (or the VI reference)?
    Thanks!
    Enrique
    www.vartortech.com

    I just thought of a workaround...you could have a Menu Bar Ref indicator on your main VI front panel.  When your VI runs, you could have the Current VI's Menubar function wire the refnum into that indicator.  Then, in your subVI that has the VI reference, you could use VI Server to read the value of that indicator, then cast the value into a refnum wire, then you'd have access to the menubar reference in the subVI without having to pass it in to a subVI terminal.  Would that work?
    Oh, another simpler idea would be to simply wire the Menubar reference into a global, and read that global in the subVI.
    -D
    Darren Nattinger, CLA
    LabVIEW Artisan and Nugget Penman

  • I have a LaserJet 5L printer and I can't get it running properly under 10.5.8 while it works fine under 10.4.11. It only prints the first document and then shows the queue and prints slow like ****, it says so, but nothing printed after30 minuts.

    Hi.
    I have problems to get my Laser Jet 5L running properly under 10.5.8. I prints the first page/document and then it says1,36 % printed than printing but nothing happens. Under 10.4.11 everything works fine, sometimes I have to get the print jobs running again,but then it works.
    I have the Laser Jet 5L connected via USB to parallel.
    I am running a PowerBook G4 1,67 GHz and 2 GByte RAM.
    Best regards
    LasertJet5LApple

    Hello, since nobody has piped in yet...
    Safe Boot from the HD, (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions.
    Safe Boot from the HD, (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions.
    Any devices that previously appeared in your Printer List and Fax List will need to be added again after resetting the printing system.
    Resetting the printing system in Mac OS X 10.5.x
    1. To use the Reset Printing System feature in Mac OS X 10.5.x, follow these steps:
    2. Choose System Preferences from the Apple menu.
    3. Choose Print & Fax from the View menu.
    4. Control-click on list of printers on the left side of the window, then choose "Reset printing system" from the contextual menu. If you don't see a list of printers, Control-click on the text "Click + to add a printer or fax" and select "Reset printing system..." 
   
  As an alternative, if you currently have one or more printers listed, you can Option-click the "-" (Remove printer) button.
    http://support.apple.com/kb/ht1341
    Reboot.

  • Can I get messages running on mac osx 10.7.5 Lion?

    I have a macbook with mac osx 10.7.5 (I think that's called "lion" correct?), is there any way to get the messages application running on it? I know the messages beta (version 6.1) expired on december 14, 2012, but can I download messages  version 7.0.1 and have it run on osx 10.7.5 Lion?

    No.
    (83290)

  • Can't get things running

    I am trying to develop a Java help system and can't view it. I've tried following the information in the Java and JavaHelp readme files but it really isn't clear to me.
    I'm working on a system using Windows 2000 Professional. I'm using RoboHelp 2002 to create a Java help system. I downloaded the Java 1.4.1 JRE (executable name j2re-1_4_1-rc-windows-i586.exe) and ran the executable. It installed in C:\Program Files\Java. Then I downloaded JavaHelp (file name javahelp-1_1_3.zip) and unzipped it into a different directory - C:\JavaHelp. I then changed my PATH variable to include the JavaHelp directory and the Java 'lib' and 'bin' directories. I then changed my CLASSPATH variable to include those directories and the directory containing the Java help system I am trying to create. Then I rebooted.
    When I generate the help system in RoboHelp, everything apparently runs fine. I get no error messages during the generation process. But when I try to view the help system, I get a prompt that reads "Both the Sun Java 2 SDK and JavaHelp are required to view the JavaHelp output. Please install the latest versions of Java SDK and JavaHelp."
    I thought the Java SDK was included in the Java2 1.4.1 install. Am I wrong and I still need to install something else, or am I missing some step needed to configure my system?

    The package you downloaded is the JRE runtime only version. The SDK contains programming tools along with a copy of the runtime. If the JRE is installed now, remove it before you install the SDK.
    If you don't have javac.exe on your machine (use find files to search for it) then go here:
    http://java.sun.com/j2se/1.4/download.html
    pick this line: Windows (all languages, including English)
    and click in the column named "SDK" for the software. This will download everything that you'll need to get started.
    Installation instructions, release notes, a ReadMe, and documentation are further down the screen. These instructions have all the needed information for you to get up and running

  • Can't get network running in startup

    Hi
    I did my first Arch linux installation a few days ago and everything is running well except network. It fails to start in every startup. In /var/log/errors there is an entry:
    dhcpcd[179]: timed out waiting for a valid DHCP server response
    this comes in every startup.
    But when i login and run manually
    /etc/rc.d/network start
    it starts with no errors.
    What should i do to get my network to start automatically?
    This is my network part of rc.conf:
    lo="lo 127.0.0.1"
    eth0="dhcp"
    INTERFACES=(lo eth0)
    # Routes to start at boot-up (in this order)
    # Declare each route then list in ROUTES
    # (prefix a route in ROUTES with a ! to disable it)
    gateway="default gw 192.168.0.1"
    ROUTES=(!gateway)
    # Daemons to start at boot-up (in this order)
    # (prefix a daemon with a ! to disable it)
    DAEMONS=(syslogd klogd !pcmcia network !netfs crond)
    JaH

    add 3c59x to the MODULES variable in /etc/rc.conf. Then reboot.
    This is my /etc/modules.conf
    # /etc/modules.conf (for v2.4 kernels)
    alias eth0 3c59x
    This is my /etc/rc.conf
    # /etc/rc.conf - Main Configuration for Arch Linux
    # Localization
    # HARDWARECLOCK: set to "UTC" or "localtime"
    # TIMEZONE: timezones are found in /usr/share/zoneinfo
    # KEYMAP: keymaps are found in /usr/share/kbd/keymaps
    # CONSOLEFONT: fount in /usr/share/kbd/consolefonts (only needed for non-us)
    # USECOLOR: use ANSI color sequences in startup messages
    HARDWARECLOCK="localtime"
    TIMEZONE=Europe/Helsinki
    KEYMAP=fi-latin1
    CONSOLEFONT=lat9-16
    USECOLOR="yes"
    # Networking
    HOSTNAME="sopuli"
    # Module to load at boot-up (in this order)
    # (prefix a module with a ! to disable it)
    MODULES=(!usbserial 3c59x ide-scsi)
    # Interfaces to start at boot-up (in this order)
    # Declare each interface then list in INTERFACES
    # (prefix an interface in INTERFACES with a ! to disable it)
    # Note: to use DHCP, set your interface to be "dhcp" (eth0="dhcp")
    lo="lo 127.0.0.1"
    eth0="dhcp"
    INTERFACES=(lo eth0)
    # Routes to start at boot-up (in this order)
    # Declare each route then list in ROUTES
    # (prefix a route in ROUTES with a ! to disable it)
    gateway="default gw 192.168.0.1"
    ROUTES=(!gateway)
    # Daemons to start at boot-up (in this order)
    # (prefix a daemon with a ! to disable it)
    DAEMONS=(syslogd klogd !pcmcia network !netfs crond)
    # End of file
    So i have 3c59x module in both files, but still network doesn't start at boot. In /var/log/errors there is this line that comes in every boot:
    dhcpcd[195]: timed out waiting for a valid DHCP server response
    I just can't figure it out.
    JaH

  • [SOLVED] Can't get Inkscape running...

    Greetings,
    I used Arch Linux briefly before, but then went and played with Sabayon some to test out and play with their new 3.5 edition. However, it wasn't long after I began missing the speed and stability of Arch.
    Anyways, I decided to make Arch Linux my O/S fully now, leaving behind the other choices out there and the ever hated windoze. One of the programs I need though, InkScape, I can't seem to get working. I seem to be missing something, but I just can't seem to think on how to fix it.
    I installed Inkscape through console using pacman -Sy inkscape
    It installed fine.
    However, when clicking on the menu icon, it doesn't load. So I try to run it in console. I get the following remark...
    inkscape: error while loading shared libraries: libkrb5.so.22: cannot open shared object file: No such file or directory
    I went ahead and attempted to load that file through pacman, and it laughed at me. Figured as much.
    Anyways, I searched, but I didn't find anything addressing this problem. So if it was addressed, I am sorry... I must not have searched long enough.
    Some info...
    This is the recent Arch Linux version
    This is on KDE by KDEmod, the complete version
    and Konqueror rocks!
    Thanks for all your help in advance for those who help!
    Last edited by mythus (2008-07-15 23:34:21)

    Welcome to the forums.
    A quick search would have brought you to this:
    http://bbs.archlinux.org/viewtopic.php?id=51733
    Although, I have the correct shared object for libkrb5 and Inkscape.
    [whoops]Correction for big lie[/whoops]
    It looks like heimdal was updated on 7/13. Inkscape wasn't. There must be something else in the chain that's causing inkscape to fail.
    Last edited by skottish (2008-07-15 23:16:09)

  • Trying to install - can't get past run page on which I must enter my user name & password - helP!!!

    I am trying to initially install firefox - when I get to page where I must enter "user name" and "password," I follow prompt and enter Michele-PC\Michele but nothing happens and I
    can't complete installation by getting to Firefox wizard set up
    == This happened ==
    Every time Firefox opened
    == trying to initially install firefox ==
    == User Agent ==
    Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.0.04506; .NET CLR 1.1.4322)

    Is you Windows user account an administrator account? If you don't have proper permission to install software on the system, you need an administrator to enter their username/password

  • Still can't get VPN running on Lion Server

    Hi Guys.
    I'm runinng 10.7.2.  I had VPN running on SL, but have never had it working on Lion.
    I'll start off by saying I have NO airport or any other router.  My box is hooked up straight to the net.  I have 5 vlan interfaces.
    One if for the internet, one is for the lan, one is for a guest, one is just for configuring the switch, and one is for configuring the aruba wireless gear.
    I can connect to the VPN from inside the network, but not from the outside.  You would think this might be a firewall issue, but I have tried with the firewall disabled and it makes no difference.
    This is what I'm seeing in the logs when I attempt to connect externally:
    2011-11-24 13:57:14 PST          Incoming call... Address given to client = 192.168.3.143
    Thu Nov 24 13:57:14 2011 : Directory Services Authentication plugin initialized
    Thu Nov 24 13:57:14 2011 : Directory Services Authorization plugin initialized
    Thu Nov 24 13:57:14 2011 : L2TP incoming call in progress from '166.147.81.230'...
    Thu Nov 24 13:57:14 2011 : L2TP received SCCRQ
    Thu Nov 24 13:57:14 2011 : L2TP sent SCCRP
    2011-11-24 13:57:14 PST          Incoming call... Address given to client = 192.168.3.144
    Thu Nov 24 13:57:14 2011 : Directory Services Authentication plugin initialized
    Thu Nov 24 13:57:14 2011 : Directory Services Authorization plugin initialized
    Thu Nov 24 13:57:14 2011 : L2TP incoming call in progress from '166.147.81.230'...
    Thu Nov 24 13:57:14 2011 : L2TP received SCCRQ
    Thu Nov 24 13:57:14 2011 : L2TP sent SCCRP
    2011-11-24 13:57:16 PST          Incoming call... Address given to client = 192.168.3.145
    Thu Nov 24 13:57:16 2011 : Directory Services Authentication plugin initialized
    Thu Nov 24 13:57:16 2011 : Directory Services Authorization plugin initialized
    Thu Nov 24 13:57:16 2011 : L2TP incoming call in progress from '166.147.81.230'...
    Thu Nov 24 13:57:16 2011 : L2TP received SCCRQ
    Thu Nov 24 13:57:16 2011 : L2TP sent SCCRP
    2011-11-24 13:57:21 PST          Incoming call... Address given to client = 192.168.3.146
    Thu Nov 24 13:57:21 2011 : Directory Services Authentication plugin initialized
    Thu Nov 24 13:57:21 2011 : Directory Services Authorization plugin initialized
    Thu Nov 24 13:57:21 2011 : L2TP incoming call in progress from '166.147.81.230'...
    Thu Nov 24 13:57:21 2011 : L2TP received SCCRQ
    Thu Nov 24 13:57:21 2011 : L2TP sent SCCRP
    2011-11-24 13:57:25 PST          Incoming call... Address given to client = 192.168.3.147
    Thu Nov 24 13:57:25 2011 : Directory Services Authentication plugin initialized
    Thu Nov 24 13:57:25 2011 : Directory Services Authorization plugin initialized
    Thu Nov 24 13:57:25 2011 : L2TP incoming call in progress from '166.147.81.230'...
    Thu Nov 24 13:57:25 2011 : L2TP received SCCRQ
    Thu Nov 24 13:57:25 2011 : L2TP sent SCCRP
    2011-11-24 13:57:29 PST          Incoming call... Address given to client = 192.168.3.148
    Thu Nov 24 13:57:29 2011 : Directory Services Authentication plugin initialized
    Thu Nov 24 13:57:29 2011 : Directory Services Authorization plugin initialized
    Thu Nov 24 13:57:29 2011 : L2TP incoming call in progress from '166.147.81.230'...
    Thu Nov 24 13:57:29 2011 : L2TP received SCCRQ
    Thu Nov 24 13:57:29 2011 : L2TP sent SCCRP
    2011-11-24 13:57:33 PST          Incoming call... Address given to client = 192.168.3.149
    Thu Nov 24 13:57:33 2011 : Directory Services Authentication plugin initialized
    Thu Nov 24 13:57:33 2011 : Directory Services Authorization plugin initialized
    Thu Nov 24 13:57:33 2011 : L2TP incoming call in progress from '166.147.81.230'...
    Thu Nov 24 13:57:33 2011 : L2TP received SCCRQ
    Thu Nov 24 13:57:33 2011 : L2TP sent SCCRP
    2011-11-24 13:57:34 PST             --> Client with address = 192.168.3.143 has hungup
    2011-11-24 13:57:34 PST             --> Client with address = 192.168.3.144 has hungup
    2011-11-24 13:57:36 PST             --> Client with address = 192.168.3.145 has hungup
    2011-11-24 13:57:41 PST             --> Client with address = 192.168.3.146 has hungup
    2011-11-24 13:57:45 PST             --> Client with address = 192.168.3.147 has hungup
    2011-11-24 13:57:49 PST             --> Client with address = 192.168.3.148 has hungup
    2011-11-24 13:57:53 PST             --> Client with address = 192.168.3.149 has hungup
    I'm all out of ideas.  If anyone else has had an issue running VPN with multiple VLANs and has some insight, I would love to hear it.  From what I can tell I'm dialing in, but the servers response packets are never going back to the client.  I don't know how to trouble shoot that.

    I am having this exact same issue. Sounds like you're on Comcast also? I can connect from inside but not out... and I've even talked to Comast on the phone but it made no difference. I really think this is a Comcast issue, because, if you're like me, you can access all other services the server is providing
    Do you know if there's a way to change the port for the VPN service for testing purposes? This might help clarify what's going on...
    Also-- I should add that Comcast suggested disabling Gateway Smart Packet Detection as that can apparently interfere with secure packets. Try that out and post if it helps!
    Message was edited by: iKenny

  • How can I get the run time of a method?

    I click a button "draw" to invoke a method such as draw many shades.
    It hangs a long time.
    I want to get the information of how long it spent.
    How can I do it?
    I'm new guy, more detailed please .
    one example would be much better
    ThankS all :)

    Try JAMon. It is much more flexible than currentTimeMillis() and easier to use.
    import com.jamonapi.*;
    drawShape()
    Monitor mon=MonitorFactory.start();
      ..code being timed...
    System.out.println(mon.stop());// prints time in ms.
    }steve - http://www.jamonapi.com - a fast, free, simple performance tuning API.

  • HT1414 my ipad is 5 weeks old and yesterday i was using it and it quite. i have tryed two different chargers and it is completely dead. no sound or image. can i get this running again?

    new ipad 5 weeks old. ipad 2    no display no sounds.  tryed two chargers overnight    blank screen

    If the unit has NEVER been jailbroke, first try a system reset.  It cures many ills and it's quick, easy and harmless...  Hold down the on/off switch and the Home button simultaneously until you see the Apple logo.  Ignore the "Slide to power off" text if it appears.  You will not lose any apps, data, music, movies, settings, etc.
    If the Reset doesn't work, try a Restore.  Note that it's nowhere near as quick as a Reset.  It could take well over an hour!  Connect via cable to the computer that you use for sync.  From iTunes, select the iPad/iPod and then select the Summary tab.  Follow the on-screen directions for Restore and be sure to say "yes" to the backup.  You will be warned that all data (apps, music, movies, etc.) will be erased but, as the Restore finishes, you will be asked if you wish the contents of the backup to be copied to the iPad/iPod.  Again, say "yes."
    At the end of the basic Restore, you will be asked if you wish to sync the iPad/iPod.  As before, say "yes."  Note that that sync selection will disappear and the Restore will end if you do not respond within a reasonable time.  If that happens, only the apps that are part of the IOS will appear on your device.  Corrective action is simple -  choose manual "Sync" from the bottom right of iTunes.
    If you're unable to do the Restore, go into Recovery Mode per the instructions here.  You WILL lose all of your data (game scores, etc,) but, for the most part, you can redownload apps and music without being charged again.  Also, if you have IOS-7, read this.

  • How can I get currently running script file path in PS CS (8.x)

    Is it possible to retrieve full file name of my script file in Photoshop CS (8.x)?
    Constructions:
    b ScriptName = $.fileName
    and
    b try { some_error }
    b catch(e) { ScriptName = e.fileName; }
    are not works in Photoshop CS

    Hi Mike,
    Based on your description, we can enable the policy setting to see if it helps:
    Computer Configuration\Administrative Templates\System\Logon\Always wait for the network at computer startup and logon
    Besides, regarding how to assign log on scripts, the following article can be referred to for more information.
    Assign User Logon Scripts
    http://technet.microsoft.com/en-us/library/cc770908.aspx
    Moreover, as Carl suggested, instead of using scripts, we can utilize Group Policy Preferences Dive Maps extension to map drives for users.
    Regarding this point, the following article can also be referred to for more information.
    Drive Maps Extension
    http://technet.microsoft.com/en-us/library/cc731729.aspx
    Configure a Mapped Drive Item
    http://technet.microsoft.com/en-us/library/cc770902.aspx
    Best regards,
    Frank Shen

  • Can't get a running total of data used.

    Have a mifi jetpack and I have to constantly log into my acc't online to see my usage. I even have to total it up because they won't show total usage; only daily. It always shows 0 on the device and in my verizon on comp. Anybody else have this issue?

    Drobells I am certain our prepay
    customer service team will be able to help with any tracking options possible
    on your Mifi device. You can contact them directly at at 888-294-6804.
    BryanS_VZW
    Follow us at Twitter @vzwsupport

Maybe you are looking for