So I have a website and I'm putting an Applet on it, and every so often, I update and re-upload that Applet. However, I cannot seem to view the changes I made to the Applet only. I am able to update and re-upload the index.html file, and I can view the change immediately, but It takes a day for me to be able to see the update I made to the Applet.
The odd thing is that my friends are able to see the change I made to the Applet immediately, so I know that the upload did work.
Yes, I have tried clearing my cache and restarting my browser, but that does not seem to work.
Open the Java Console & flush the class cache, then refresh the page.
For more reliable and controllable updates, deploy the applet using Java Web Start. For a better experience generally, deploy the app. as a JFrame using JWS.
Related
I'am trying to run this project on my local host.
I followed these instructions on how to launch a dynamic web project on Tomcat Server.
Everything works and when I run the application, I see this which is correct
Now I'am trying to play around with the code a bit. I located the html code that corresponds to the new wine page - /WebContent/tpl/wine-details.html
I changed the country label to show states instead.
However when I re run the web application on the Tomcat Server, the label still says country.
Does anyone know what the issue is? I made sure to save the file. What I also found interesting was there were two copies of this file, in backbone-jax-cellar and backbone-jax-cellar-master. I made sure that both copies contained the states label.
If anyone's having this issue still, I recommend just visiting the URL in a web browser. I used Chrome and everything is showing up fine.
I think the problem here is that Eclipse is somehow caching the html page and doesn't update it when it runs the web app
I have an applet that receives an XML that serialized a JasperPrint object and print it using printservices. The applet is signed and the certificate is imported in house.
This applet is in a Web application that call it using javascript and it runs in terminals with Windows XP.
The problem is that when you use the applet always displays the prompt to run the application and users have to confirm to print.
Is there any way around this without ever having to confirm?
UPDATE:
i google the problem and i see that applet is dying (like #user3712670 says),
there are another alternative to run java code on client pc from a web page?
i need to use it locally
Short answer: no.
Any settings for those confirmation dialogs are client-side, so there's nothing you can do in your code or on your server to prevent them.
You might be able to get rid of some of them by making your clients change their security settings, but this is probably not advised. And you probably can't get rid of all of them.
You can check the plugin settings for the particular browser you're running, and you can check the Java security settings from the Control Panel.
The real answer is that applets are a dying technology, and trying to make them work is a bit like plugging up the holes in a sinking ship.
I want to display a HTML file in my java GUI.
Big problem: this java program has to run on Raspbian (Raspberry Pi).
I used the browser from eclipse swt which worked perfectly on my PC, but there is no swt build for the ARM processor on my RPI...
A JEditorPane is too weak, because I need to display some pages with CSS
Is there any other possibility?
The easiest solution is of course to see of JavaFX is supported on Raspbian. If it is, then you can use the WebView component (http://docs.oracle.com/javafx/2/webview/jfxpub-webview.htm) and most of your problems will be solved. As pointed out in the comments below by jewelsea, this is not a feasible solution yet. This might change with future builds of JavaFX for Raspbian though, so keep an eye on it.
If, for some reason, JavaFX won't work (due to display drivers etc.) then you might want to reconsider your application approach. If you just need to display the HTML file, then you can write it out to disk and display it in the default system browser. If you need to interact with it, it becomes a bit more complicated - you'd basically write a small web server and then respond to user interaction that way. The user will be using their browser of choice, and you'll send responses back to it.
I need to quit firefox and restart it in order for the applet to be refreshed...
its anoying since i'm still programming it an the class files changes... am i missing some codes which makes it unable to refresh the applet and still take the one from the cache???
So I have a .jar applet in my website, a simulation game that spawns army whenever user clicks on the screen... however whenever I refresh the page, the previous army are still there on the screen..
I want it to be refreshed (as if we're just starting to run the application the first time).
Any Suggestions?
I'd really appreciate it
Thank you....
Each time you build a new Jar applet add a build number to it, eg applet.jar?build=123 or build123/applet.jar. This is good practice for deployment too as it removes all cache concerns and this can probably be simply automated by your build solution eg Ant.
In addition it is worth considering using the separate_jvm tag, detailed here. Available since 1.6 update 10. It will ensure a new JVM each refresh which prevents you worrying about plug-in idiosyncrasies eg out of memory exceptions due to a lot of refreshes.
I am working on a demo for a client of what's possible with GWT-Ext for GWT. After browsing for the simplest way to get up and running, I decided on installing the Google Plugin for Eclipse and using the New Web Application Wizard.
First time around, I followed these steps for create the default application:
Selected File > New > Web Application Project from the Eclipse menu.
In the New Web Application Project wizard, entered a name for the project (ExtDemo) and a java package name, com.extdemo.
Unchecked the "Use Google App Engine" check box.
Clicked Finish.
Right clicked it in package explorer and selected Run As > Run Configurations
Put a check in the Automatically Select Unused Port checkbox.
Clicked Run to see the default GWT 1.7 application
This worked fine... it launched GWT's hosted browser and the app worked as supposed to.
(I then continued to import GWT-Ext and add all sorts of widgets building up a nice little demo app)
However at some point when relaunching the app in hosted mode, the hosted browser displays an empty iframe. I even reverted the code to a point where everything was working as supposed to and... same thing, an empty iframe with the surrounding static content.
Now what is really strange is when I go through the process of creating the default application again by following the steps above, the hosted browser launches with an empty iframe again.
However when I click on Compile/Browse, this sometimes allows the app to launch in Firefox.
Anyone have this happen to them?
I have seen some odd behaviors occasionally. Here are some basic suggestions (some are dumb and you might have tried them already):
Use a new workspace
I do not know if GWT plugin somehow caches stuff in the embedded Jetty. If you are re-creating the default app/project, try and use a different name for the project.
Try and re-use a fixed port so that there is no possibility of having multiple servers running.
Update: Found a new "classic" solution:
Delete the cache in IE and possibly Firefox too. Apparently the 'script' tag content tends to be cached by IE. If this works, we can all try tearing our hair out!
Found the updated answer at this link:
I have had the same problem in the past and found it is much more likely to happen if limited CPU is available. For example if my older laptop was running on battery and had stepped down the CPU speed to save power it frequently happened. When running on mains in max performance mode it only happened occasionally. Now I have a much newer and more powerful laptop and the problem has gone away.
Another cause I found was too many breakpoints set up in eclipse and removing breakpoints would often clear the problem.
I've had issues with the browser caching.
Try clearing your browser cache, refresh a few times after a failed load, etc.
You can also try using a different port so the URL is different.
It takes some time to download and run the GWT app, particularly if you are using extra libraries, so wait for a few seconds to see if the app finally loaded.
What makes the app loading to fail randomly is something I don't know yet, but I suspect, as stated by Daniel Vaughan, that is related with a lack of computer resources, CPU, memory, etc.