这个网页中有个APPLET,我想把这个APPLET抓下来,但是它的.class文件我下不了。请问有没有什么办法能搞定它?多谢。
网址是:
[code]http://media.pearsoncmg.com/aw/aw_kurose_network_2/applets/csma-ca/withouthidden.html
[/code

解决方案 »

  1.   

    在java web start里边可以离线运行
      

  2.   

    可以下载http://media.pearsoncmg.com/aw/aw_kurose_network_2/applets/csma-ca/Csma_ca_applet.class
      

  3.   

    说一下,光下载上面的一个CLASS文件是不行的。有很多,还有内部类。
      

  4.   

    其它的class文件下起来就有难度了,不然什么文件都可以下那就惨了..
      

  5.   

    下把这个class下载到,通过反编译查看原代码,顺藤摸瓜,比较麻烦如果你能攻克这台服务器,那问题就简单了下面是反便宜的代码:// Decompiled by Jad v1.5.7g. Copyright 2000 Pavel Kouznetsov.
    // Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
    // Decompiler options: packimports(3) fieldsfirst ansi 
    // Source File Name:   Csma_ca_applet.javaimport java.applet.Applet;
    import java.awt.*;public class Csma_ca_applet extends Applet
    {    private Scenario scenario;
        private Button reset;
        private Button simAction;
        private Label simLabel;
        private GridBagLayout gridbag;    public Csma_ca_applet()
        {
        }    private Scenario getScenarioParam()
        {
            String s = getParameter("scenario");
            if(s.compareTo("Hidden") == 0)
                return Scenario.HIDDEN3();
            else
                return Scenario.STANDARD3();
        }    public void init()
        {
            gridbag = new GridBagLayout();
            setBackground(Color.white);
            setFont(new Font("Helvetica", 0, 14));
            setLayout(gridbag);
            loadScenario();
        }    private void loadScenario()
        {
            removeAll();
            scenario = getScenarioParam();
            reset = new Button("Reset");
            reset.addActionListener(new  Object()     /* anonymous class not found */
        class _anm1 {});
            simAction = new Button(scenario.getSimActionName());
            simLabel = new Label(scenario.getSimState());
            simAction.addActionListener(new  Object()     /* anonymous class not found */
        class _anm2 {});
            makeComponent(reset, 1, 1, 0.0D, 0.0D);
            makeComponent(simAction, 1, 1, 0.0D, 0.0D);
            makeComponent(simLabel, 0, 1, 0.0D, 0.0D);
            makeComponentBG(new Canvas(), Color.white, 0, 1, 0.0D, 0.10000000000000001D);
            makeComponentBG(new Canvas(), Color.black, 0, 1, 0.0D, 0.10000000000000001D);
            makeLabel(new Label("Emit Frame", 1), 1, 1, 0.0D, 0.0D);
            makeLabel(new Label(" ", 1), 3, 1, 3D, 0.0D);
            makeLabel(new Label("Queue", 1), 1, 1, 0.0D, 0.0D);
            makeLabel(new Label("BackOff", 1), 0, 1, 0.0D, 0.0D);
            makeComponentBG(new Canvas(), Color.darkGray, 0, 1, 0.0D, 0.10000000000000001D);
            for(int i = 0; i < scenario.getMobileNumber(); i++)
            {
                Button button = new Button(scenario.getMobileName(i));
                button.addActionListener(scenario.getActionListnerForMobile(i));
                Label label = new Label("0", 1);
                Label label1 = new Label("0", 1);
                TimeLine timeline1 = new TimeLine();
                scenario.setMobileDisplay(i, label, label1, timeline1);
                makeComponent(button, 1, 1, 0.0D, 0.0D);
                makeComponent(timeline1, 3, 1, 3D, 1.0D);
                makeLabel(label, 1, 1, 0.0D, 0.0D);
                makeLabel(label1, 0, 1, 0.0D, 0.0D);
                makeComponentBG(new Canvas(), Color.darkGray, 0, 1, 0.0D, 0.10000000000000001D);
                scenario.addEmitButton(button);
            }        TimeLine timeline = new TimeLine();
            scenario.setBSDisplay(timeline);
            makeLabel(new Label("Access Point", 1), 1, 1, 0.0D, 0.0D);
            makeComponent(timeline, 3, 1, 3D, 1.0D);
            makeLabel(new Label(""), 0, 1, 0.0D, 0.0D);
            makeComponentBG(new Canvas(), Color.darkGray, 0, 1, 0.0D, 0.10000000000000001D);
            validate();
            scenario.enableEmitButtons(false);
        }    private void makeComponent(Component component, int i, int j, double d, double d1)
        {
            GridBagConstraints gridbagconstraints = new GridBagConstraints();
            gridbagconstraints.fill = 1;
            gridbagconstraints.gridwidth = i;
            gridbagconstraints.gridheight = j;
            gridbagconstraints.weightx = d;
            gridbagconstraints.weighty = d1;
            gridbag.setConstraints(component, gridbagconstraints);
            add(component);
        }    private void makeComponentBG(Component component, Color color, int i, int j, double d, double d1)
        {
            component.setBackground(color);
            makeComponent(component, i, j, d, d1);
        }    private void makeLabel(Label label, int i, int j, double d, double d1)
        {
            makeComponentBG(label, Color.lightGray, i, j, d, d1);
        }}