create 32 bit using 64 bit netbeans javapackager - swing

i have a java swing application made using
netbeans (jdk1.8.0_111)
jre1.8.0_111
pavapckager to create exe file
application has some library's
When i package i get a 64bit installer using javapackager which is expected.
I am trying to create a 32bit installer.
i have tried:
installing 32 bit jre and jdk
setting path to the 32bit version
changing netbeans config to use:
netbeans_jdkhome="C:\Program Files (x86)\Java\jdk1.8.0_111"
using : -Bruntime="C:\Program Files (x86)\Java\jdk1.8.0_111\jre" in the javapackager
How do i create a 32 bit Self-Contained Application Packaging using javapackager on a 64 bit windows system using netbeans

after restarting my pc everything started to work.
this is what i done:
Install 32 bit jdk and jre
In netbeans project add a new platform and choose the 32 bit version (restart pc)
Install inno and set path.
run javapackager specifing the 32 bit i.e javapackager -deploy -native exe -B
systemWide=true -Bruntime="C:\Program Files (x86)\Java\jdk1.8.0_111\jre" -Bshort
cutHint=true -outdir packages ...etc
test with Exe64bitDetector

Related

Octave can't find JRE while I have installed JRE

I have installed JRE successfully:
However, Octave keeps showing that it can't find JRE.
Make sure you installed right architecture(x86 or x64) of jre, it fixed the issue for me.
Following https://octave.1599824.n4.nabble.com/Octave-4-installer-doesn-t-detect-JRE-at-install-time-td4670684.html and: https://superuser.com/questions/1382158/on-windows-why-java-version-return-error-opening-registry-key-software-javas
run regedit.exe as Admin
change CurrentVersion in HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\ to 12.0.2
create: HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\12.0.2
set JavaHome in HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\12.0.2\ to: C:\Program Files\Java\jdk-12.0.2
open cmd and type: java -version
in case of error type: where java
cmd will return folder or few; in explorer go to the one ending with \javapath for example C:\Program Files (x86)\Common Files\Oracle\Java\javapath
there should be files: java.exe javaw.exe and javaws.exe
if so delete them, reopen cmd and type java -version
Now it should display correct version without errors
In Octave type javachk jvm
if ans is empty java should be working now
From the screenshot you presented, you have the JDK (development kit) installed, not the JRE (runtime environment). The required commands you need are there, but the operating system does not recognize this automatically. For that, you must include the 'java/bin' directory from the JDK in the PATH environment variable for your system. Next time you run Octave, it will locate and recognize the Java environment.

APPX321 SDK folder containing 'UAP.props' for 'UAP 10.0.17763.0' cannot be located

I want to create an upload package for the Windows Store.
The app is essentially "Hello world" for a dev express XAF Win application. I am using the Desktop Bridge.
I am following the docs to create the upload package
This created a file
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\AppxPackage
And an error
APPX3217 SDK folder containing 'UAP.props' for 'UAP 10.0.17763.0'
cannot be located. See http://go.microsoft.com/fwlink/?LinkID=798187 for more information
When I double click the error it goes to the following code in the Targets file
<GetSdkPropertyValue Condition="'$(AppxPackagePipelineVersion)' == '$(UapBuildPipeline)'"
TargetPlatformSdkRootOverride="$(TargetPlatformSdkRootOverride)"
SDKIdentifier="$(SDKIdentifier)"
SDKVersion="$(SDKVersion)"
TargetPlatformIdentifier="$(TargetPlatformIdentifier)"
TargetPlatformMinVersion="$(TargetPlatformMinVersion)"
TargetPlatformVersion="$(TargetPlatformVersion)"
PropertyName="WindowsSdkDir"
VsTelemetrySession="$(VsTelemetrySession)">
I am targeting WIndows 10, version 1809(10.0; Build 17763) and also have this as the min version.
The application is using .Net Framework 4.7.2
As per the Microsoft link I had to install the update for Windows 10 SDK, version 1809.
My Logs :
Error APPX3217: SDK folder containing 'UAP.props' for 'UAP
10.0.18362.0' cannot be located.
This works for me.
Go to https://developer.microsoft.com/en-us/windows/downloads/sdk-archive/
Install SDK: Windows 10 SDK, version 1903 (10.0.18362.1)
Then, rebuild it succeeded.
I had the same issue with a CI/CD project that relied on the 1703 release. I used choco to fix it as a build-step.
choco install windows-sdk-10.1 --version=10.1.15063.468

