WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] How do i insert a java program I created?

[Resolved] How do i insert a java program I created?

  • 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

    Forum Moderator

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

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

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

    <applet codebase="http://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 ‘[Resolved] How do i insert a java program I created?’ is closed to new replies.