-
running class files
i'm completed a program, and have class files compiled
how do i get them to run on other computers (pc's for now, running windows, to keep it simple) i send the class files to the other computer, but how do i run it??
if i put 'java myprog.class' it doesn't do anything (under xp)..and i don't really wanna buy software that'll create an exe, but i'm sure you can run the class files on other computer that don't have the whole java library..how do i do it??
thanx
--770
-
You need to create an HTML file to call that class file.
eg.
<html>
<head>
<title>Arc Test (1.1)</title>
</head>
<body>
<h1>Arc Test (1.1)</h1>
<hr>
<applet code=ArcTest.class width=400 height=400>
alt="Your browser understands the <APPLET> tag but isn't running the applet, for some reason."
Your browser is completely ignoring the <APPLET> tag!
</applet>
<hr>
<a href="ArcTest.java">The source</a>.
</body>
</html>
Or you need appletviewer.exe program to view your applets.
-
but i don't wanna run it as an applet...is there another way?
wanna run it like just any other program...
can't you just put 'java filename.class', and run it or something?
thanx
--770
-
They will need a JVM (Java Virtual Machine), the runtime environment. But are you able to run it on your pc?
java filename.class is supposed to fail. You should be using
java filename without the extension .class