Applet Works in IDE not command prompt

Discussion in 'Java' started by phantom, Sep 19, 2003.

  1. phantom

    phantom Guest

    Hi all,

    I have an applet that writes to a file (on the server side itself),
    when i run this applet class thru an IDE (IntelliJ) it picks up all
    the policy stuff for me and runs the applet perfectly fine. However
    when I execute the same command (as that is displayed by the IDE) from
    the command prompt it gives me an error Main class not found Program
    will exit.

    Heres the command that IntelliJ uses when running the applet

    C:\j2sdk1.4.2\bin\javaw.exe
    -Djava.security.policy=C:/IntelliJ-IDEA-3.0.4/bin/appletviewer.policy
    -classpath C:\j2sdk1.4.2\lib\tools.jar;C:\mydir;C:\j2sdk1.4.2\jre\lib\charsets.jar;C:\j2sdk1.4.2\jre\lib\jce.jar;C:\j2sdk1.4.2\jre\lib\jsse.jar;C:\j2sdk1.4.2\jre\lib\plugin.jar;C:\j2sdk1.4.2\jre\lib\rt.jar;C:\j2sdk1.4.2\jre\lib\sunrsasign.jar;C:\j2sdk1.4.2\jre\lib\ext\dnsns.jar;C:\j2sdk1.4.2\jre\lib\ext\ldapsec.jar;C:\j2sdk1.4.2\jre\lib\ext\localedata.jar;C:\j2sdk1.4.2\jre\lib\ext\sunjce_provider.
    ar sun.applet.AppletViewer file:/C:/mydir/Spc.html

    The Spc.html file looks as below:

    <HTML>
    <HEAD>
    <TITLE>APPLETS</TITLE>
    </HEAD>
    <BODY>
    <APPLET CODE="Spc.class"
    width=400 height=400>
    </APPLET>
    </BODY>
    </HTML>

    All help wud be appreciated in gunning down this one

    Thanking in anticipation
    S
     
    phantom, Sep 19, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. chrisdude911
    Replies:
    10
    Views:
    135,522
    srk289
    Mar 10, 2009
  2. Gregory Bloom
    Replies:
    4
    Views:
    368
    Steve Holden
    Apr 28, 2007
  3. gaurav kashyap
    Replies:
    2
    Views:
    635
    gaurav kashyap
    Oct 30, 2008
  4. gaurav kashyap
    Replies:
    3
    Views:
    704
    gaurav kashyap
    Oct 31, 2008
  5. Mel
    Replies:
    10
    Views:
    3,165
    Sailaja Appi
    Feb 13, 2009
Loading...

Share This Page