How to save Java applet game to PC?


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 13 of 13

Thread: How to save Java applet game to PC?

Hybrid View

  1. #1
    Join Date
    Oct 2008
    Posts
    7

    How to save Java applet game to PC?

    Hi, I'm trying to figure out how to save this java applet game into my PC so I could play it even I'm not online and play it anywhere and anytime. This is the site which has the game: http://hi-games.net/cube-10x10x10/. I've tried website grabbers but no luck. I wish someone could help me. T.Y.
    Share on Google+

  2. #2
    Join Date
    Jul 2005
    Location
    SW MO, USA
    Posts
    299
    Three steps.
    1) save the HTML
    2) look in the HTML for the address of the jar file/class file.
    3) enter that address in your browser and download the jar/class file.
    Share on Google+

  3. #3
    Join Date
    Oct 2008
    Posts
    7
    Quote Originally Posted by Norm
    Three steps.
    1) save the HTML
    2) look in the HTML for the address of the jar file/class file.
    3) enter that address in your browser and download the jar/class file.
    Hey thanks. This is exactly what I'm trying to do but I can't find the class file only the jar file. Here is the code of the html:

    <html>
    <head>
    <title>Records</title>

    <style>
    body { background: black; color:white; margin: 0px; padding: 0px; }
    </style>

    </head>

    <body>

    <applet name="GameApplet" id="GameApplet" code="HiCube.class" archive="HiCube7.jar" width="400" height="400">
    <param name="layers" value="10">
    </applet>

    </body>

    </html>

    And this is where the jar file is:

    http://hi-games.net/cube-10x10x10/HiCube7.jar

    I've tried different links like http://hi-games.net/cube-10x10x10/HiCube.class but I can't really find the HiCube.class. Maybe it's in the jar file itself or maybe someone knows how to open a jar file and look for the class file link?
    Share on Google+

  4. #4
    Join Date
    Jul 2005
    Location
    SW MO, USA
    Posts
    299
    The class file probably is in the jar file. You can look in a jar file with the WinZip program.
    Have you tried to execute the applet? If you get errors look in the java console for the message. Copy and paste it here for help.
    Share on Google+

  5. #5
    Join Date
    Oct 2008
    Posts
    7
    There it is! I found the class file in WinRar as you said. But have some problem when executing the applet. Here is what I did, I copied the jar/class and html file with the code (see above) in a folder. When I opened it in firefox the game didn't showed up, I only see a box with a little x on it. Here is what the java console says:

    Java Plug-in 1.6.0_03
    Using JRE version 1.6.0_03 Java HotSpot(TM) Client VM
    User home directory = C:\Documents and Settings\xxxxxxxxxxxxxxx


    ----------------------------------------------------
    c: clear console window
    f: finalize objects on finalization queue
    g: garbage collect
    h: display this help message
    l: dump classloader list
    m: print memory usage
    o: trigger logging
    p: reload proxy configuration
    q: hide console
    r: reload policy configuration
    s: dump system and deployment properties
    t: dump thread list
    v: dump thread stack
    x: clear classloader cache
    0-5: set trace level to <n>
    ----------------------------------------------------

    java.io.FileNotFoundException: C:\Documents and Settings\xxxxxxxxxxxxxxx\Desktop\Cube\init.cgi (The system cannot find the file specified)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(Unknown Source)
    at java.io.FileInputStream.<init>(Unknown Source)
    at sun.net.http://www.protocol.file.FileURLConn...onnect(Unknown Source)
    at sun.net.http://www.protocol.file.FileURLConn...Stream(Unknown Source)
    at java.net.URL.openStream(Unknown Source)
    at HiGame.init(Unknown Source)
    at HiKeyGame.init(Unknown Source)
    at HiCube.init(Unknown Source)
    at sun.applet.AppletPanel.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    java.lang.RuntimeException: java.io.FileNotFoundException: C:\Documents and Settings\xxxxxxxxxxxxxxx\Desktop\Cube\init.cgi (The system cannot find the file specified)
    at HiGame.init(Unknown Source)
    at HiKeyGame.init(Unknown Source)
    at HiCube.init(Unknown Source)
    at sun.applet.AppletPanel.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    java.io.FileNotFoundException: C:\Documents and Settings\xxxxxxxxxxxxxxx\Desktop\Cube\init.cgi (The system cannot find the file specified)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(Unknown Source)
    at java.io.FileInputStream.<init>(Unknown Source)
    at sun.net.http://www.protocol.file.FileURLConn...onnect(Unknown Source)
    at sun.net.http://www.protocol.file.FileURLConn...Stream(Unknown Source)
    at java.net.URL.openStream(Unknown Source)
    at HiGame.init(Unknown Source)
    at HiKeyGame.init(Unknown Source)
    at HiCube.init(Unknown Source)
    at sun.applet.AppletPanel.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    java.lang.RuntimeException: java.io.FileNotFoundException: C:\Documents and Settings\xxxxxxxxxxxxxxx\Desktop\Cube\init.cgi (The system cannot find the file specified)
    at HiGame.init(Unknown Source)
    at HiKeyGame.init(Unknown Source)
    at HiCube.init(Unknown Source)
    at sun.applet.AppletPanel.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    java.io.FileNotFoundException: C:\Documents and Settings\xxxxxxxxxxxxxxx\Desktop\Cube\init.cgi (The system cannot find the file specified)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(Unknown Source)
    at java.io.FileInputStream.<init>(Unknown Source)
    at sun.net.http://www.protocol.file.FileURLConn...onnect(Unknown Source)
    at sun.net.http://www.protocol.file.FileURLConn...Stream(Unknown Source)
    at java.net.URL.openStream(Unknown Source)
    at HiGame.init(Unknown Source)
    at HiKeyGame.init(Unknown Source)
    at HiCube.init(Unknown Source)
    at sun.applet.AppletPanel.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    java.lang.RuntimeException: java.io.FileNotFoundException: C:\Documents and Settings\xxxxxxxxxxxxxxx\Desktop\Cube\init.cgi (The system cannot find the file specified)
    at HiGame.init(Unknown Source)
    at HiKeyGame.init(Unknown Source)
    at HiCube.init(Unknown Source)
    at sun.applet.AppletPanel.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)


    Last edited by Hack; 03-16-2009 at 09:19 AM. Reason: Removed UserName
    Share on Google+

  6. #6
    Join Date
    Jul 2005
    Location
    SW MO, USA
    Posts
    299
    java.io.FileNotFoundException: C:\Documents and Settings\xxxxxxxxxxxxxxx\Desktop\Cube\init.cgi (The system cannot find the file specified)
    Looks like the program needs a file: init.cgi
    Go back to the site and URL you used to get the .jar file and get this file and save it in the same folder with the .jar file.
    Last edited by Hack; 03-16-2009 at 09:19 AM. Reason: Removed UserName
    Share on Google+

  7. #7
    Join Date
    Oct 2008
    Posts
    7
    Norm, what can I say, you've been very helpful to me. I tried to figure this out for ages and ages until I end up here in devx.com with a very helpful people. And now it works like a charm. Thank you very much Norm! and devx.com!
    Share on Google+

  8. #8
    Join Date
    Oct 2008
    Posts
    7
    Hello, can I ask for help once again? Uhm, how to save the game applet was already solved but I just need one last help from you guys. How can you save this replay to PC?

    http://hi-games.net/cube-10x10x10/em...=1118&replay=1

    The html code is:

    <html>
    <head>
    <title>Records</title>

    <style>
    body { background: black; color:white; margin: 0px; padding: 0px; }
    </style>

    </head>

    <body>

    <applet name="GameApplet" id="GameApplet" code="HiCube.class" archive="HiCube7.jar" width="400" height="400">
    <param name="layers" value="10"><param name="replay" value="1118">

    </applet>

    </body>
    </html>


    Where can I find the file of the value "1118"?

    I wish someone would help me. T.Y.
    Share on Google+

  9. #9
    Join Date
    Jul 2005
    Location
    SW MO, USA
    Posts
    299
    You need to ask the programmer that wrote the program.
    The values/usages of <PARAM tags are only known by the person that wrote the program.
    Share on Google+

  10. #10
    Join Date
    Oct 2008
    Posts
    7
    Quote Originally Posted by Norm
    You need to ask the programmer that wrote the program.
    The values/usages of <PARAM tags are only known by the person that wrote the program.

    Hi thanks again for the reply.

    I'm now 95% sure that the value "1118" is in here http://hi-games.net/cube-10x10x10/rec.cgi?u=1118 it's a rec.cgi where the sequences are, it's the movements/turns you see in the replay. But the only problem is that I don't know how to coordinate the rec.cgi file to the value "1118". And if I rename the rec.cgi to 1118.cgi it still doesn't work. Any Idea?
    Share on Google+

  11. #11
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,666
    Is there a "Contact Us" on the web site from which you got the game?
    I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    Modifications Required For VB6 Apps To Work On Vista
    Share on Google+

  12. #12
    Join Date
    Oct 2008
    Posts
    7
    Quote Originally Posted by Hack
    Is there a "Contact Us" on the web site from which you got the game?
    I tried to ask the owner but he wouldn't allow it. He said it's a violation of copyrights law. My only motive is for personal use and not to use it for profit. Obviously I'm no programmer, most of you here are programmers and webmasters maybe you know how to deal with this kind of problem?
    Share on Google+

  13. #13
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,666
    While I'm sure your motives are pure and innocent, others reading this maybe blackguards.

    We do not support nor condone the violation of copyrights laws for ANY reason.

    This thread is closed.
    I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    Modifications Required For VB6 Apps To Work On Vista
    Share on Google+

Similar Threads

  1. Java applet for web site - question
    By WarrenW in forum Java
    Replies: 1
    Last Post: 06-23-2006, 04:15 AM
  2. Urgent! Java applet.
    By d_vinci in forum Java
    Replies: 0
    Last Post: 03-27-2006, 02:04 PM
  3. Replies: 1
    Last Post: 03-15-2002, 12:02 PM
  4. Quotes on writing a java applet
    By Mike Buchanan in forum Java
    Replies: 0
    Last Post: 04-12-2000, 10:53 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
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center