Java Security BS, Can I Get Around It?

Hey,

I finally managed to get my game working as an applet off of my site but nobody can play it without lowering their Java security settings. Can I get around this utterly stupid restriction somehow so that people can actually play the game?

http://valkryst.us.to/games/space_game/space_game.php - This is the page that my game is on.

Here is the code in my html file running the applet:

The applet is packed into a fat jar using eclipse.

I’ve looked around, but everyone just says to lower your security settings. I don’t want anyone to have to do that to play the game.

Sorry to say this, but I don’t think it is possible.

Yes, don’t use Applet.

How else would I get the game onto the site then?

flash, html5-canvas, or create a fancy installer

Can I draw directly to the html5 canvas using Java?

nope, you need libgdx and use its html5 export (i never used it, but people say it works)

=___= So much work just to do something that should already be simple to do. FFS… Now to go spend hours figuring out libgdx and all that crap…

Yeh, for Java and HTML5/WebGL, you’ll have to use something like GWT (its the solution LibGDX uses atm).

As for actual java applets, you can still get them working without lowering your java security settings (even though it seems Oracle don’t want you to anymore due to how many roadblocks they’ve put up). You’ll have to follow the correct steps and jump all the hoops (like including the correct values in the Manifest.MF file of each jar), see the Applet documentation. An example here.

Know a guide for that? I’d rather jump through a bunch of hoops than have to learn libgdx and edit all of my code (probably).

have a read of http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/manifest.html

I’ve gone through it and edited the manifest, but it still gives the security block.

[quote]Manifest-Version: 1.0
Trusted-Library: true
Trusted-Only: false
Application-Name: Valkryst - Space Game
Permissions: sandbox
Created-By: Fat Jar Eclipse Plug-In
[/quote]
I did have the “Trusted-Only:” set to true before, but it gave an error.

Hi,
I can’t see your URL (404 error) to test your problematic applet, but have you signed all of your jar files correctly?
I use this script to make my applets work:

Cheers,
Keith

You could do what I do, and not use Java.

If you want something in the browser that simply works on most machines, use html5, canvas and javascript.

Javascript is easy to learn (but has nothing to do with java, actually) and easy to use (for !!small!! things).

So if you want to create some kind of little simulation or similar you can use javascript :slight_smile:
Also, it might be interesting to learn. You will find things you’ve never seen before, like the fact that javascript is prototype based and not OOP (but you can ‘implement’ OOP in javascript, which is quite cool and interesting) or that everything is some kind of object you can pass around, even functions. So you can pass a function as an argument to a method call, for example.

It’s worth learning! :slight_smile:

You can always use Java to make JavaScript projects using http://www.gwtproject.org/ - IMO this is much better than writing anything in plain JS as you can use all Java features useful for projects larger than simple calculator like packages, source code in multiple files etc. :slight_smile:

You can have source code in multiple files using Javascript :wink:

But I partly agree. You should use Java when you have bigger projects.

I named this wrong, I was thinking about “one class = one file”, like in Java - this makes development much, much easier. :slight_smile: JS is also lacking a good IDE.

Sublime text is actually quite good. It even has things like content assist.

Mike

[quote=“Mac70,post:18,topic:45819”]
This is, sadly, true, I’d say. I love Sublime Text, but it’s just impossible to build an IDE which is as good as Eclipse / IntelliJ for java for javascript, because type information is only available at runtime (is it an int? is it a boolean? maybe both? Has this object got the field ‘test’ or not? When does it have it? when not?..).