Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Incompatible magic value 1013478509 in class file.

Apps_User_123456Sep 16 2014 — edited Sep 16 2014

Hi,

My Jdev version in 11.1.2.4

I have a problem in jar file deploying for applet embedded in JSF.

I followed the steps in the below url.

http://www.oracle.com/technetwork/developer-tools/adf/learnmore/index-101235.html

I could deploy the applet class in the given url in my page and run it successfully. So, I assume there is no path problem. But not able to deploy my class file. I am getting error Incompatible magic value 113478509 in class file.

I have compiled the jar in Jdeveloper itself. I can see the .class file and Manifest in the jar.

for testing purpose, I created a small jar file.

package test2;

import java.awt.BorderLayout;

import java.awt.Dimension;

import java.awt.Toolkit;

import javax.swing.JApplet;

import javax.swing.JFrame;

import javax.swing.JLabel;

public class test2  extends JApplet{

   

    private JLabel labelField = new JLabel();

   

    public test2() {

        super();

    }

    private void jbInit() throws Exception{

       

        labelField.setText("Hello");

        this.add(labelField);

    }

   

    public void init() {

        try {

            jbInit();

        } catch (Exception e) {

            e.printStackTrace();

        }

    }

   

   

    public static void main(String[] args) {

        test2  applet = new test2();

        JFrame frame = new JFrame();

        frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );

        frame.getContentPane().add(applet, BorderLayout.CENTER);

        frame.setTitle( "Applet Frame" );

        applet.init();

        applet.start();

        frame.setSize(300, 300);

        Dimension d = Toolkit.getDefaultToolkit().getScreenSize();

        Dimension frameSize = frame.getSize();

        frame.setLocation((d.width-frameSize.width)/2, (d.height-frameSize.height)/2);

        frame.setVisible(true);

    }   

   

}

Can somebody suggest what could be the problem ?

Thanks,

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 14 2014
Added on Sep 16 2014
3 comments
581 views