Java isn't installed - Do you want to install it - Error

Hi,

I am building a windows installer for a blockchain based on nxt-clone-starter.

I managed to build it thanks to the help of @lior.yaffe in this topic: win-release-package.sh creates a corrupted nxt-client-1.12.2.jar file - #14 by TimmyTendies

It works good in my laptop, where Java is installed. But when someone else without java tries he gets this error message:

image

It happens when opening the main exe file. I checked the installed folder it has jdk and javafx-sdk in it.

If you want to give a try here is the installer:

Best regards,

HELLO
try this

Hi @manieqq

I did follow this and even the advices of @lior.yaffe since some of this instructions have slightly changed in the version 1.12.2.

I managed to create the installer, nevertheless the final executable after installation gives this error (in someone's computer that does not have Java, it works in mine).

Open the command line cmd.exe and cd to your installation folder (C:\Program Files\NXT or similar)

From there issue the command
jdk\bin\java -Dnxt.runtime.mode=desktop -jar nxt.jar

Your node should start correctly and after loading the genesis block start the wallet.

Now, stop the node by pressing Ctrl+C

Then run nxt.exe from the same command line.

Does it start the node?

This works

jdk\bin\java -Dnxt.runtime.mode=desktop -jar VcashPay.jar

But running VcashPay.exe directly from the terminal gives the error below.
photo_2021-04-28_12-18-24

And running this also:

C:\Program Files\VCP>jdk\bin\java -Dnxt.runtime.mode=desktop .\VcashPay.exe
Error: Could not find or load main class .\VcashPay.exe
Caused by: java.lang.ClassNotFoundException: /\VcashPay/exe

Am I doing it wrong?

@lior.yaffe any insight on it?

Rename resource\nxt.properties to resource\VcashPay.properties
i.e. the name of the properties file in the resource folder must match the name of the exe file.

Hi,

I tried on my laptop where it worked already, when I rename it VcashPay.properties it doesn't work it says something like JVM not found. With nxt it works on my laptop. But it didn't work on my client's laptop. Same error than above.

I am not sure what to do :confused:

Thanks,

I also tried, to copy paste the jdk and javafx-jdk folders from the NXT installed wallet to the VcashPay folder and it didn't resolve the issue.

Renaming the files as you suggested didn't solve the issue.
I tried to find in the code where the resource\nxt.properties file is called to check/change it but couldn't find it.

Do you have any other idea of how to fix this issue?
In case you need the sourcecode of the wallet is here: GitHub - regedittap/VcashPay-core: VcashPay blockchain

When you say this do you mean before compiling the wallet?
I only tried to rename once the wallet installed.