I created Software Project in java Netbeans 8 and running on JDK 8.My Operating System is 64 bit.And My client Machine running on Windows xp 32 bit operating system.Would it work in xp if i made exe ?
What is appropriate Java Platform in Windows XP?
None really. Read this: https://www.java.com/en/download/faq/winxp.xml which explains why Oracle no longer supports Java on Windows XP.
Now you can probably find older versions of Java that will run on Windows XP, but you won't be able to get (reliable) security patches any more, either for the OS or for Java.
Would it work in xp if i made exe ?
It probably wouldn't. For a start, many of the ways to turn Java code into an exe do it by embedding a JRE inside the exe!
Do yourself a favour and upgrade to a PC with a more up-to-date Windows operating system. Or install Linux on it ... for free.
You can still install the Java 8 version in windows XP. When you generate the exe file, try to generate with 32bits.
You can do it with Launch4j for example.
Related
I have compiled my java application with JDK 64-bit on windows, then i packaged the JAR file using Excelsior Jet 11.3 (64-bit) to give me an elegant exe executable ready to use by end users running windows.
The exe file works just fine on my machine (Windows 7 64-bit) but when i deployed to other 32-bit systems (windows xp & windows 7), it does not work, it shows the error message saying that the exe is not recognized as a valid 32-bit program.
How can i solve this?
How can i solve this?
Well, the standard ways of distributing Java (JAR files, WebStart, etc) avoid this because bytecodes are platform independent. You have deliberately chosen to distribute EXE files, which are inherently platform specific.
If you want to stick with EXEs can think of two alternatives:
Build and distribute a different EXE for each of the OS + hardware platform combinations that you need to support. (32 Windows, 64 bit Windows, various MacOS, Linux on Intel, Linux on ARM, Solaris, etc)
Pick a lowest common denominator; e.g. a 32 bit Windows EXE should be runnable on a 64 bit Windows OS.
But I would recommend either getting the user to install a JRE, or providing an installer that installed an embedded JRE.
Do the big Linux distributions support java when freshly installed?
If i have a Java Swing application, will it work in a freshly installed Linux with no internet connection?
I understand that there are no guarantees, but how likely is it for a Linux machine NOT to have any java/Swing support?
if you can check the o/p of command java -version in a terminal, it'll show if you have java installed or not.
So if Java or JRE is installed you can surely use your Swing application.
But if you are planning to develop a swing app you need to have JDK installed in your system.
you can if the command javac -version is working then you have JDK installed in your system.
But I suspect if any Linux distribution comes pre-installed with a JDK. For once you can find installed JRE by default but it is difficult to get pre-installed JDK in any Linux OS.
I am developing a windows application.
I need to create an installer(a common installer for both 32 bit and 64 bit windows OS) for that, for that I am using Install4J software.
I developed in Windows 32 bit, jdk 1.7.
Installer working fine in 32 bit windows os, but when I try to create installer in win 64 bit os, it is throwing me an error like java.lang.UnsatisfiedLinkError: Cannot load 32-bit SWT libraries on 64-bit JVM
Please help to sort out this..
The problem is that there are separate "swt.jar" files for 32bit and 64bit Windows JVMs, and they are not interchangeable. You can't use the 32bit Windows JAR on a 64bit Windows JVM ... or the other way around. (AFAIK, the fundamental impediment is in Windows and the JVM rather than SWT.)
One possibility is to do some classloader tricks, and dynamically choose between different JARs depending on the platform that your app detects at runtime. The installer would need incorporate both flavours of the SWT JAR ... with different names.
This answer goes into more detail: Supporting SWT on Windows/Mac & 32bit/64bit
Well that is just because when u install program into the Program files that will install only 32-but and will load 32-bit libraries so u can do one thing very simple solution of that just install your program in the the Program files x86 if u have 64 bit system.
that work for me and might work for u too.
In my ini file for winrun4j java exe wrapper I set vm.version.min=1.7 to specify Java 7 as a requirement. But when I ran it I couldn't get winrun4j to recognise that I had a java 7 jre installed even though java -version from the command line returned it.
On further investigation I realized that my Java 7 installation was 64bit whereas my Java 6 installation was 32bit. I then found that winrun4j has some 64bit version of its commands (ie rcedit64), if I built an appname64.exe rather than appname.exe it no longer complained about Java 7.
So can someone confirm this was the issue that I need a 64bit exe to run a 64bit jvm
Secondly if this is the case how do I present this to the user, I'm wrapping the installer as an exe so does that mean I need to provide the user with both an installer.exe and a installer64.exe and explain to the user to pick the right one not based on their processor but based on what version of java they have installed32bit or 64bit)
Edit:
Sounds like things are as i described, and using launch4j maybe a solution
What's the best way to start Java applications on Windows 7?
that I need a 64bit exe to run a 64bit jvm
Yes. You can not use a 32 bit exe to run the 64bit JVM
Secondly if this is the case how do I present this to the user, I'm
wrapping the installer as an exe...
Don't. Just create an installer for a 32-bit system and a 64-bit system. Depending on the target system the corresponding installer should run
I am working on a project where I have to capture images from webcam.I thought of using LTI-CIVIL api for this purpose. But it does not work on 64-bit os(I tried to run demo programs on windows 7(64-bit), it didn't work).
Please let me know how to make LTI-CIVIL api work with 64-bit os.Or If you know any other API(Open source or at least free) which will work with 64-bit os.Thanks in advance.
Not versed on LTI-CIVIL, but has native implementations (swt and capture dll) for Linux and Mac 64bit but only Windows 32 x86, so try to use a 32bit JRE in Windows x64 in order to link the 32bit dll of LTI-CIVIL. this kind of problems are related to the JRE, not the Windows architecture (32 vs 64).
I had the same problem, after i change from Jar 7 to Jar 6 the problem is gone