• Resolved rich1990

    (@rich1990)


    Hello, I created a simple Java program. I tried uploading the .class file to my site and tried implementing it in a page, but the applet says it still can’t find the .class file. what do i do??

Viewing 3 replies - 1 through 3 (of 3 total)
  • esmi

    (@esmi)

    Try using full (absolute) urls to point to all .class files.

    Thread Starter rich1990

    (@rich1990)

    I am doing that and it still won’t work. Here’s my code:
    <applet code=”https://example.com/wp-content/uploads/JavaMain.class&#8221; width=”400″ height=”400″></applet>
    And I get the error “ClassNotFoundException: http:..example.com.wp-content.uploads.JavaMain.cass”

    Thread Starter rich1990

    (@rich1990)

    Wow that was a very easy fix! This did it:

    <applet codebase="https://example.com/wp-content/uploads/" code="JavaMain.class" height="200" width="200"></applet>

    I knew it was something simple, I just had to specify the codebase field. If anyone else has this problem, the above solution should fix it.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How do i insert a java program I created?’ is closed to new replies.