Results 1 to 9 of 9
  1. #1
    Silk[H4x]'s Avatar
    Join Date
    Jul 2008
    Posts
    45
    Reputation
    10
    Thanks
    102

    Java Basics... Make an Hello cmd window...

    So lets start, in this tutorial i will explain how to do an hello window that will appear in a CMD window...

    1st Step:

    Go to your desktop, Left click and make a new .txt file...
    Name it to Hello.java
    After Editing the name, double tap it, a window will open...
    Type on in the following code:
    Code:
    public class Hello {
    public static void main(String[] args) {
    system.out.println("Hello");
    }
    }
    Then, Save the file and Close it...

    2nd Step:

    Go to your desktop again, and make a new .txt file, name it to Compile.bat, Left click the file, and press "Edit", Then type the following on it:
    Code:
    @echo off
    title Compile
    javac*.java
    pause
    Now... Save and close it.

    3rd Step:

    Double tap your compile.bat file, wait some seconds, and there wil appear: Press any key to continue... when it appears, press any key like it says and it will close, a new file will appear on your desktop named of: "hello.class"

    Now... Create a new .txt file in your desktop and name it to Run.bat Left Click it, press Edit and type there the following:

    Code:
    @echo off
    title Hello
    java Hello
    pause
    Save and close it...

    AND YOUR FIRST JAVA SCRIPT IS DONE!

    Now to run it double tap the run.bat... and done!


    Explanation
    "system.out.println[B]("Hello")" Will show whatever you want, any message you want in your hello java program... In this case, it will show Hello, If you want to add another thing, just remove the ("Hello") and add ("whatever you want here")...

    "title Compile" You can change the title to whatever you want: title Whatever you want here...

    I HOPE YOU UNDERSTAND!

    Remember to use the THANKS BUTTON instead of just saying thanks in a reply!

    Have Fun!

  2. The Following 2 Users Say Thank You to Silk[H4x] For This Useful Post:

    duckie2104 (08-18-2009),imalvlage (09-04-2008)

  3. #2
    Xray3109's Avatar
    Join Date
    May 2008
    Gender
    male
    Posts
    418
    Reputation
    33
    Thanks
    30
    My Mood
    Devilish
    It says its not recognizable as an external command when i try to compile it. Am i doing somthing wrong?

  4. #3
    Silk[H4x]'s Avatar
    Join Date
    Jul 2008
    Posts
    45
    Reputation
    10
    Thanks
    102
    Maybe.... It Works perfectly for me...

    Are you using Windows Vista?

  5. #4
    GOD's Avatar
    Join Date
    Jul 2008
    Gender
    male
    Location
    I am the God
    Posts
    11,084
    Reputation
    15
    Thanks
    1,517
    My Mood
    Amazed
    lol this is easy
    I am the God.

  6. #5
    tednugent's Avatar
    Join Date
    Mar 2007
    Gender
    male
    Location
    /bin/src
    Posts
    3,592
    Reputation
    17
    Thanks
    610
    Quote Originally Posted by Xray3109 View Post
    It says its not recognizable as an external command when i try to compile it. Am i doing somthing wrong?
    You have to have a java compiling tool for "javac" to be a recognizable command.

  7. #6
    radnomguywfq3's Avatar
    Join Date
    Jan 2007
    Gender
    male
    Location
    J:\E\T\A\M\A\Y.exe
    Posts
    8,858
    Reputation
    381
    Thanks
    1,823
    My Mood
    Sad
    I think it would be easier to get the bins and hook'em up to an IDE. Its a pain in the ass to do that for every project. Netbeans -_-



    There are two types of tragedies in life. One is not getting what you want, the other is getting it.

    If you wake up at a different time in a different place, could you wake up as a different person?


  8. #7

  9. #8
    Silk[H4x]'s Avatar
    Join Date
    Jul 2008
    Posts
    45
    Reputation
    10
    Thanks
    102
    ^_^ He is right

  10. #9
    optiforce's Avatar
    Join Date
    Aug 2008
    Posts
    48
    Reputation
    10
    Thanks
    5
    i hate java, silk[HAX] take the mgph goals out of your sig there not even upto date

Similar Threads

  1. [Solved] How to i make my Cod BO windowed?
    By SizeMan in forum Call of Duty Black Ops Help
    Replies: 13
    Last Post: 09-13-2011, 04:21 AM
  2. [Request] Can Anyone Make a Hack For Windows Xp Professional 32 Bit
    By sdad19 in forum CrossFire Discussions
    Replies: 10
    Last Post: 06-11-2011, 02:43 PM
  3. [Tutorial] [HowTo]Make WarRock Work in Windows Vista/7
    By ♪ςander!♪ in forum WarRock Tutorials
    Replies: 20
    Last Post: 02-09-2011, 08:25 PM
  4. How To Make Warrock start in windowed mode
    By codedkid55 in forum WarRock Discussions
    Replies: 8
    Last Post: 12-03-2010, 08:03 AM
  5. Replies: 1
    Last Post: 07-05-2006, 06:20 AM

Tags for this Thread