Java .class help

Discussion in 'Programming General' started by rubiksmaster12, Feb 7, 2008.

Java .class help
  1. Unread #1 - Feb 7, 2008 at 9:54 PM
  2. rubiksmaster12
    Joined:
    Aug 9, 2007
    Posts:
    115
    Referrals:
    0
    Sythe Gold:
    0

    rubiksmaster12 Active Member
    $5 USD Donor

    Java .class help

    So I'm trying to learn java and what I've done so far is made the famous "Hello world!" script that you seem to make when you learn any programming language. Then I used javac and made a .class file. Now how do i view that .class file in like html or something?
     
  3. Unread #2 - Feb 8, 2008 at 10:13 AM
  4. Nullware
    Joined:
    Jan 30, 2007
    Posts:
    1,761
    Referrals:
    4
    Sythe Gold:
    0

    Nullware Guru

    Java .class help

    Make a batch file (usually named "run.bat") and include the following code.

    Code:
    "C:\Program Files\Java\jdk1.6.0_03\bin\java" HelloWorld
    pause
    
    The first line will run your program although you do have to make sure that is the correct path to Java on your machine and also you have to replace "HelloWorld" by whatever you called your program.

    The second line, the pause, just pauses it to allow you to view the output.
     
< Need Help? Ask Me | Vb Runescape Webbrowser question >

Users viewing this thread
1 guest


 
 
Adblock breaks this site