Cant get it to compile

I am trying to creat a simple program with the JOptionPane. I cant get it to compile, so if any can help me I would apperciate it. Thanks!
import javax.swing.*;
public class myPane {
  public static void main(String[] args) {
        getPass(args);
  private static void getPass(String[] args) {
        String s,v,d;
        s = (String)JOptionPane.showInputDialog(null, "Username", "Java command line", JOptionPane.PLAIN_MESSAGE, null, null, "");
        if((s != null) && (s.length() > 0)) {
                v = (String)JOptionPane.showInputDialog(null, "Password", "Java command line", JOptionPane.PLAIN_MESSAGE, null, null, "");
                if((v != null) && (v.length() > 0)) {
                        JOptionPane.showMessageDialog(null, "Thank You!", "Java command line");
  d = (String)JOptionPane.showInputDialog(null, "Which command line would you like to run", "Java command line", JOptionPane.PLAIN_MESSAGE, null, null, "");
                if((d != null) && (d.length() > 0)) {
                         JOptionPane.showMessageDialog(null, "Executing", "Java command line"); System.exit(0);
                else {
                        JOptionPane.showMessageDialog(null, "You must enter a command");
                        getPass(args);
                else {
                        JOptionPane.showMessageDialog(null, "Please enter a password");
                        getPass(args);
        else {
                JOptionPane.showMessageDialog(null, "Please enter a username");
                getPass(args);
         

You have two invalid statements:
JOptionPane.showMessageDialog(null, "Thank You!", "Java command line");
JOptionPane.showMessageDialog(null, "Executing", "Java command line");The arguments are not acceptable - see the API documentation.

Similar Messages

  • New to Java cant get it to compile in msDOS

    Using SDK java 2 version 1.4.0. Checked my personal Computer folder types.
    In folders in windows 98 do java file types open with javac.exe or java.exe? Tried both. When I try to compile a simple tutorial HelloWorldApp.java , it gives me a message that javac cant read it. The path is OK on MS DOS since it recognizes the javac command. I should be having no problems with tutorial. Did I mess up the links to the class and java file types ?. Microsoft tech support fixed a problem when I opened some demo files into the wrong programs and it was permanent.Then I tried to reset the right exe files to go with the file types but I am not sure. I have tried re downloading the software several times. Should I buy a sun software or are these downloads bad?

    use javac to compile java programs.
    e.g.
    javac HelloWorld.java
    use java to run compiled code (class files)
    java HelloWorld
    (Don't include the extension .class when using the java command)

  • Cant get my imported compilation to group in itunes

    My wedding album was put together by a friend, its almost 4 hours long, he put it together as a playlist then burnt that to cd's using itunes. When i import those cds to my itunes the only way i can get the songs to play in tcorrect order is when importing i copy the track list to a playlist. after import when in my Music folder all the tracks are split up, iv tried going through my music folder > selecting  each individual track then > get info > and changing the album and selecting part of a compilaton and all the other online suggestions but still i tunes splits everything up..... headache!
    any info would be greatly appreciated. thanks lots

    When you say you have tried "all the other online suggestions" that is rather vague because my online suggestions may not be the same as somebody else's and I presume you have not tried all x-thousand pages of Internet search results.   What have you tried?
    Steve MacGuire aka turingtest2 - iTunes & iPod Hints & Tips - Grouping Tracks Into Albums - http://www.samsoft.org.uk/iTunes/grouping.asp (older post on Apple Discussions http://discussions.apple.com/message/9910895)
    Quick answer:  Select all the tracks on the album, File > get info, and either give them all a single "album artist", or check the "compilation" flag (as in https://discussions.apple.com/message/17670085).
    If these are from multiple-CD sets you may also need to enter the appropriate information in the disc number fields.  If they are not a multiple CD set you still need to make sure the disc number fields are set correctly or all empty.

  • Cant get 60 hz hdmi output to panasonic plasma tv

    hello
    i am trying to get tv out from my laptop and desktop pc to panasonic 42" plasma tv .. i can only take 1920x1080 1080p/50hz display .
    i tried everythink but i cant get work kms line in my grub menu ..
    all i need is 1080p/60 hz display from grub menu .
    Last edited by ytsejam (2012-02-10 13:58:32)

    ytsejam wrote:So shall i write HDMI-A-1 as card?
    Yep.
    Which graphic card is it exactly? If it's radeon, and if you don't mind compiling your own kernel, revert this change, it might help with the overscan (only affects X though, not the console): http://git.kernel.org/?p=linux/kernel/g … a481351b44

  • Cant get com.apple.security.files.user-selected.read-only entitlement to work

    Hey I am curious how can I get the .ipa compiled file for iOS to be able to read all the directories on the iPhone?
    I made a file browser but I cant get to the pictures
    I tried adding the entitlements in Flash Builder 4.6 in the descriptor file like this:
    <key>com.apple.security.files.user-selected.read-only</key>
    <true/>
    <key>com.apple.security.assets.movies.read-only</key>
    <true/>
    <key>com.apple.security.assets.pictures.read-only</key>
    <true/>
    in the
      <iPhone>
            <Entitlements>
            <![CDATA[
    I got Push notifications working and accepted in the app store but it can't read the pictures directory when browsing for a file
    I know the app id and stuff is set up right or I wouldnt have been able to get it accepted in the app store.  In the entitlements area of course I have the application identifier set and aps-environment and keychain access groups and whatnot set up right.
    When I try to put the app onto the iPhone with iTunes it just says 'Entitlements are not valid' (does not mention anything about mismatched ids) I can't find anything about how to add this entitlement and I could have sworn I saw a thing that said I can just use the descriptor file to add entitlements in some of the documentation I have it set to use air 3.4
    Is there something I am doing wrong, how do I get apple to just put these entitlements in the mobileprovision file, I cant seem to edit it, if I do I also get an error in itunes that is some hex code...

    Did you ever solve your problem?
    I just transfered my web hosting and e-mail to bluehost. I had some of the same problems you are having. I noticed you have your incoming server set to bluehost.
    Incoming mail server: (SSL) box610.bluehost.com (sever requires authentication which I already have done)
    If bluehost is your server this is what worked for me:
    Account Information
    Account type— POP
    Description—anything you want
    Email Address—in your case would be [email protected]
    Full name—  first and last name
    Incoming server—mail.magnus.com
    User name—[email protected] Notice it is the @ symbol not a +
    password— your password . Remember they are case sensitive
    Outgoing Mail server—select edit smpt server list from the drop down window
    select the + to add a server
    Account Information
    Description—may be left blank
    Server name—mail.magnus.com
    TSL Certificate—None
    Advanced
    Use default ports
    Check  Use SSL
    Authenticate—password
    Username—[email protected]
    passowrd—your password
    Click ok
    In the accounts window
    Outgoing SMTP— select the server you just created.
    Check—use only this server
    Select the Advance tab next to the Mailbox Behaviors
    Check use SSL— it will be port 995
    Authenticate —use password
    Ann

  • Help, payed $20 for java on cd and book but i cant get it to work

    someone please help me, im trying to learn java to do a project for my church but after i installed it and everything was as it should be, i cant figure out how to use it, i am so confused, i am used to using things like borlans java compiler but i cant get this version to work can someone please help me, im so stressed out.. and if you dont mind could u email ur responce to [email protected] i dont check the same pages over and over again verry often. thnks :-)

    Ben,
    this tutorial will open the door to java programming.
    Any Qs ask.
    http://java.sun.com/docs/books/tutorial/getStarted/cupojava/win32.html

  • Reflection cant get parameterized method signature?

    my sample:
    interface Root<T>{
    public void prt(T t );
    interface A extends Root<String>{
    public class Reflecttest {
    public static void main(String[] args){
    Class cl=A.class;
    for (Method m:cl.getMethods()){
    m.getParameterTypes();
    //som reflection like above, but i cant get signature like public void prt(String str); but public void prt(Object o);
    //how can i get the parameterized method signature
    }

    That information doesn't exist at runtime. It is all
    erased to Object by the compiler. That's what
    Generics does - safe type erasurefurther, you don't need to know, since by using reflection you're basically bypassing compile-time type safety altogether. reflection and generics have totally different intents, and don't mix well together

  • My macbook pro no longer connects to my TV with the mini dvi to hdmi adapter. It was working fine now I cant get it to output to the Tv. Any ideas?

    My Macbook pro no longer outputs to my vizio led tv. It was working fine now I cant get any picture. It just says no signal. It is not the hdmi or the adapter because it works fine with my other tv. Any ideas on how to resolve this would be greatly appreciated. Please be as specific as possible. Thanks. BTW--I am using the mini dvi to hdmi adapter in case that was unclear.

    Since you say that the same connectors work on your other TV is suggests that the fault is not in the connectors but your Vizio TV.  I would check the settings on the Vizio TV.  Verify that is is set to receive HDMI input.  Perhaps you or some one else has inadvertently changed them.  Pressing the wrong buttons on a remote control device can do that.  (I am assuming no changes were made in SYSTEM PREFERENCES>DISPLAYS)
    Ciao.

  • I cant get itunes on my new laptop.  My laptop says I have to remove itunes from another computer as I can only have it on 5.  Problem is that apart from my ipad, I no longer have the others as they were either broken beyond repair or lost.  Any ideas?

    I am not good with computers.  I am trying to get my iTunes onto this new laptop but it says I am only allowed to have it on 5 computers and I must take it off one to ut it on this new laptop.  Problem is, apart from my iPad, I have lost one laptop and two have been broken beyond repair so I am unable to take it off!  Anyone any ideas?  I have tried to get iTunes support but cant get past the "date of purchase" as I can only guess when I bought my ipod (2009)

    Hang on...
    You can only authorise the songs you purchase from the iTunes Store to play on five computers.
    You can download and install iTunes (the iTunes programme) onto as many computers as you wish.
    Two different things.
    Assuming therefore, that your problem is that you have authorised five computers, but now no longer have some of them, you need to de-authorise all your computers and then re-authorise the computers you still have.
    To de-authorise your computers, go to your account in the iTunes Store and look for the Deauthorise All button.

  • I tried downloading a free app and it asked for my billing information and when i entered it, it says that there was a billing problem with a previoud purchase and i have to update it. I keep updating it and it wont let me verify it and i cant get apps

    I tried downloading a free app and it asked for my billing information and when I entered it, it said that there was a billing problem with a previous purchase and I have to update it. I keep updating it and it wont let me verify it and I cant get any apps even if they are free, and I just Deleted some apps to make room for my new upate!

    The message says: "The payment method has been denied, try another method"
    I'm living in the same country and city since I was born, so I don't think the location is the problem.
    And yes, I paid with the card a meal in Burguer King today. And nothing more.

  • How do I get my new iphone restored with my old backup? my old iphone had ios5 and the replacement phone i got has ios4 and it wont let me backup my phone because it doesnt have ios4... i cant get ios5 without restoring my iphone and backing it uo

    Basically, i need all my old stuff from my iphone 4 with ios5 onto my new iphone 4.  The new phone i received only had ios4. I went to get all my contacts and backup from my old phone onto my new phone and it wont let me because my new phone is only ios4 and my backup from my old phone was in ios5.  I cant get ios5 on my phone without creating a new backup of my new phone, which has nothing on it.  If i restore it as a new phone and backup virtually nothing from my new phone, will that get rid of all my old backup stuff from my old iphone?

    Bottom line is you CANNOT restore to a phone from a backup that has a more recent iOS which is what you're trying to do.  Just can't be done.

  • How do I connect my Mac Book Pro to a projector I have the adapter but cant get anything on the screen

    How do I connect my Mac Book Pro to a projector I have the adapter but cant get anything on the screen

    Go to your "screen settings". then chose "find screen" then you vill find the prosjector.
    this will probably fix your problem.
    if this dont works can it be something wrong with your adapter.
    hope it helps

  • I cant get two monitors to work on one pc.

    Does anyone know why i cant get two monitors working on one pc?
    I have a HP P6 2000 UKM computer, running windows 7 and it has a DVI D socket as well as the standard VGA (which i am using for my primary monitor)  I have got the right DVI  to VGA adaptor and have followed various instructions to set up duel disply but every tutorial i have seen says use the multiple display option,  but the option dropdown box is not there!
    Iv'e tried two different monitors but he same problem. If my graphics card does not suport 2 monitors then why is there a DVI D socket?
    Have never had this problem in the past!
    Please help.
    Nobby

    Hi,
    Please post the exact HP product number for your PC.
    VGA is analog and DVI-D is digital.  If you have two monitors then one of them needs to support a digital video signal if you want to use two monitors
    HP DV9700, t9300, Nvidia 8600, 4GB, Crucial C300 128GB SSD
    HP Photosmart Premium C309G, HP Photosmart 6520
    HP Touchpad, HP Chromebook 11
    Custom i7-4770k,Z-87, 8GB, Vertex 3 SSD, Samsung EVO SSD, Corsair HX650,GTX 760
    Custom i7-4790k,Z-97, 16GB, Vertex 3 SSD, Plextor M.2 SSD, Samsung EVO SSD, Corsair HX650, GTX 660TI
    Windows 7/8 UEFI/Legacy mode, MBR/GPT

  • HT1420 Cant get itunes to open.Error message:"its on a locked Cant get itunes to

    Cant get itunes to open.Error message:"its on a locked disk." What does this mean??!!

    ok heres what u gotta do
    yes i know its alot of steps but if you do them right it will work.
    1.remove all active versions of itunes
    2.then restart as it asks you to do, if it doesnt ask do it your self
    3.unplug ipod
    4.remove ipod software
    5. restart
    6.install the cd the ipod came w/
    7.when it asks you if you want to upgrade itunes say yes
    8.download the file
    9.intall the newest version
    10.restart
    if you have done exactly these steps(exactly in this order)then itunes should be working now

  • Help! I can't delete my neighbors email from my iPhone 5 icloud account after I sold it to him after restoring it to factory settings.  Now he's on my iCloud account and it cannot be deleted.  Its impossible.  help. It seems the first one cant get delete

    Help Please, I sold my iphone 4 to my neighbor after I restored it to factory settings.  I just bought a new iphone 5 and decided to check out the icloud "stuff' so that I can use 'find my iphone' because I have 2 kids.  I went to check out my icloud on my imac and in the address bar put icloud.com then signed in, double clicked on mail went accounts then clicked on the gear in the right hand corner and there it was.  My neighbor had his email in the icloud and there absolutely was no way to delete his info off of my new phone.  I guess once the first person enters their info you absolutely cant get rid of it.  you can get rid of aliases but just not the original one. WHY!!  Is there any brilliant, wonderful,generous person out there that would know how to delete him from my account.  The genius bar said that they've never seen this before.  If someone can help I'm taking the info to the apple stores that I went to so that I can teach them how to do it.  Of course, I will tell them who showed me. I give you my word.

    As far as I know you can't delete the primary email address for an iCloud account.  It's assigned when the account is created.  But your neighbor wouldn't have been able to get into your iCloud account without your Apple ID and password.  Are you sure the account wasn't still on your phone when you gave it to him?
    You could migrate a copy of your data to a new iCloud account but I would still be concerned that someone else was using my old account, which presumably still has your data in it.
    I'm fairly certain that you're going to have to have iCloud support help you sort this one out as they may have the ability to make changes to an existing account that users can't.  Make an appointment with the genius bar at a nearby Apple store and have them take a look at it.  If necessary, they should be able to contact iCloud support for you.

Maybe you are looking for