Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 22 of 22

Thread: I'm looking for a website where I could upload an applet for free.

  1. #1
    Junior Member
    Join Date
    Feb 2012
    Posts
    20
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default I'm looking for a website where I could upload an applet for free.

    Does a website like this exist? What I mean is sort the thing that sites like photobucket would do for pictures, but for java applets. I've been looking around a bit but I can't seem to find any place that does this. Any help?


  2. #2
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: I'm looking for a website where I could upload an applet for free.

    It's funny you ask. I'm in the process of creating exactly that type of site. I'm still working out the kinks, but the basics are there.

    It sounds like what you're looking for, so let me know what you think: Static Void Games
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,139
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: I'm looking for a website where I could upload an applet for free.

    I've used lots of websites for my applets over the years. One by one each has removed their support for jar files and .class files. I can only guess the sites had some security concerns.

    Currently this one is still working: Miscellaneous images
    on this site: Free Web Hosting with PHP, MySQL and cPanel
    Last edited by Norm; June 1st, 2012 at 03:46 PM.
    If you don't understand my answer, don't ignore it, ask a question.

  4. #4
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: I'm looking for a website where I could upload an applet for free.

    Quote Originally Posted by Norm View Post
    I've used lots of websites for my applets over the years. One by one each has removed their support for jar files and .class files. I can only guess the sites had some security concerns.
    I wonder what their concerns were. Everything runs client-side, so there shouldn't be any risk for the website itself, I would think. I guess it would be possible for people to spread malware via a site like that, but that's true of most user-content sites. Plus hopefully things like that would be reported pretty fast.

    Another site would be gamejolt.com, but now I feel like I'm advertising for the competition, heh heh.
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  5. #5
    Junior Member
    Join Date
    Feb 2012
    Posts
    20
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: I'm looking for a website where I could upload an applet for free.

    Yes, that is EXACTLY the kind of site that I'm looking for! But I have a problem... I uploaded my incomplete game (Greg Apple) to the site and it appears that the image/audio files do not work. The text in the bottom right (which is the only non-image graphic that is used) appears fine and works like intended, but everything else doesn't appear. Do you know why this may be?

  6. #6
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,139
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: I'm looking for a website where I could upload an applet for free.

    Were all the files in a jar file? Did the jar file and html work locally in a browser?

    Were there any error messages in the browser's java console?
    If you don't understand my answer, don't ignore it, ask a question.

  7. #7
    Junior Member
    Join Date
    Feb 2012
    Posts
    20
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: I'm looking for a website where I could upload an applet for free.

    Yes, all of the files were in the jar file and when I use my .html file all of the graphics/images load up just fine and dandy. No, there were no error messages.

  8. #8
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,139
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: I'm looking for a website where I could upload an applet for free.

    When you tested the html/jarfile locally were they in a test folder with only those two files and no other files around?

    If the browser loads the jar file containing all the files your applet uses and it worked locally, then it should work when downloaded from a website.

    Do you know what the browser's java console is and how to view it?
    If you don't understand my answer, don't ignore it, ask a question.

  9. #9
    Junior Member
    Join Date
    Feb 2012
    Posts
    20
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: I'm looking for a website where I could upload an applet for free.

    Well actually the .htm is inside of the jar file, but this jar was the only file used.

    And I'll be completely honest, I have absolutely no idea what that last question you asked even means. I'm pretty new to programming (as I'm sure you can tell) so what do you mean there?

  10. #10
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,139
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: I'm looking for a website where I could upload an applet for free.

    The html file can't be in the jar file. Can you post the html file you are using to load the applet from the website? It should have been uploaded to the website with the jarfile.
    If you don't understand my answer, don't ignore it, ask a question.

  11. #11
    Junior Member
    Join Date
    Feb 2012
    Posts
    20
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: I'm looking for a website where I could upload an applet for free.

    Well the website I'm using (Static Void Games) doesn't actually take an htm/html from the uploader, it seems to creates its own using information you provide (width, height, main Class).
    I only used the html for testing on my PC locally. Personally I don't think the problem lies in the html since that the applet does run in every way except that images/audio don't show up. I can tell because the variables shown in the bottom left still change as they would regularly.

  12. #12
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,139
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: I'm looking for a website where I could upload an applet for free.

    I guess you'll have to read the FAQ for the site you are using. I'm used to using an html page and a jar file.
    If you don't understand my answer, don't ignore it, ask a question.

  13. #13
    Junior Member
    Join Date
    Feb 2012
    Posts
    20
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: I'm looking for a website where I could upload an applet for free.

    Alright, well thanks for the help anyways. I'll keep looking around.

  14. #14
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: I'm looking for a website where I could upload an applet for free.

    Static Void Games does create html for you, and the site for the applet is here: Greg Apple by Jumbosize - Static Void Games

    The pertinent piece of html/javascript that runs the applet is this:
    <script src="http://www.java.com/js/deployJava.js"></script>
    							<script> 
    						var attributes = { code: 'GregApple',  width:512, height:612} ; 
    						var parameters = {jnlp_href:'http://s3.staticvoidgames.com/games/GregApple/applet.jnlp'};
    						deployJava.runApplet(attributes, parameters, '1.7');
    							</script>

    The applet runs, it just seems like none of the resources are visible. You don't get any errors in the Java Console though. And I'm not sure how you're trying to access the resources. If you include your source I'll be happy to take a look at it for you. You might also want to show us the html/javascript you used to test your applet.

    I'd also recommend giving this a read, just to make sure: Static Void Games - Packaging Files into Jars
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  15. #15
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,139
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: I'm looking for a website where I could upload an applet for free.

    Did the OP ever test the jarfile in an isolated folder with only an html file and no other files there? That would show that the jar file contained all the files needed.
    If you don't understand my answer, don't ignore it, ask a question.

  16. #16
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: I'm looking for a website where I could upload an applet for free.

    There are some other problems. The jar is supposed to be runnable (which requires that a class with a main method must be present, as well as a manifest file pointing to that class), but when I download and run the jar, I get this error:

    C:\Documents and Settings\kworkman\Desktop>java -jar GregApple.jar
    no main manifest attribute, in GregApple.jar

    Which tells me that the main was not specified. I get a similar error when I try to run it as a webstart.

    OP, I recommend reading this: Static Void Games - Deploying as Both an Applet and an Application

    I should also warn you that I'm still working on a few things, so if the website becomes unavailable, just wait a few hours (as long as it takes me to be around a computer to check my email) and it'll be up again.
    Last edited by KevinWorkman; June 2nd, 2012 at 09:54 AM.
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  17. #17
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,139
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: I'm looking for a website where I could upload an applet for free.

    When I run the code from this html file:
    <html>
    <APPLET code=GregApple width=900 height=700 archive=GregApple.jar>
    </applet>
    </html>

    I get this:
    GregApplet.jpg
    If you don't understand my answer, don't ignore it, ask a question.

  18. #18
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: I'm looking for a website where I could upload an applet for free.

    Yep, that's exactly what I get on Static Void Games. So I'm guessing that everything for the applet is set up okay and the site is working as expected, but either the code is accessing the resources wrong, or the jar doesn't contain the resources in the first place. I can't be sure without seeing the source, and the issues with the main not being specified should also be resolved.
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  19. #19
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,139
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: I'm looking for a website where I could upload an applet for free.

    There are issues with the source when I decompiled it and tried to compile it.
    We need to see the original source.

    The OP needs to test the code in an isolated environment to see if it works as he expects. Get it well away from the IDE.
    If you don't understand my answer, don't ignore it, ask a question.

  20. #20
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: I'm looking for a website where I could upload an applet for free.

    Quote Originally Posted by Norm View Post
    There are issues with the source when I decompiled it and tried to compile it.
    We need to see the original source.

    The OP needs to test the code in an isolated environment to see if it works as he expects. Get it well away from the IDE.
    Agreed and agreed.

    OP, I'm more than happy to help you get this working, and I'm curious about what confused you. I'm trying to come up with tutorials for exactly this type of problem, so let me know how we can help. You should follow Norm's advice and get this working by itself, not from an IDE. And the best way to let us know what's going on is by letting us see the source.
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  21. #21
    Junior Member
    Join Date
    Feb 2012
    Posts
    20
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: I'm looking for a website where I could upload an applet for free.

    Oh my goodness, I am terribly sorry for not responding after you fellows have tried so hard to help me. You see I was without internet for a few days after posting my last message, and after that I was too busy (or perhaps just not motivated) to work on this. I had no idea you two were still working to fix the problem...

    Anyway, I went ahead and uploaded the source code to staticvoidgames for you to look at. I also included the compiled code with images/audio along with it. Do me a favor and try the included html file on your own computer. On my computer, if I double click it the project loads up perfectly fine regardless of where on my computer it is.

    Again, I'm really sorry for just disappearing for a while there.

  22. #22
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: I'm looking for a website where I could upload an applet for free.

    Looking at the classes folder, you have two folders: audio and images. Those contain the resources you need to access. The problem is, you can't just upload resource directories along with your applet code, it's just not portable. The solution is to put those resources into the jar.

    Step one- make sure those folders are indeed in your jar. The tutorial I linked above gives you a quick-and-dirty way to do that.
    Step two- access the resources in those folders as resources, not via the applet commands. The other tutorial I linked to above should help you with that.
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

Similar Threads

  1. Avater Upload(JPEG,PNG etc)
    By goldendraco in forum JavaServer Pages: JSP & JSTL
    Replies: 0
    Last Post: November 30th, 2011, 03:34 PM
  2. Replies: 5
    Last Post: October 21st, 2011, 08:48 AM
  3. File upload problem
    By antonic in forum Web Frameworks
    Replies: 2
    Last Post: September 28th, 2011, 07:25 PM
  4. Free Programming
    By freeprogramming in forum The Cafe
    Replies: 1
    Last Post: March 14th, 2010, 03:21 PM