Java Compiler and Textpad

Discussion in 'OT Technology' started by Sexual Vanilla, Sep 22, 2006.

  1. Sexual Vanilla

    Sexual Vanilla New Member

    Joined:
    May 23, 2005
    Messages:
    6,305
    Likes Received:
    0
    Location:
    South Carolina
    Hello all,
    I've been programming solely in C++ throughout college, and now I'm trying to freshen up on some Java so I am a little more well rounded. I decided to go the Textpad route, as that is what my professors recommended.

    The problem lies in compiling. I've downloaded the latest Java Development pack, as well as Textpad. I'm running a simple counting program just to test, but when I compile, I receive the following error:
    The program works fine on the lab computers, so I'm sure the error lies in my installation of the Java package. Any ideas? Thanks!
     
  2. Coottie

    Coottie BOOMER......SOONER OT Supporter

    Joined:
    Jun 6, 2006
    Messages:
    32,407
    Likes Received:
    0
    Location:
    OKC
    What's the command you typed??

    Oh and we use Dr. Java instead of Textpad
     
  3. Sexual Vanilla

    Sexual Vanilla New Member

    Joined:
    May 23, 2005
    Messages:
    6,305
    Likes Received:
    0
    Location:
    South Carolina
    [​IMG]Here's the original program.



    [​IMG]

    And here is the error message I get.
     
  4. samm

    samm Next in Line

    Joined:
    Dec 22, 2000
    Messages:
    2,630
    Likes Received:
    0
    Location:
    San Jose, CA
    I have never used Textpad, but the following example compiles fine. It is more or less the same as the code you posted:

    Code:
    [[email protected] temp]$ cat test.java
    public class test {
        public static void main(String []args) {
            for (int i=0; i <= 5; ++i) {
                System.out.println(i);
            }
        }
    }
    
    [[email protected] temp]$ javac test.java
    [[email protected] temp]$ java test
    0
    1
    2
    3
    4
    5
    [[email protected] temp]$
    
    what happens when you type javac test.java?
     
  5. Sexual Vanilla

    Sexual Vanilla New Member

    Joined:
    May 23, 2005
    Messages:
    6,305
    Likes Received:
    0
    Location:
    South Carolina
    Nothing...it goes right back to the command prompt without giving me any message.
     
  6. samm

    samm Next in Line

    Joined:
    Dec 22, 2000
    Messages:
    2,630
    Likes Received:
    0
    Location:
    San Jose, CA
    well if you look at the example i posted, it didn't give any messages either, indicating a successful compilation. So you can compile your code in a shell but not using Textpad?
     
  7. Sexual Vanilla

    Sexual Vanilla New Member

    Joined:
    May 23, 2005
    Messages:
    6,305
    Likes Received:
    0
    Location:
    South Carolina
    Yep, that was the problem. It was running fine in a shell, just not in Textpad. I had to disable the Java plugin for Textpad then reinstall it. :ugh2:

    Thanks for the help though! :bigthumb:
     
  8. Coottie

    Coottie BOOMER......SOONER OT Supporter

    Joined:
    Jun 6, 2006
    Messages:
    32,407
    Likes Received:
    0
    Location:
    OKC
    Perhaps you d/l a text pad based on a different JRE then the one installed on your system??
     
  9. Sexual Vanilla

    Sexual Vanilla New Member

    Joined:
    May 23, 2005
    Messages:
    6,305
    Likes Received:
    0
    Location:
    South Carolina
    That may have been it...who knows. :hsugh:
     
  10. Coottie

    Coottie BOOMER......SOONER OT Supporter

    Joined:
    Jun 6, 2006
    Messages:
    32,407
    Likes Received:
    0
    Location:
    OKC
    You can check the JRE by typing java -version at the command prompt then check the version number to Text Pad requirements.
     
  11. Corp

    Corp OT Supporter

    Joined:
    Sep 11, 2003
    Messages:
    28,201
    Likes Received:
    0
    Location:
    Providence, RI
    all you should need to do to get java to work in textpad is go to configure -> preferences -> tools -> add -> java sdk commands.
     
  12. Joe_Cool

    Joe_Cool Never trust a woman or a government. Moderator

    Joined:
    Jun 30, 2003
    Messages:
    299,374
    Likes Received:
    580
    You probably had it misconfigured to run "javac", not "javac %1".
     
  13. Sexual Vanilla

    Sexual Vanilla New Member

    Joined:
    May 23, 2005
    Messages:
    6,305
    Likes Received:
    0
    Location:
    South Carolina
    That's what I had to do...well, I had them already, I had to remove it, then put it back.:ugh:
     
  14. Peyomp

    Peyomp New Member

    Joined:
    Jan 11, 2002
    Messages:
    14,017
    Likes Received:
    0
  15. Joe_Cool

    Joe_Cool Never trust a woman or a government. Moderator

    Joined:
    Jun 30, 2003
    Messages:
    299,374
    Likes Received:
    580
    What he posted is as verbose as it gets. That's what javac spits out if you call it with no argument. Hence my post. He had it configured to run "javac", not "javac %1".
     
  16. Corp

    Corp OT Supporter

    Joined:
    Sep 11, 2003
    Messages:
    28,201
    Likes Received:
    0
    Location:
    Providence, RI
    i prefer textpad to any ide i have ever used, including eclipse. being able to just create a java file and have it compiled and running in 3 steps > having to make projects.
     
  17. Joe_Cool

    Joe_Cool Never trust a woman or a government. Moderator

    Joined:
    Jun 30, 2003
    Messages:
    299,374
    Likes Received:
    580
    :werd: Although on big projects it can help to use an IDE. I always use Netbeans when I do a java website.
     
  18. Corp

    Corp OT Supporter

    Joined:
    Sep 11, 2003
    Messages:
    28,201
    Likes Received:
    0
    Location:
    Providence, RI
    i would definitley use an ide on a big project, but i haven't had anything big enough to justify it yet.
     
  19. Coottie

    Coottie BOOMER......SOONER OT Supporter

    Joined:
    Jun 6, 2006
    Messages:
    32,407
    Likes Received:
    0
    Location:
    OKC
    Try Dr. Java, I linked it in my prev post but hyperlinks aren't that obvious on OT. DRJava is cool cuz it's stand alone product and doesn't require an install....plus it'll compile on the fly and has a console tab to try things out. It's very handy.
     
  20. HardTech

    HardTech hungry

    Joined:
    May 5, 2000
    Messages:
    28,103
    Likes Received:
    1
    Location:
    NorCal
    :werd:

    it's the best simple Java IDE
     
  21. Sexual Vanilla

    Sexual Vanilla New Member

    Joined:
    May 23, 2005
    Messages:
    6,305
    Likes Received:
    0
    Location:
    South Carolina
    Like someone mentioned earlier, I prefer Textpad to Netbeans...unless you're wanting to develop complex GUI's and such.
     
  22. tyrionlannister

    tyrionlannister New Member

    Joined:
    Jun 13, 2006
    Messages:
    710
    Likes Received:
    0
    Location:
    New York
    If you're looking for the best IDE, and not something which will emulate your exam environment, then buy Intellij IDEA. It's seriously the best developing environment for Java, and worth the price. An academic license is $99, I think, but if you're working on an established open source project you can get it for free.
     

Share This Page