Can anyone explain the use of having multiple JRE's in the Control Panel Applet of Java?
Refer to attached snapshot http://ge.tt/5YRkjNm/v/0?c of the location i am referring to.
An applet or desktop app. deployed using Java Web Start can request a specific version of the JRE in the launch file.
Different JREs have different compatibility issues. Code that worked on an earlier version of java may not work on a later version. Also, if there's multiple JREs, it may be hard to decide on one to keep. Thus, it's best to let the user choose.
Related
I've a problem with Java applets.
I developed two Java applets for my application, the applets are signed with a certificate, include the MANIFEST file with permission and they run correctly.
There is a problem when Oracle releases a new Java update and the applets don't work, it seem that IE look at the latest version of Java and I need to update it every time.
What can cause this problem?
Applets are all but deprecated. Your best bet is to migrate away from them, because more and more browsers are removing support from them.
If you need to enable users to upload files to your server, there are numerous resources and tutorials out there.
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).
I'm struggling with specifying which one of the many java installations on my Windows 7 machine would be used by the Internet Explorer for (1) running applete as well as (2) for Java web start.
For example, I am going to that Java-View tab in Java Control Panel, change the checkbox there, then make Java Console visible in the advanced tab and then find from the Console header that not always Java which is checked in the Java-View is actually executing applets in my browser.
In Java Control Panel Java-View along with the "User" tab, there is also a "System" tab.
One usually cannot change anything there, but what does that mean, and does it play any role?
In Java Control Panel Advanced tab you see "Default Java for browsers" checkboxes.
Why Microsoft Internet Explorer checkbox there is always checked and always grayed out?
Is this checkbox important or is it Java-View tab screen, which actually affects IE operations?
Also in jre/bin folder of each java instalation I see javacpl.exe file and can execute each of them, but only one of them, I guess, appears in actual computer Control Panel. How do you determine, which of them is really shown and can be executed through my computer Control Panel? Does it make sense to do anything with alternative javacpl.exe executables - will their execution affect my IE java-related functionality.
Basically, I'm in total confusion of how this mechanism works, and wwould very much appreciate if someone could give some clarification on at least some part of the above questions. And I'm mostly talking here about Java 1.6 and Java 1.7, I guess it would be even more difficult if we try to cover in this question also older java versions.
Thanks a lot for any help on this subject.
Regarding your first question
" which one of the many java installations on my Windows 7 machine would be used by the Internet Explorer for (1) running applete as well as (2) for Java web start."
This can be tested by making your applets contain Java 7 features like "Diamond Operator". Compile it by jdk 1.7 and then try to run in browser, if it runs then your browser is using 1.7 else 1.6.
Second ques -
"In Java Control Panel Java-View along with the "User" tab, there is also a "System" tab. One usually cannot change anything there, but what does that mean, and does it play any role?"
Answer- This is my guess that system tab will contain that option which is configured in JAVA_HOME environment variable OR it can that jdk which was installed more recently installed. Because offcourse default can be only one and not two.
Third question -
"In Java Control Panel Advanced tab you see "Default Java for browsers" checkboxes. Why Microsoft Internet Explorer checkbox there is always checked and always grayed out? Is this checkbox important or is it Java-View tab screen, which actually affects IE operations?"
Answer - The option is grayed out because the option is already chosen for you and you need not specify that.
Hope that helps.
Is there a way to point to a specific JRE/JDK location to run a JWS application? I'm looking into specifying the actual location of the JRE, not only it's version via Java SE element of JNLP file. I dont want to access any system JRE, I only want to use whats bundled with my application.
Currently I am trying to bundle 1.6_45 with my app. However I am encountering issues when a user has 1.7_xx JRE installed on their system. It blocks the launch of the webstart application. The jars are self signed and getting them signed by a CA authority is not an option as it is too $$. I changed the j2se version tag in my jnlp to say 1.6* and this allowed it to run with 1.7_xx present. One bug squashed.
Now the issue is that systems are being upgraded to 1.6_71 [private oracle version], that apparently has some 1.7 security fixes backported in it. So now because of the jnlp tag having 1.6*, my app is picking up 1.6_71 and completely hanging. Webstart just opens the java console and hangs. I tried adding -Djnlpx.home to the jnlp java-vm-args, pointing to the bundled jre/bin, but no luck there.
One way I tried [from a post here on SO] is that I created a shortcut to my particular javaws passing the jnlp file location as a parameter. This did not work. It still picked up 1.6_71 and hung.
At this point, if I google anymore, its going to start showing me a captcha...sigh.
Any pointers are greatly appreciated! Thanks!
Is there a way to point to a specific JRE/JDK location to run a JWS application?
Short answer, no. Long answer, nope.
Oracle's latest release of Java 7 Update 51 includes new security changes that will block some applications. This is the new "security baseline" and there is apparently an equivalent code level for 1.6.
One of the configuration options that helps determine what exactly happens is the Security Level, found in the Security tab from (Windows) Control Panel -> Java. If you set the security level at it's lowest (can't remember the name) then you might not get blocked. Security level High will block unsigned and self-signed. Security Level Very High will be even more restrictive, like blocking an expired application - meaning the certificate has expired.
Also, maybe you could try setting the specific level of the JRE you want to run - see the link
http://docs.oracle.com/javase/6/docs/technotes/guides/javaws/developersguide/syntax.html#jnlp
for more info.
I am currently trying to create an installer for a application that i created. And i want the installer to be able to run on mac, windows and linux for now. Hence, i chose to make my installer in java.
Now, the problem that i am facing is i have to install mysql from within java without giving the user all those unnecessary choices during the setup phase because it really necessary for them to know it. I know this can be done because while installing wamp, this is how mysql is installed. I only need to bother the users for the right things.
So, can somebody tell me how it can be done?
Thanks in Advance
For Mac and Linux I would let your installer start a shell script. However on Macs it is not common to have "installers". You should consider to just deliever binaries which the user can copy via drag&drop with his mouse. For that you usually only make an immage file (*dmg) which gets mounted by the finder and opens in its own finder window. You can have a symbolic link of the Applications folder on that *.dmg and a background image with some text: "drag here --->"
This might not be exactly what you're after, but how dependant are you on using mysql as the DBMS? If you use fairly standard SQL and this suits your application, maybe you could switch to Apache Derby? That will allow you to include the whole DB as a part of the installation, and completely invisible to the user.
See: http://db.apache.org/derby/
(caveat: I don't remember the details of the Apache license, but I'm assuming there's no issue there)