|
-
Feb 11th, 2003, 12:39 AM
#1
Thread Starter
Addicted Member
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
-
Feb 11th, 2003, 06:26 AM
#2
Fanatic Member
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.
Life is a one way journey, not a destination. Travel it with a smile and never regret anything.
Yesterday is history, tomorrow is a mystery, today is gift - that's why we call it present.
-
Feb 11th, 2003, 01:32 PM
#3
Thread Starter
Addicted Member
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
-
Feb 11th, 2003, 08:33 PM
#4
Addicted Member
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|