Results 1 to 4 of 4

Thread: running class files

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Apr 2001
    Location
    Ottawa, Canada
    Posts
    181

    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

  2. #2
    Fanatic Member sbasak's Avatar
    Join Date
    Aug 2001
    Location
    Globe Trotter
    Posts
    524
    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 &lt;APPLET&gt; tag but isn't running the applet, for some reason."
    Your browser is completely ignoring the &lt;APPLET&gt; 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.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Apr 2001
    Location
    Ottawa, Canada
    Posts
    181
    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

  4. #4
    Addicted Member Phenix's Avatar
    Join Date
    Sep 2002
    Location
    Near A Cube
    Posts
    228
    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
  •  



Click Here to Expand Forum to Full Width