WordPress.org

Forums

The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

[resolved] How do i insert a java program I created? (4 posts)

  1. rich1990
    Member
    Posted 3 years ago #

    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??

  2. esmi
    Forum Moderator
    Posted 3 years ago #

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

  3. rich1990
    Member
    Posted 3 years ago #

    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"

  4. rich1990
    Member
    Posted 3 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic