Questions tagged [applet]

Applet means 'small application'. This has become commonly used to describe Java applets embedded in web pages. And in that context, applets can be regarded as outdated technology.

applet
Filter by
Sorted by
Tagged with
686 votes
26 answers
1.9m views

Unsupported major.minor version 52.0 [duplicate]

Pictures: Command Prompt showing versions Picture of error Hello.java import java.applet.Applet; import java.awt.*; public class Hello extends Applet { // Java applet to draw "Hello World" ...
user3397452's user avatar
  • 7,021
5 votes
2 answers
6k views

What's Java Hybrid - Applet + Application?

And how can I write one? From comments to my reply, this followed: "What we had in the old days - An Applet and Application - is not available anymore." And a rebuttal: Rubbish. It [An ...
Lews Therin's user avatar
  • 10.9k
18 votes
2 answers
45k views

Why were applets deprecated in JDK 9?

I have recently read in an article posted by Oracle that they are going to mark the Applet class as deprecated in JDK 9. I have little experience with applets; I have only written some to understand ...
Maksim's user avatar
  • 371
72 votes
5 answers
276k views

socket programming multiple client to one server

How do you handle multiple client to connect to one server? I have this LogServer.java import javax.net.ssl.*; import javax.net.*; import java.io.*; import java.net.*; public class LogServer { ...
Harts's user avatar
  • 4,043
27 votes
7 answers
86k views

Incompatible magic value 1008813135

I am writing a Java applet and embedding it in a web page. It used to run Mac and Windows in different browsers without problem. I was using NetBeans on the Mac to build the .jar file the applet used. ...
Warlax's user avatar
  • 2,499
62 votes
10 answers
446k views

Java Error: "Your security settings have blocked a local application from running"

I'm trying to run this simple HelloWorld code written in Java from my browser (Chrome): public class HelloWorld extends JApplet { public void init() { try { SwingUtilities.invokeAndWait(...
user2279697's user avatar
2 votes
1 answer
6k views

Java ball object doesn't bounce off of drawn rectangles like it's supposed to.

Sorry for the awful title. The purpose of the Java applet is as such: A ball is bouncing around the screen. The size and speed of this ball can be changed via scrollbars. The user can press and ...
Alex Kibler's user avatar
  • 4,804
81 votes
4 answers
263k views

Java unsupported major minor version 52.0 [duplicate]

I can not launch my java application as a web applet in HTML (I am using HTML 4.01, I know it doesn't work in html5). The error message it returns is: java : Unsupported major.minor version 52.0 I ...
user avatar
11 votes
1 answer
41k views

How to specify correctly codebase and archive in Java applet?

I use firefox version > 3.5 (3.5.,3.6.,4.*) and I try to specify archive and codebase property correctly but it doesn't work. My main class for applet is situated in the archive and some necessary ...
MaXal's user avatar
  • 851
7 votes
2 answers
41k views

Embedding Java Applet into .html file

I am having trouble embedding my applet into a webpage. I don't think I'm doing it correctly. * I have my html file in the same directory as my .class files My main method is in CardApp class This ...
user avatar
65 votes
16 answers
40k views

Java applet manifest - Allow all Caller-Allowable-Codebase

As of Java 7u45 an applet will display a warning message (even if signed with a trusted cert) if a webpage tries to interact with it via javascript and that page isn't listed in the manifest's Caller-...
William W's user avatar
  • 1,796
40 votes
7 answers
65k views

How to combine two Jar files

Is it possible to combine two jar files such that in an applet tag I can simply do something like archive="jarjar.jar/jar1.jar"... ...archive="jarjar.jar/jar2.jar"... instead of archive="jar1.jar"......
Tony's user avatar
  • 444
16 votes
5 answers
48k views

getClassLoader().getResource() returns null

I have this test app: import java.applet.*; import java.awt.*; import java.net.URL; public class Test extends Applet { public void init() { URL some=Test.class.getClass()....
Ali's user avatar
  • 265k
6 votes
2 answers
2k views

Embed a 3rd-party JApplet in a Swing GUI & pass it parameters

There's a third-party applet that I'd like to embed in my Swing application. Basically, I'd like it to be just another panel. This applet makes use of many parameters, e.g. final String ...
kc2001's user avatar
  • 5,120
5 votes
3 answers
28k views

how to use a swing timer to start/stop animation

Could someone teach me how to use a swing timer with the following purpose: I need to have a polygon that begins being animated(simple animation such as rotating) when I click the mouse; and stops ...
biggdman's user avatar
  • 2,078
1 vote
3 answers
3k views

Thread.Sleep() is freezing

Here is a snippet kit.insertHTML(doc, doc.getLength(), "Hello", 0, 0, null); try{ Thread.sleep(1000); }catch(Exception e){} I am using HTMLEditorKit() and HTMLDocument() as a textbox. The textbox ...
user1357159's user avatar
144 votes
17 answers
643k views

How can I open Java .class files in a human-readable way?

I'm trying to figure out what a Java applet's class file is doing under the hood. Opening it up with Notepad or Textpad just shows a bunch of gobbledy-gook. Is there any way to wrangle it back into a ...
cpuguru's user avatar
  • 3,793
3 votes
2 answers
3k views

How do i align this text correctly?

I wrote this polar clock today and i am almost finished exept i want to align my text inside the line similar to this. Does anyone know how to do this? Ive tried to use FontRenderContext and font ...
Stas Jaro's user avatar
  • 4,805
-2 votes
1 answer
343 views

JApplet creates a ball that bounces and gets progressively less high in Java

public class Circle extends JApplet { public void paint(Graphics g) { int x=100; int y=100; int diameter=50; int xResize=500; int yResize=500; ...
user2926525's user avatar
57 votes
7 answers
80k views

How do you debug Java Applets?

Currently, the only information I have is a one-line error message in the browser's status-bar. Do you know how I could get a stack-trace for example ?
zimbatm's user avatar
  • 9,388
40 votes
6 answers
62k views

How do I sign a Java applet for use in a browser?

I'm trying to deploy a Java applet on my website. I also need to sign it, because I need to access the clipboard. I've followed all the signing tutorials I could find but have not had any success. ...
user107312's user avatar
9 votes
2 answers
16k views

Get the correct local IP address from java applet

I would like to determine the local IP address from my java applet. The problem is when there are several IP adresses on the same machine, which has LAN and internet connections (palm, VMWare...). ...
EFalco's user avatar
  • 678
5 votes
4 answers
1k views

Applet not appearing full

I just created an applet public class HomeApplet extends JApplet { private static final long serialVersionUID = -7650916407386219367L; //Called when this applet is loaded into the browser. ...
livingoff's user avatar
65 votes
22 answers
261k views

java.io.IOException: Invalid Keystore format

Does anyone know how to solve this? I tried many things, but none of them worked. And when I click more details I get this: at sun.security.provider.JavaKeyStore.engineLoad(Unknown Source) atsun....
user avatar
50 votes
7 answers
80k views

.class vs .java

What's the difference between a .class file and a .java file? I am trying to get my applet to work but currently I can only run it in Eclipse, I can't yet embed in HTML. Thanks **Edit: How to compile ...
Devoted's user avatar
  • 181k
29 votes
5 answers
47k views

How to establish a TCP Socket connection from a web browser (client side)?

I've read about WebSockets but they don't seem to be pure "sockets", because there is an application layer protocol over them. "ws:" Is there any way of doing a pure socket connection from a web ...
Hernán Eche's user avatar
  • 6,777
10 votes
1 answer
23k views

Embed a JavaFX application in a HTML webpage

I'd like to embed one ore more JavaFX applications on a webpage. How do you do that? There are several bits and pieces on the Oracle website, but there's no complete example. There's the Deployment ...
Roland's user avatar
  • 18.3k
8 votes
3 answers
16k views

Calling a DLL from an Applet via JNI

I have a "proof of concept" piece of work that crosses over into some unfamiliar territory. I'm tasked with connecting an EFTPOS machine to an application running as an applet in a browser on our ...
mcottle's user avatar
  • 503
4 votes
1 answer
2k views

Applet method calling from Javascript

I have an applet to upload some files from specific folder and delete them,but something is wrong when I call an applet function from my javascript code, when I call that function from init() it works ...
MKT's user avatar
  • 665
4 votes
5 answers
6k views

Fahrenheit to Celsius conversion yields only 0.0 and -0.0

I'm on the 8th chapter (Methods, Constructors, and Fields) of my Java methods book and I'm having a problem with one of my exercises. The provided code is Temperature.java import java.awt.*; ...
Ming Luo's user avatar
3 votes
4 answers
7k views

Apache FOP in a Java Applet - No ImagePreloader found for data

I'm looking at an issue in a mature commercial product. In a nutshell, we are using part of the Apache POI library to read in a Word .DOC or .DOCX file, and convert it into XSL-FO so that we can do ...
Joseph Morris's user avatar
1 vote
1 answer
3k views

Disabled Java warning appearance & affect on Java Web Start apps

Recently security vulnerabilities were discovered in the Java Plug-In1. As a protection for the end user, Java in most browsers was disabled promptly. What do the 'Java disabled' warnings look like? ...
Andrew Thompson's user avatar
20 votes
5 answers
66k views

Convert a Graphics2D to an Image or BufferedImage

I have a little problem here. I have an applet, where user can "draw" inside it. To do that, I use the java.awt.Graphics2D. But, how can I do to save the user draw image as a JPEG image, or at least, ...
caarlos0's user avatar
  • 20.4k
17 votes
8 answers
67k views

Why does my applet get a java.security.AccessControlException: access denied (java.net.SocketPermission ...), and how can I avoid it?

We are clueless about why my client is encountering a Java Security exception in Safari. Could anyone help? The exception occurs reliably in Safari on Windows. This involves a Java applet. The ...
Crashalot's user avatar
  • 34.2k
16 votes
1 answer
39k views

Record voice with Java

I want to record voice using a Java application; I guess this will be basically an applet that will run on client side. But I don't have any idea of how to do it... any ideas? Also, I want to play ...
Varun's user avatar
  • 5,001
13 votes
5 answers
10k views

Java applet stopped working after update to JRE 7u21

My java applet stopped working once JRE was updated to 7u21. Short summary: The Exceptions I get are: netscape.javascript.JSException and java.lang.NoClassDefFoundError. the applet worked fine until ...
user1127788's user avatar
12 votes
10 answers
82k views

access denied (java.net.SocketPermission 127.0.0.1:8080 connect,resolve)

I have a Java Applet inserted on a simple HTML page located at http://localhost:8080/index.html: <applet id="applet" code="SomeCode.class" archive="lib.jar" Width="1" Height="1"></applet> ...
PropellerHead's user avatar
11 votes
5 answers
20k views

Why do applets not need a main()?

This applies to subclasses of Applet, Servlet, Midlet, etc. Why do they not need a main()? If I wanted to create a Craplet class that starts at init() or something similar, is it bad design, or how ...
Lucky's user avatar
  • 4,797
6 votes
4 answers
28k views

Copy/Paste not working in a signed Applet

I've a signed applet (which verifies correctly with jarsigner) that for some reason will not allow copy and paste from the system clipboard into a JTextField despite the documentation telling me that ...
user1098932's user avatar
4 votes
2 answers
4k views

Java Compile Error: class Appletprac is public, should be declared in a file named Appletprac.java [duplicate]

When I am compiling the java program I am getting this error: class Appletprac is public, should be declared in a file named Appletprac.java Here is my java code: import java.applet.*; import java....
Tanmay's user avatar
  • 59
2 votes
3 answers
10k views

How to code the projectile of a ball of different force and angle in Java Swing?

I have written the following function for projectile motion of different force and angle, but it doesn't work properly. Where have I gone wrong? I want something like the Angry Birds game. Code: ...
Anish Shah's user avatar
  • 7,891
2 votes
5 answers
24k views

Getting MAC address on a web page using a Java applet

I want to create an application where a web server can get the MAC Address of the clients logging in. The only possible way I could think of was to create a JAVA applet which contains java.net methods ...
Amit Arya's user avatar
0 votes
1 answer
2k views

paint() in java applet is called twice for no reason

Is there a common reason why the paint() method may be called twice without being intended. I have the following code: public void paint(Graphics g) { //Graphics2D gg; //gg=(Graphics2D) g; ...
biggdman's user avatar
  • 2,078
73 votes
2 answers
75k views

Django add extra field to a ModelForm generated from a Model

I have to generate a FormSet from a model but I need to insert an "extra value" in to every form. Specifically, I have a JApplet that generates some Markers and Paths on a image, and POST it on the ...
Marco Fedele's user avatar
  • 2,110
50 votes
4 answers
39k views

-tsa or -tsacert timestamp for applet jar self-signed

When I was trying to self-sign in the jar like below. jarsigner -keystore my keystore myjar.jar myalias It gives warning like: No -tsa or -tsacert is provided and this jar is not timestamped. ...
Raja Peela's user avatar
  • 1,376
30 votes
2 answers
8k views

OS X 10.8 Gatekeeper and Java applets

With the new release of OS X 10.8, the Gatekeeper will popup the following warning, when you try to start a signed Java applet: The applet has been signed with a valid code signing certificate and ...
Rasmus Faber's user avatar
  • 49.2k
28 votes
7 answers
24k views

How to deploy a java applet for today's browsers (applet, embed, object)?

How do i deploy a java applet for modern browsers? I know there are somehow 3 possibilities but nobody tells me which one to prefer and how to use them. Does somebody have any resources on that? i ...
Michael Siebert's user avatar
13 votes
7 answers
24k views

How can I start an Java applet with more memory?

The default 64 MB max heap memory can be small for a large Java application. Are there any applet parameter to increment this for a signed applet? For a Java program this is a simple command line ...
Horcrux7's user avatar
  • 24.1k
7 votes
3 answers
23k views

java.security.AccessControlException: access denied ("java.security.SecurityPermission" "authProvider.SunMSCAPI")

Till morning everything working fine in my applet. I took Java update and everything stopped. I'm dealing with digital certificate using applet. Here is my stack trace. I followed some oracle article ...
Vicky Thakor's user avatar
  • 3,887
6 votes
4 answers
9k views

Determine whether client browser has java installed and can launch applets

I am developing an .aspx page which will ultimately launch an applet after the user clicks on a button (I am using the <applet> tag). So, I would like to detect if java is enabled/installed on ...
user avatar

1
2 3 4 5
17