How to make java Module JAR execute by clicking

I am using OpenJDK 11 and OpenJFX 11 on Windows 7. My IDE is Netbeans 9. I have replicated the tutorial (published by NetbeansVideos) below :
JDK 11, OpenJFX, Apache Ant, and Apache NetBeans 10
It is a simple Hello World type code. It works in Netbeans. But when I click the JAR file it doesn't work.
My JAVA_HOME in environment variable is set.
How do I make that Module JAR execute by clicking?
Thanks.
An archive becomes a modular JAR when you include a module descriptor,
module-info.class, in the root of the given directories or in the root
of the .jar archive.
-- https://docs.oracle.com/en/java/javase/17/docs/specs/man/jar.html
If you get your OpenJDK binaries from Adoptium, their installer has an option to associate .jar files. (Not sure about other distros) When you have the file association setup double clicking on a modular, executable, jar file behaves as expected. (Confirmed this is working as of JDK 17 and Windows 10). If not, you can manually setup the Windows file association yourself as described in: Running JAR file on Windows

Eclipse-Failed to load the JNI shared library

I downloaded eclipse-juno, and run it. It was giving error as " A Java Runtime Environment (JRE) or Java Development Kit (JDK) must be available in order to run Eclipse. No Java virtual machine was found after searching the following locations:
C:\Program Files\eclipse\jre\bin\javaw.exe javaw.exe in your current PATH "
Then I set environment variables as told in this post
Eclipse - no Java (JRE) / (JDK) … no virtual machine.
Now its giving error
Failed to load the JNI shered library "C\Program Files\Java\Jdk version\bin\...\jre\bin\client\jvm.dll"
First of all make sure your Java and Eclipse have the same architecture - they both have to be either 32-bit or 64-bit. If that checks out, it should be OK.
I had the same problem: in my case everything was in fact 64-bit - 64-bit OS, 64-bit Eclipse and 64-bit JRE in use, so there was some confusion as to the origins of the issue...
What helped was correcting environmental variables JAVA_HOME and PATH - and pointing them directly to the bin catalogue:
.../My/Java/Location/bin
instead of
.../My/Java/Location
Possibly you have installed wrong BIT version of Java on your machine. If your machine is 64 bit, you might have installed 32 bit java only. You can able to view whats your machine architecture by right clicking on computer and say properties.
If your machine is 64 bit machine. Install 64 bit Java, 64 bit Eclipse. Make sure your classpath is set
Hope this will help.
You can test this solution, maybe works: go to window->preference->server->runtime environments->and set your server path Example: tomcat path.
for set java invironment variable and classpath:try like this:
and in path section:
check this link:link

Building 32-bit Qt Mysql plugin fails with MinGw

I'm building a MySQL plugin for Qt 4.4.3 Open Source Edition (Qt documentation), and using command:
cd %QTDIR%\src\plugins\sqldrivers\mysql
qmake "INCLUDEPATH+=C:\MySQL\include" "LIBS+=C:\MYSQL\MySQL Server <version>\lib\opt\libmysql.lib" mysql.pro
make
I manage to build it to my 64-bit Qt just fine using 64-bit MySQL dev files (using nmake). However, 32-bit build (with mingw-make) fails with linking problems:
Creating library file: c:\Coding\Qt\4.4.3\plugins\sqldrivers\libqsqlmysqld4.a
tmp/obj/debug_shared/qsql_mysql.o(.text+0x10d): In function `Z5codecP8st_mysql':
...lots of same stuff...
The dev files installed by MySQL 5.1 32-bit and 64-bit library are also different: the 64-bit includes libmysql.dll and six .lib files, while 32-bit includes those plus six .pdb files. Relevant to this issue?
Is anyone able to build the 32-bit plugin with Qt 4.4.3/MinGW using MySQL 5.1? Suggestions?
use mysql-noinstall-5.1.14-beta-win32