I've been learning java for a while. I recently decided it's time to leave the simple console applications and start making applets. Everything is great so far except the fact that I can't find a way to run any applet made in eclipse on either of my browsers.
I downloaded this example to make sure everything is alright and it still renders the very same result when loaded in the browser.
When I open the html file the only thing in the tab is the border of the applet and the line "Error: click for details" top left. After I click the Java Console comes up and all that it says under the block of key instructions is:
Detected from bootclasspath: C:\PROGRA~1\Java\jre7\lib\deploy.jar
I don't even know if this is any sort of error report or just a notification... after the console is cleared it won't come up again...
I tried with: IE 8 and Chromium 17 on winxp 32
Applets on webpages run fine.
Please help me! This makes me very sad. The fact that I don't know anything about JRE and whether it needs any further configuration after installation gives me hope that there might be a simple and trivial solution to my issue.
Not too sure what your issue is right now. That's not an error report, just saying that deploy.jar, from the JRE, is being used.
When you say the example "renders the very same result" what result is that?
Can you properly run the "this example" you posted?
Are you compiling the project properly into a jar?
Are those jars in the same directory?
Related
I am developing an application that use an applet for signing documents.
Everything works fine, but if you try to sign two times in a row the applet fails and shows this error:
"Target jvm seems to have already exited"
The funny thing is that this problem only occurs in Internet Explorer 11 in Firefox is working properly. But the corporative browser is IE11, so there is no option to use another.
I'm using Java 1.7.0_51-b13 compilation.
Thanks in advance, greetings.
Edit
A curious thing is that sometimes this problem does not occur when I use an ajax modal dialog. From what I could see in the Java console is as if the virtual machine is rebooted in the moment I finish of using the modal dialog, and from that reset would work as expected, allowing signing the time it takes.
So I've been following an oracle tutorial on JavaFX and I copied the code EXACTLY. I even went as far as to copy paste it from the text version into my IDE. I'm 100% sure that the code is correct.
The first one I followed was this video series.
The second tutorial I used to ensure that there were no errors in the code and the text version I copied.
In my frustration I decided to go from my desktop to my laptop to work, so I uploaded the faulty code to my online repository and lo and behold! It suddenly worked! Which indicates that I am right about there being no errors in the code. But as soon as I make any changes, it stops working again.
The error messages I receive indicates that it happens inside of the Application I'm extending in my Start.class where I have the main().
I'm using NetBeans as my IDE, and my project is a Maven project.
The answer seems to be that you need to clean the project when you perform changes to the FX parts. Clean before you run it and it will work fine, provided there actually isn't anything wrong with your code.
I have already asked this and was heavily downvoted. Unfortunately, I still can't solve it. I don't know what I do, but sooner or later I loose an ability to run java applets and java web start applications in all browsers.
Here is an example what is happening.
I am opening page with applets http://csis.pace.edu/~bergin/Java/applets.htm and getting the following picture:
with signs plugins were blocked. I am trying to unblock
which causes another dialog
after OK I have another
next
if clicked
And so on.
Applet doesn't run.
After dancing with PATHes, Java updates and so one, once I can have applet run. But sooner or later I will stuck in this position again.
I would like to know, is it possible to exclude this situation in principle?
I mean I don't want to disable security at all, but I mean that in case my explicit permission everything should run. Is it possible to do that?
UPDATE
First of all, I don't understand, why can't I run applet on outdated java if I want?
I am a human and robots should obey me! :)
Suppose I wish to debug my applet on old version of java, why not?
Second, there is no information about what version it thinks I have and what version it wants?
Without this information it is possible that there is just a bug in version detection mechanism.
I have multiple versions of Java in Program Files since I am a Java developer. Then how can I know which one it uses?
UPDATE 2
I have updated my Java from 1.8.0_20 to 1.8.0_25 and now situation have changed, but applets are sill impossible to run.
The proof I have "latest" java:
The proof I have added the site above to exclusions list:
The effect of applet run:
(applet not runs)
Clicking details result:
(no any details in fact)
So, what to do?
UPDATE 3
This site is not working: http://ssd.jpl.nasa.gov/sbdb.cgi?sstr=2012VP113;orb=1;cov=0;log=0;cad=0#orb
(show orbit diagram)
Reloading/restarting browser does not help.
I looked at your html source and realized you're using the .class file directly instead of wrapping it in a jar file. This is what you have:
<applet code="GSort.class" width=700 height=400>
I think applets no longer work when using .class files directly due to new security requirements. They have to be wrapped in jar files because you need to add some security settings to the meta-inf folder of the jar file. Here is how oracle recommends deploying an applet:
https://docs.oracle.com/javase/tutorial/deployment/applet/deployingApplet.html
Edit:
I tried again with adding the site url to the Java security exception list and this time I got it to work! It looks like chrome stays in memory after exiting so changing Java security doesn't affect it unless you shut down chrome completely and restart it. Easiest way is to use Internet Explorer. Try it with Internet Explorer and it should work (assuming that you still have the site added under java security exception list).
Sorry in advance. This is a really vague question because I have no idea whatsoever what is going on. I have a Java Swing GUI desktop app that I wrote in NetBeans. While inside of NetBeans, the app works fine and passes all of the tests that I have thrown at it. I've been developing this app over the past several months, deploying it at various phases of its development.
Yesterday, I finished adding and testing some new functionality. I built the application and put it on another computer. I then went to run the program (outside of NetBeans) straight from the jar file. While in the new areas (JDialog boxes), the program crashes. Since I am not in an IDE, I have no feedback to see what is wrong.
The only thing that I can think of (and this is lame) is that I added some switch statements that switch on strings, which I know to new to 1.7. I was previously developing in 1.6. Otherwise, I can think of no reason that the program should work flawlessly inside the IDE, but crash outside of it.
Can anyone offer any suggestions for how I should approach this? I'm at a complete loss.
Thanks very much.
The next debugging step for you is reducing the size of your program until it doesn't crash, then seeing what change you made worked. That should either make the answer obvious or give you a good question to post on SO.
Your idea that it might have to do with switch statements tells you to try:
removing them
removing and compiling on JDK 6 and see if it works
Those are reasonable ways to reduce your program size to see if you can make it run.
I would start from collecting a crash dump data.
If you run the UI on windows you could use DrWatson
If you run the UI in Linux , By default the heap dump is created in a file called java_pidpid.hprof in the working directory of the VM. unless you specify the path yourself by adding this -XX:HeapDumpPath= option to your UI java options.
I can't figure this one out.
I have Java code that captures Webcam, it works awesome for what I need.
Issue comes along when I am trying to make an Applet out of it. I made applet, but it simply doesn't work. It doesn't create any visible errors, doesn't complain about libraries, basically nothing I can grub on to. The only thing I can see in Console log (Mac OS 10.5) is following message:
PluginProcess[10143] Process manager already initialized -- can't fully enable headless mode.
I don't have any ideas on how to fix it. Please Advise.
Thank you.
P.S: I just want to make Java Applet out of existing code so I can dump it into machine (any) and it can stream video from webcam.
https://bugzilla.mozilla.org/show_bug.cgi?id=574904#c23 says "this message is a
red herring: You always see it (using Apple/Sun's Java Plugin2) whenever any
Java applet is displayed."