with some fuzz around Windows 7, does somebody have experiences with Java compatibility with Windows 7? Should this be a concern or do the programs probably work ok?
I'd be especially interested if somebody has experiences with Swing applications?
The versions available seem to be beta versions so they won't provide perfect basis for evaluation but some.
br, Touko
Updating info related to the question:
According to Supported System Configurations for Java SE 6 and Java For Business 6
,
Windows 7 support was introduced in 1.6.0_14
From Java SE 6 Update 14 Release Notes changes:
6821003 hotspot runtime_system Update hotspot windows os_win32 for windows 7
From Java SE 6 Update 18 Release Notes:
For 6u18, support has been added for the following system configurations:
* Windows 7 support is now available
I have been using various Java apps on my Win 7 x64 box just fine and never had any problems. Even some of my oldt poorly coded swing apps have worked without issues.
For the most part, Win 7 is Vista in new clothing. Shouldn't have much issues because of that.
Your biggest concern is having the right Java runtime installed. WHen that is out of the way you can expect properly written Swing programs to work identically.
(With proper I refer to not having hardcoded button sizes or similar)
There are several problem of swing application in windows7 there are stated below:
JCheckBoxMenuItem will not show image
JCheckBoxMenuItem(Icon,Text,boolean);//Icon will not displayed
you can refer the http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7122141.
Focus issues. Sometimes escape won't work
The problem I have with my Swing application on Windows 7 (and presumably Vista - haven't tried it), is that the Java Runtime indicates to Windows that it is UAC-aware, while my application that runs in the JVM actually isn't. As a result, if someone installs it into the traditional location (e.g. C:\Program Files\MyApp), the application fails because it cannot write configuration data or error log files to its installation directory. Because I use some third-party libraries that write their own files to the current (i.e. install) directory, and I've got many more important things to do than dig into those libraries just to make their error reporting and configuration storage UAC-aware, I took the path of least resistance and changed my default install directory to C:\MyApp. I realize that this is a regression back to the old DOS days where people ended up with myriad application directories in C:\, but it's not my fault that Windows' method of implementing UAC Virtualization for legacy applications doesn't work for Java apps.
Related
I am using the javax.comm API to help my program communicate with hardware over serial port. I am using the Windows 7 and NetBeans IDE 9.
I used the common Java program to check the available ports on my PC. The program compiled and ran without error. However it returned nothing.
What can I do to use the javax.comm API on Windows? It seems win32com.dll does not work with a 64-bit operating system.
This is how I got it to work.
I've tested it using JDK 1.6 (32bit) on my Windows 7 64bit machine.
Install 32bit JDK.
Copy 'win32com.dll' to JDK_HOME\jre\bin.
Copy 'javax.comm.properties'to to JDK_HOME\jre\lib.
Copy 'comm.jar'to to JDK_HOME\jre\lib\ext.
Now run your program and it should work.
Recent 2.2pre versions of RXTX include binaries for 64-bit windows. I think the latest RXTX information source has changed to this: http://rxtx.qbang.org instead of http://www.rxtx.org though.
At one point the RXTX library included drop-in support for using the javax.comm api. I'm not sure if it still does, but the main change then to use the "native" RXTX packaging was primarily just a package name change.
it seem the win32com.dll does not work with 64-bit Operating system
I think that is correct. In fact, according to the relevant download page, Oracle no longer supports the javax.comm API for any Windows platform.
However, I found this page which has a 64bit build of the DLL, among other things.
EDIT
By an astounding piece of research (i.e. following the links and reading stuff) I found the download page for the latest RXTX, which claims to have binaries for various platforms. If your platform is not there, try building from source. If that doesn't work, consider investing the effort in making it work.
I've integrated RXTX libraries into some of my earlier projects and i found out this bug it has while working with comm ports under windows, so you might want to check this first before going into some serious app design.
Communication works fine, never had any problem with that, but once you open the port you cannot close it and reopen, if you use method provided for closing port, your app just hangs, no exception no nothing. I found later the same behavior described by users on web, but never really found the solution to this problem.
Again, this might help you save some time, check it first.
Latest release, which is this http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip, doesn't have this issue no more. Unfortunately i think its solved only for windows, its still there on Linux binaries, and i haven't tried it on mac.
Have you got a look on RXTX ? I think it is still active.
I had this issue...on a 64 bit machine..running windows 7
a legacy application developed in jdk 1.4, for 32 bit windows... and using the win32 comm api binary
i tried the RXTX binary for 64 bit and i was able to communicate with my device on some level... but... there were other problems as my application referenced a version of the jpos library that internally was using the comm-api (had import javax.comm.*... in some Serial...Listener class)....
I installed a 32 bit jdk and setup the comm-api binaries for 32 bit windows as directed here...setup comm api on windows
all was fine afterwards
You might be interested at an alternative library I've authored: http://code.google.com/p/jperipheral/
I have a Swing application that gets deployed on clients machine using a JNLP. Earlier we were using Java 5/6 to run the application on client machine and did support only pre Windows Vista operating systems. We also force the application to have "Windows Classic" look and feel by introducing -swing.noxp=true parameter in the JNLP file. This made sure that the application always had a classic look and feel.
But, now with the new requirement we have to support Java 7 and Windows 7/8 as well. In the Java 7u45 document I read that -swing.noxp is no longer supported. This eventually means that I can not use this parameter for the application to default to classic look and feel.
I tried launching the application with Windows 7 and Java 7u51 without the "-swing.noxp" parameter. This made the application look like Windows 7 default theme which gave a weird look and feel to the application (I can post the comparative snap shots if need be).
My question here is, does Java 7 have some parameter (in place of -swing.noxp) which will do the trick for me(because client want the application to have the same look and feel as pre Java 7 upgrade.)?
I know I can change the PLAFs and all but that is a huge code change. I am looking for something simple and similar to -swing.noxp
Thanks for the help in advance.
Last night a new Java 7 update has been released: 7u65. I have a web application where a service applet is loaded, and after the update, my tests on different PCs did not show issues nor wrong behaviors.
Later, I started to receive issue reports related to my product's Java service applet. All the reports came from users who updated Java JRE to 7u65 (from 7u60):
The applet was not loading at all. I display a "Loading" screen when the application starts, and this was not being displayed. Also, all the services provided by my Java applet were unavailable.
After changing the Java Control Panel's advanced configuration to always show the console (in one of the PCs where this issue happened), I discovered that the applet was not even launching the Java console.
Using the same station where the error happens, trying to access java.com to check the current java version, the Java applet is loaded and the console is displayed without errors.
All tests were performed after clearing Browser and Java Cache, and even after removing the installed certificates (mine is a valid signed applet).
I checked the Java 7u65 release notes and none of the mentioned changes seem to affect my applet. Also, there were no issues while using Java 7u60.
I don't have any clues about what is going on, perhaps because the java update was released hours ago. As the Java console can not be displayed even if I configure Java Control Panel to do so, I can not tell if there is any exception. I can not reproduce the issue in my PCs (Windows 8, nor Windows 7, both at 64 bits), but the issue has been reported on Windows 7 PCs.
One of my friends told me that this seems to be happening on machines where Java 7u60 was in use, and then it was updated to Java 7u65 with no deinstallations. Also, this tends to happen in older OS (ie: WinXP) which is more natural.
I write this question because it seems very odd that some PCs have this issue, and some others not. I'd like to know if any one else is having this issue, knows what could be the reason, or has discovered/applied any solution to it. Also, I'd like to share the solution if I ever happen to find it.
Thanks.
Edit:
External references, related to the same Java version (JRE).
Internet Explorer crashing after updated Java to 7u65: An issue with the same JRE version, this time with Internet Explorer and Firefox.
RS Loading Issue (Java) ~ READ: An issue related to the same JRE version update, this time, in a Java Game.
The future of Java on Windows XP:
This end of support announcement has been misread as "Java no longer works on Windows XP" or "Oracle will stop Java updates from being applied on Windows XP". These statements are not correct.
I just ran into this exact problem with one of my applets.
It looks like some changes were made to the handling of the 'java-vm-args' and 'java_arguments' params in 7u65.
'java_arguments' seems to no longer work, when it is specified, my applet will silently fail without even launching the JVM.
I have had the same problem.
I delete C:\Users\${USER}\AppData\LocalLow\Sun
When i reloaded the web page containg the appelets. The JRE recreated this folder again.
And evrything was OK.
There is no big difference between the folders contents .. but it worked.
It seems to be a bug in the jRE
It seems that oracle has changed something with processing default plugin java arguments,
that caused problem in new java.
When upgrading from older version of java it is possible that value for
deployment.javaws.jre.0.args (or deployment.javaws.jre.1.args)
is not defined in
C:\Users\${USER}\AppData\LocalLow\Sun\Java\Deployment\deployment.properties
If you add
deployment.javaws.jre.0.args=
to deployment.properties, applet will work.
It can be done through Java Control panel also:
Java -> View -> double click on Runtime Parameters cell for java 7u65 to enter edit mode -> OK -> Apply
java-jvm-args solution didn't work for me, applet was launched but arguments were ignored.
Oracle has released an update that resolves this specific issue via version 7u67
http://www.oracle.com/technetwork/java/javase/7u67-relnotes-2251330.html
As Miloš Ratković wrote, if customer hasn't string in deployment.properties
deployment.javaws.jre.X.args=
where x is number of java installation for version 7_65 (number of java installation for particular version is X in string deployment.javaws.jre.X.product=1.7.0_65), Java applet failed to start.
For my case I have a solution - don't pass any arguments for my applet.
In my javascript code for starting applet I'm just comment
<param name="java_arguments" value="some arguments">
string
Also, if you delete the directory C:\Users\${USER}\AppData\LocalLow\Sun, during next startup of java applet java write new deployment.properties with correct java args string
Uninstall java 7 update 65 and reinstall java 7 update 55 Download the windows x86 offline version
Go to Java control panel and uncheck: automatic update
When the next window comes up, click on "do not check"
then click on "apply" and "ok"
close all browsers and reopen them to continue your work
This has worked for me every time so far and I have been doing this for the last two weeks now with "0" issues.
Sorry, this is not the answer. I was trying to verify the feedback about JRE 7u65 not able to accept "java_arguments"; however, I setup a Windows x32 and installed (new) 7u65 without upgrade from any older version. With the "java_arguments", the machine is able to load the applet in IE8 and FF30, when few specific PCs do fail the same applet with upgraded u65.
I'm the author of Wordle, one of the few surviving Java applets in the wild.
Recently, I received user reports of warnings that my (signed) applet would soon be blackballed by the JRE because it did not explicitly specify a "Permissions" attribute in its manifest. So, now the MANIFEST.MF correctly specifies
Permissions: sandbox
and the <applet> tag includes the magical
<param name="permissions" value="sandbox" />
param, as documented.
Now, folks who have bent over backwards to install the OS X JRE 7 can run Wordle with no difficulty, but folks (like many school IT admins) stuck on JRE 6 cannot run the applet at all; they get
java.lang.SecurityException: JAR manifest requested to run in sandbox only:
http://wordle.appspot.com/j/v1390/wordle.jar
at com.sun.deploy.security.DeployManifestChecker.verify(DeployManifestChecker.java:106)
at com.sun.deploy.security.DeployManifestChecker.verify(DeployManifestChecker.java:84)
at com.sun.deploy.security.TrustDecider.isAllPermissionGranted(TrustDecider.java:319)
at com.sun.deploy.security.TrustDecider.isAllPermissionGranted(TrustDecider.java:280)
at com.sun.deploy.security.TrustDecider.isAllPermissionGranted(TrustDecider.java:270)
at sun.plugin2.applet.Plugin2Manager.isAppletSigned(Plugin2Manager.java:3289)
at sun.plugin2.applet.Plugin2Manager.createApplet(Plugin2Manager.java:3207)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Plugin2Manager.java:1536)
at java.lang.Thread.run(Thread.java:695)`
The symptom suggests that the Java 6 plugin assumes that the signed applet should run in all-permissions mode, and thinks that the request for sandbox in the manifest is an error. It ignores, in other words, the permissions param in the applet tag.
Does anyone know of any way for me to help my users other than setting the applet to run in all-permissions mode? I'd prefer to stay sandboxed, both because I don't want people to be afraid to use Wordle, and because I don't want to create an attack surface.
Reply from Apple to my bug report.
Apple Developer Relations15-Aug-2014 05:12 PM
Engineering has determined that this is an issue for a third party to
resolve based on the following:
This issue is with the Oracle manifest checker, which is in conflict
with the instructions Oracle has given developers to run applets in
Java 7.
We delivered Oracle's Java SE 6 security checker, as they designed in
our version of Java SE 6. It is mutually incompatible with future
versions of Java, but there is nothing Apple will do to address it,
since we are no longer support Java SE 6 on 10.6.8.
We are now closing this bug report.
If you have questions regarding the resolution of this issue, please
update your bug report with that information.
Please be sure to regularly check new Apple releases for any updates
that might affect this issue.
In other words, they don't support Apple Java any more (even though anyone with OS X 10.6.8 or earlier is forced to use Apple Java), so they're blaming this on Oracle's original spec - which apparently Oracle themselves didn't follow, or this same bug would exist for Oracle Java 6.
Okay, I tried A LOT! If not everything! I'm pretty sure there is NO WAY to let a self signed applet run in sandbox mode with the latest update (1.6.0_65-b14-462-10M4609).
The only chance I had was to
downgrade to 1.6.0_51
remove Permissions tag and param completely
from manifest and applet-tag
We have applet that uses smartcards to sign something. Everything was OK until new java update on Mac OS.
I'll explain. When macos had java 6 and special plugin for it, everything worked. But now they removed their plugin, and users must download browser-plugin for java 7 from Oracle web site.
Applet still sees Card Reader but doesn't see smartcard in it.
We use reader.isCardPresent() method, and it returns "false", no exceptions etc. like everything ok and there is no card in cardreader. We restore backup of the os, when there was 6 java and MacOS's own plugin, everything works. But we have many clients that have just bought new iMac or MacBook, they cannot use 6 java and apple's plugin.
Everything works on Windows.
We don't use any deprecated methods. Seems like problem with Oracle's plugin for Mac OS.
Anyone had similar problem or may be you have any ideas.
I just make some tests: take code from sample and slightly modify it. Run the sample on jdk1.7.0_09 in macosx 10.8.2. Pcsc framework 1.4.0.
terminal.isCardPresent() return false, but card can be accessed. Bug exist when java running both 32 and 64 bit mode. Pcscd running in 32 bit mode only, because generic pcsc driver is still 32-bit only.
In pcscd debug log i see some parsing errors in SHMMessageReceive, so bug may be in java or in the pcsc framework (winscard_msg.cpp).