• Log in or sign up for an account here: https://www.sythe.org/login

Java .class help

rubiksmaster12

Active Member

$5 USD Donor
Joined
Aug 9, 2007
Sythe Gold
0
Messages
115
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?
 
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.
 
Runescape Gamblingrunescape gambling
Back
Top