I see a lot of JDK 1.6 notes about how to open an HTML file in the default browser but none for JDK 1.4.
Does anyone have any experience with that?
browserlaunch2 has worked for me in the past.
You can use same code as in version 1.6, just add a reference to JDesktop integration jar. I think (but I'm not 100% sure) this is actually the same library you get with Java 1.6, it was developed as a separate project by Sun before they include in Jdk 1.6.
Related
Folks,
I have the following challenge, I would like to deploy an Applet which relies on Java 1.8 syntax into hundreds of client workstations already running an old Java Applet which relies on Java 1.5
The problem is, I do not have access to the Java 1.5 Applet code and even not to it's launcher Html page. Alas, this launcher Html page relies on the Applet tag and will therefore attempts to load the most recent Java plugin version installed on the workstation.
I don't like to rely on any virtualization solution, I have to run as a Java Applet, perhaps Web Start can be considered if you think it would help.
My questions are:
Is there a local workstation configuration/hack to tell the browser to load a specific (old) Java version when rendering the Applet tag ?
Otherwise, is there a way to use Java Web Start to workaround this problem and somehow run my newer Java Applet without updating the "official" workstation Java plugin version ?
Ok you ask several questions, here are some answers:
It is not possible to run Java 1.8 code with a "lower" JRE/JDK like 1.7, 1.6 or 1.5. The other way around however is possible - you can use Java 1.8 to run a java 1.5 applet...
You don't need to hack your workstation - if you only install one java version (even if it is an older one) and it is installed/configured correctly that version will be used to start your applet
With the next generation plugin (introduced since 6u10) it is possible to start your applets with a jnlp file. The jnlp syntax allows you to specify a specific java version and if that one is not installed it will/can be downloaded. One example would be:
<j2se version="1.6.0_10" href="http://java.sun.com/products/autodl/j2se"/>
Some general idea, please correct me if I didn't fully understand you:
You want both applets to run, right?
For that to work you will have to change something at some point. Possibilities (My answer disregards security - from this perspective always use the latest java version):
Install the latest Java 1.8 and sign your old applet. Signing an applet doesn't require the source code - just access your webpage, run the applet and then search java cache for the applet.jar. Sign it with an official certificate and deploy it on your server. (Additionally this may require adding some Manifest attributes as well)
Downgrade your new applet to java 1.7 or 1.6 and install an older Java like 1.7.0_17. Until Java 1.7.0_21 signing was not mandatory. If you see the baseline for Java 6 it would be version 1.6.0_43.
Theoretically you can use jnlp to define an exact java version which should be used to run an applet. The problem is, that it was introduced starting with 1.6.0_10 - thus your 1.5 java does not suffice. If it is possible to run your old applet with a slightly newer java and also add a jnlp file to your webpage then it could work. For that you would need to: Install two newer java versions: One 1.6.0_10 or higher (until 1.6.0_43, or 1.7_17) and the latest 1.8.0_X. Then in the jnlp file define your exact 1.6/1.7 java. When accessing your web page the 1.8 plugin will be started which detects that an older java version is required and then the older version will be started afterwards. For your newer applet the latest java will be used...
I'm about to release a new version of my app. I'd prefer to stick with Java 1.6 since it's been fully tested using that JVM. I use install4J.
On the Mac I don't package a JVM, relying on the presence of Apple's JVM. As I understand it they've disabled the browser plugin by default so security isn't an issue.
I do however package a 1.6 JVM with the windows version. Am I correct in believing that the packaged 1.6 JVM doesn't have and more security risks than the latest 1.7 JVM since it won't be used by the browsers?
Thanks.
Thats just a question of updated software, older versions still safe. but using then in the browser can be such a problem just because of websites checking java version.
http://www.java.com/en/download/faq/remove_olderversions.xml
take a look at that link it should help
My clients have JRE 1.3.x and 1.5.x installed, and when I use the <applet> tag, 1.3.x is often loaded by default by the browser. How can I request the browser to use JRE 1.5.x in this case?
Note: JRE upgrade on customer side is not an option.
Not sure how it works for other browser. Here is an article to where you can specify a JRE family version for a Java applet to run in Java Plug-in for Internet Explorer.
Reference doc : JavaTM Plug-in and Applet Architecture
Use deployJava.js to deploy the applet. For the version, specify it as:
var version = '1.5';
I am getting this bad version error as shown below. How to fix this. Do I need to have a separate jar file for each version of java?
(source: sourceforge.net)
How to fix this.
Is this a plugin that you created, or did you download it from somewhere?
I've never seen this myself, but I suspect that you are running Eclipse using an older version of Java (e.g. 1.5) and trying to use a plugin that was compiled for Java 1.6. Assuming that is the case you can:
upgrade the JDK used to run Eclipse to 1.6,
try to find a version of the plugin that was compiled for the Java 1.5 platform, or
download the plugin sources and build it for Java 1.5 yourself.
Do I need to have a separate jar file for each version of java?
No. A JAR file built for a Java 1.5 target platform should also work on a Java 1.6 platform. (Just not the other way around ...)
I got similar kind of error once and I was not able to fix it. And I ended up removing the plugin (EMF Plugin) and installing it on a new setup of Eclipse.
Now, I use Yoxos On-demand where you can create/add/remove Eclipse plugins with no effort. This is the best Eclipse customizer I have seen.
You are running on an older version of Java than the code was compiled for.
I have installed Eclipse 3.3 on Mac OS X and it does not contain the src.zip file I am used to seeing with Windows and Linux installations. Where can I download the complete source code for the Java 1.5 JDK (must be specific versions).
I have been able to locate the full source code, however it contained the ungenerated Buffer implementations and so navigating NIO code was not possible.
Looking for the Java source typically found in the JDK src.zip, not the VM source.
You can get the Developer Documentation, which includes the source. The download requires you to have an ADC account.
Brian Clapper has already mentioned it in a comment, but the JDK downloads from Sun include src.zip. I don't know if there's any way to get it other than installing on a target platform, but you can install it on a Windows or Linux (virtual) machine and get src.zip from there.
Specifically for Java 1.5, the downloads are here
[Update]
Also, source distributions of the JDK are available from Sun from here. It seems that SCSL link is messed up and throws you for a loop, but JRL still works (if you don't mind going through it).
It is located in
/System/Library/Frameworks/JavaVM.framework/Versions.1.5.0/Home/src.jar
I do have the XCode stuff installed found on the installation disks that come with a Mac, so I don't know if the source code appears on a standard Mac installation of OSX.
/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/src.jar
More details on:
http://confluence.concord.org/display/CCTR/Get+local+copies+of+Mac+OS+X+Java+source+code+and+Javadoc
Unclear if that is even possible since the Mac JDK is not, to my knowledge, open source. It was created by Apple not Sun.