Page 1 of 3 123 LastLast
Results 1 to 20 of 42
  1. #1
    Northpower is offline Member
    Join Date
    Oct 2016
    Posts
    15
    Rep Power
    0

    Default How can I get an old applet to work?

    I need help with an old applet which I can't use.

    For many years i used a Java Applet called TeamStats for different sports league tables. It was a simple but very useful applet.

    Then Oracle started to come up with their new security things which made aömost all my Java Applets impossibe to use, unfortunately also TeamStats.

    After trying for a while to get this applet work, I simply gave up.

    For two years I've tried different, Programs which can be used for maintaining sports league tables, all of them more complicated to handle and not as useful as TeamStats. I even bought a buggy program for a nice sum of money which turned out to be worthless, very limited and no support at all from those who sold it to me.

    I've tried to construct Excel tables but it's too complicated and they take too much time to work with.

    So I've decided to bring TeamStats back to life. But how?

    I've contacted the guy who made the original applet. Unfortunately he has moved om to other projects. He was rather uncooperative and had no intentions at all to create a new applet hor help me get this one in order.

    Is there anyone here who can help me use this applet again? I can send it or make it downloadable if necessary. The problem I'm facing are all warning messages which shows up when I try to use the applet. I have no idea how to certify this or make it work with the recent Java uppdates.

    Unfortunately, I only have the Swedish applet and other language versions aren't available anymore. I hope that someone might understand the principles for the applet anyway and make it work for me. Or if there are anyone who can create a new but similar useable applet for me.

    Thanks in advance.

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    13,541
    Rep Power
    26

    Default Re: How can I get an old applet to work?

    Unless you have the source code I'm not sure what can be done.

    Do you know if it'll launch in the applet viewer?
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  3. #3
    Northpower is offline Member
    Join Date
    Oct 2016
    Posts
    15
    Rep Power
    0

    Default Re: How can I get an old applet to work?

    Unfortunately, I don't have the source code.

    I will try to further explain the problems.

    I was using TeamStats for many years to maintain sports league tables, some of it for personal use and some of it for a website for an ice hockey team I was maintaining.

    The problems started in 2014 with the new security measures from Java.

    I have Chrome as my main browser but for my own HTML-site with the application I use Firefox.

    I have created a HTML-site for the TeamStats applet but that site is only on my computer, not on the Internet.

    Now, when I try to start the applet, the following message comes up:

    "Application blocked by Java-security
    For security reasons, applications have to fulfil the demands for security settings High or Very high or be on the list for website exceptions to be allowed to run
    Name. embe.ts.TeamStats
    Place: file://
    Cause: Security settings has blocked a local application from being allowed to run."

    OK, I'm translating the message from Swedish. It might look a bit different in an English language browser or Java version.

    There is a map called embe with a "cabinet file" called ts.
    But there's also a compressed map called ts in the embe map and also a file map called ts in the embe map which has the following content:
    ComparePanel.class
    CompareStats.class
    League.class
    Match.class
    MatchPanel.class
    MatchSeries.class
    Misc.class
    ResObj.class
    Results.class
    StatPanel.class
    Table.class
    TablePanel.class
    Tableteam.class
    teamStats.class
    TSPanel.class
    WS_FTP

    The WS_FTP text file is referring to my updates for a hockey team website which I was maintaining 10 years ago so I guess we can forget that.

    When this problem occurred, I contacted the person who created the TeamStats applet. Unfortunately, he had no plans to make a newer version of the applet. Instead I got the advice to look for programs on the net with a similar function. Which I did-with terrible results!

    I wouldn't bother to try to bring the TeamStats applet back to life if it wasn't for the fact that I need this program for certain tasks. I've tested some similar programs, both free and purchased which have turned out to be buggy or not up to the standard and functions I need. A total waste of money and time.

    I've tried to add the site on my computer where I have the applet on the exception list but it doesn't work. Still the same security messages.

    As for the applet viewer, I'm not sure what you mean. I'm a newbie at this.

  4. #4
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    19,963
    Rep Power
    31

    Default Re: How can I get an old applet to work?

    As for the applet viewer, I'm not sure what you mean.
    AppletViewer is a tool in the JDK's bin folder. It will read a simple html file with the <Applet tag and execute the applet.
    Here's the path to the program on my system:
    C:\Program Files\Java\jdk1.8.0_60\bin\appletviewer.exe

    Run it in a command prompt window:
    Java Code:
    C:\Program Files\Java\jdk1.8.0_60\bin\appletviewer.exe D:\JavaDevelopment\Testing\ForumQuestions11\AppletHtmlFile.html
    If you don't understand my response, don't ignore it, ask a question.

  5. #5
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    6,226
    Rep Power
    13

    Default Re: How can I get an old applet to work?

    Took me about 15 seconds to find this with a web search. Here is the site which also includes a source code directory.

    TeamStats

    Edit: The website that is referenced is defunct. And the code is pre Java 5.0 (the author used the keyword enum as a variable).
    The different text files are all "class Text" and are used for various language support.

    Regards,
    Jim
    Last edited by jim829; 11-01-2016 at 02:59 PM. Reason: s/is/are
    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

  6. #6
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    13,541
    Rep Power
    26

    Default Re: How can I get an old applet to work?

    With the source I would consider swapping the Applet for a JFrame, but that would (of course) involve coding.

    To be honest, the applet viewer would be simplest if it works.
    Obviously it's possible this is a more complicated site than the viewer can handle.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  7. #7
    SurfMan's Avatar
    SurfMan is offline Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    1,983
    Rep Power
    8

    Default Re: How can I get an old applet to work?

    I used Wayback machine to get an archived copy of the site. The download there still worked. It appears the source is all there.

    Wayback: https://web.archive.org/web/20110505.../ts/index.html
    Sourcecode: http://surfman.home.xs4all.nl/ts12us.zip
    "It's not fixed until you stop calling the problem weird and you understand what was wrong." - gimbal2™ © 2013

  8. #8
    Northpower is offline Member
    Join Date
    Oct 2016
    Posts
    15
    Rep Power
    0

    Default Re: How can I get an old applet to work?

    How does a JFrame work?
    Unfortunately I'm a total newbie when it comes to programming. I've managed to create the "hello" applet but that's about all.

    As for the applet viewer, I can't find it on my computer. There's a folder called jre 180_111 and it's abin folder in that one but no appletviewer.exe in that.

  9. #9
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    6,226
    Rep Power
    13

    Default Re: How can I get an old applet to work?

    It would be included with your Java JDK. Find where your java compiler (javac.exe) is located. The applet should be in the same folder.

    Regards,
    Jim
    Last edited by jim829; 11-01-2016 at 07:33 PM.
    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

  10. #10
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    19,963
    Rep Power
    31

    Default Re: How can I get an old applet to work?

    There's a folder called jre 180_111
    That's for the JRE programs. You need to install the current JDK.
    If you don't understand my response, don't ignore it, ask a question.

  11. #11
    SurfMan's Avatar
    SurfMan is offline Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    1,983
    Rep Power
    8

    Default Re: How can I get an old applet to work?

    I have looked at with the source code that I have dug up on that webarchive thing. It's definately possible to upgrade it to a standalone program. I just hope the license permits it. PM me if you want my help.
    "It's not fixed until you stop calling the problem weird and you understand what was wrong." - gimbal2™ © 2013

  12. #12
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    6,226
    Rep Power
    13

    Default Re: How can I get an old applet to work?

    Quote Originally Posted by SurfMan View Post
    I just hope the license permits it.
    The site says the license is the GNU Public License. Modifying should not be a problem (besides, I presume it's for personal use).
    I successfully compiled it and ran it as an applet. Unfortunately, I have no data to play with. The program is rather ancient in
    terms of Java and could stand some improvements. The author didn't use locales for language compatibility so that could be one
    modification. Also, it is based on awt and not Swing. It is also pre Java 5.

    You may want to find the email of the author and see about making modifications in the form of say, an executable jar file rather
    than an applet. The email mentioned in the site is no longer valid.

    Regards,
    Jim
    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

  13. #13
    SurfMan's Avatar
    SurfMan is offline Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    1,983
    Rep Power
    8

    Default Re: How can I get an old applet to work?

    A rewrite sounds quicker :)
    "It's not fixed until you stop calling the problem weird and you understand what was wrong." - gimbal2™ © 2013

  14. #14
    Northpower is offline Member
    Join Date
    Oct 2016
    Posts
    15
    Rep Power
    0

    Default Re: How can I get an old applet to work?

    As a matter of fact, I do have Mats Bovin's new mail address and I did send him a mail about possibilities to make TeamStas work with newer Java versions. Unfortunately he doesn't have time for doing that so I've sent him a request today about if someone can help me to make the applet useable again.
    I've given him my word of honor that I have no intention of using it for commercial purposes or even publish it on the Internet for free. I'm waiting for his reply and hope that he will give me his permission.

  15. #15
    SurfMan's Avatar
    SurfMan is offline Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    1,983
    Rep Power
    8

    Default Re: How can I get an old applet to work?

    As Jim said, the license is GPL, so you can do with it what you like, as long as you publish the modified source code (If I understand GPL enough). So feel free to adapt it to your needs. Make a GitHub project so people can participate. Invite him to take a look. It's that easy.
    "It's not fixed until you stop calling the problem weird and you understand what was wrong." - gimbal2™ © 2013

  16. #16
    Northpower is offline Member
    Join Date
    Oct 2016
    Posts
    15
    Rep Power
    0

    Default Re: How can I get an old applet to work?

    Quote Originally Posted by SurfMan View Post
    As Jim said, the license is GPL, so you can do with it what you like, as long as you publish the modified source code (If I understand GPL enough). So feel free to adapt it to your needs. Make a GitHub project so people can participate. Invite him to take a look. It's that easy.
    I'll see what he will reply first.

    As for Git Hub projects, isn't it a risk with too many people involved that it gets messed up?

  17. #17
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    6,226
    Rep Power
    13

    Default Re: How can I get an old applet to work?

    Like any distributed project, that would depend on the quality of the people and the leadership involved.
    I am not that familiar with the mechanisms of GitHub. I assumed it was similar to a collaborative development
    site.

    Regards,
    Jim
    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

  18. #18
    Northpower is offline Member
    Join Date
    Oct 2016
    Posts
    15
    Rep Power
    0

    Default Re: How can I get an old applet to work?

    I dit get the permisson to re-develope the program.

    Now, how do I proceed from here. The main problem is that I have no knowledge or experience at all with such an advance project so I must have some help with it.

  19. #19
    SurfMan's Avatar
    SurfMan is offline Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    1,983
    Rep Power
    8

    Default Re: How can I get an old applet to work?

    That depends. If you're into learning Java, you have a nice project to sink your teeth into. If you don't want to learn Java, but just want to use the program, you would need to find Java developers to do some work for you. I already offered my help. PM me if you have ideas on what you want to do.
    "It's not fixed until you stop calling the problem weird and you understand what was wrong." - gimbal2™ © 2013

  20. #20
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    19,963
    Rep Power
    31

    Default Re: How can I get an old applet to work?

    Here's a Q&D solution that won't require much coding: A program that wraps the applet so it will run as an application with the java command.
    Java Code:
    /*  A quick and dirty way to execute Team Stats applet as an application
    
    Requires hardcoded values in getParameter() method for different stats to show
    
    <APPLET CODE="embe.ts.TeamStats.class" WIDTH=560 HEIGHT=480>
    
    
    */
    
    import java.awt.*;
    import java.net.*;
    import java.awt.event.*;
    import java.applet.*;
    import java.io.*;
    import java.net.*;
    import java.util.*;
    
    @SuppressWarnings("serial")
    
    public class TeamStatsWrapper {
    
       final static boolean Debug = false;  // control debug output
    
        //--------------------------------------------------------------        
        public static void main(String[] args) {
            Applet applet = new embe.ts.TeamStats();  //  Define an instance of an Applet
            new AppletWrapper(applet, 560, 480);    // Define screen size here
        }  // end main()
    
    
    //  ***********************************************************************
    // Define a wrapper class for the applet
    // This class will do what the browser normally does
    
    static class AppletWrapper extends Frame implements AppletStub, AppletContext {
    
        Applet applet;
        URL currDir , currBase;
    
    
        // Constructor
        AppletWrapper(Applet a, int x, int y) {  
              applet = a;  
              setTitle(a.getClass().getName());
              setSize(x, y);
              Dimension ss = Toolkit.getDefaultToolkit().getScreenSize();
              setLocation((ss.width-x)/2, (ss.height-y)/2);
              add(a, "Center");
              a.setStub(this);
              try {
                currDir = new URL("file:////" + System.getProperty("user.dir"));
                currBase = new URL("file:////" + System.getProperty("user.dir") + "/wrapper.html");  //????
                if(Debug) {
                   System.out.println("currDir="+currDir); //   currDir=file://D:/JavaDevelopment/Testing/TeamStats_12us
                   URL url = new URL(getDocumentBase(), "data/seriea97.txt");
                   System.out.println("url="+url); //  url=file://D:/JavaDevelopment/Testing/TeamStats_12us/data/seriea97.txt
                   InputStream  inStm = new DataInputStream(url.openStream());  // java.net.UnknownHostException: D   <<< needs 4 ////s
                }
               }catch(Exception mue) {
                   System.err.println(">>> malformed URL: " + System.getProperty("user.dir"));
                   mue.printStackTrace();
               }
    
        
              // Trap window closing
              addWindowListener(new WindowAdapter() {
                public void windowClosing(WindowEvent we) {
                    applet.stop();
                    applet.destroy();
                    System.exit(0);         // EXIT Program 
                }
              });  // end WindowListener
    
              a.init();
              setVisible(true);
              a.start();
       } // end constructor
      
        // AppletStub methods
        public boolean   isActive() { return true; }
        public URL       getDocumentBase() { return currBase; }
        public URL       getCodeBase() { return currDir; }
    
    
    /*   Sample <PARAM from HTML file that need to be coded in getParameter() method below
       <PARAM NAME=Matchfile VALUE="data/seriea97.txt">
       <PARAM NAME=LeagueName VALUE="Serie A">
       <PARAM NAME=Season VALUE="1996/97">
       <PARAM NAME=Line1 VALUE=14>
    */
    
        public String    getParameter(String name) {
            if(Debug)  System.out.println("getP name="+name);
            //  Handle applet's PARAMs
            if(name.equals("Leaguefile"))  return "data/args/seriea97args.txt";
            else if(name.equalsIgnoreCase("Matchfile"))  return "data/seriea97.txt";
            else if(name.equals("LeageName"))  return "Serie A";
            else if(name.equals("Season"))  return "1996/97";
            else if(name.equals("Line1"))  return "14";
            else{
              if (Debug) System.out.println("   >>>unknown name="+name); //<< debug to show values not found
            }
    
            return null; 
        }
    
        public AppletContext getAppletContext() { return this; }
        public void      appletResize(int width, int height) {}
    
       
        // AppletContext methods - not used
        public AudioClip getAudioClip(URL url) { return null; }
        public Image     getImage(URL url) { return null; }
        public Applet    getApplet(String name) { return null; }
        public Enumeration<Applet> getApplets() { return null; }
        public void      showDocument(URL url) {}
        public void      showDocument(URL url, String target) {}
        public void      showStatus(String status) {}
        public Iterator<String>  getStreamKeys() {  return null;}
        public InputStream	getStream(String key) {return null;}
        public void	setStream(String key, InputStream stream) {}
    } // end class AppletWrapper
    }   // end class
    This is from a project I wrote around 2000 where I had a huge applet I wanted to use as an application also.
    Last edited by Norm; 11-03-2016 at 09:34 PM.
    If you don't understand my response, don't ignore it, ask a question.

Page 1 of 3 123 LastLast

Similar Threads

  1. Applet Won't Work. Help
    By rennard in forum Java Applets
    Replies: 1
    Last Post: 01-14-2014, 02:54 PM
  2. Applet not work in browser
    By step in forum Java Applets
    Replies: 10
    Last Post: 03-22-2012, 12:29 PM
  3. applet call dll work in Win2000 but not work in WinXP
    By manhcuongtin4 in forum Java Applets
    Replies: 1
    Last Post: 07-14-2011, 01:45 PM
  4. Can't seem to get my applet to work
    By toymachiner62 in forum Java Applets
    Replies: 18
    Last Post: 10-17-2009, 08:58 PM
  5. Will this applet ever work?
    By willemjav in forum Java Applets
    Replies: 4
    Last Post: 04-20-2008, 05:40 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •