- Jun 6, 2020
- 11,559
- 4,422
With Java 8 you could run a jar on a Windows PC by double clicking on it. This does not work with OpenJDK so as I want to be able to quickly run some utility B4J programs easily without packaging them this is what I did.
1) I installed OpenJDK in a convenient place, mine is in 'C:\jdk-11', and set up B4J to use it.
2) I made an environment variable named 'OpenJdkPath' with the value of the OpenJDK path, in my case 'C:\jdk-11'.
3) I wrote and compiled a trivial program in Basic4ppc called 'RunSelfNamedJarJdk11.sbp' that looks at what its .exe is named and invokes javaw.exe to run a co-located jar of the same name. Your Basic4ppc won't do this as one of the mods to my own version is to pass its own exe name as args(0). However you can probably do this in any other language that can create an exe that can identify itself.
B4X:
1) I installed OpenJDK in a convenient place, mine is in 'C:\jdk-11', and set up B4J to use it.
2) I made an environment variable named 'OpenJdkPath' with the value of the OpenJDK path, in my case 'C:\jdk-11'.
3) I wrote and compiled a trivial program in Basic4ppc called 'RunSelfNamedJarJdk11.sbp' that looks at what its .exe is named and invokes javaw.exe to run a co-located jar of the same name. Your Basic4ppc won't do this as one of the mods to my own version is to pass its own exe name as args(0). However you can probably do this in any other language that can create an exe that can identify itself.
B4X:
کد:
محتوای بلوک کدها در دسترس شما نیست. برای مشاهده بلوک کدها، وارد انجمن شوید یاثبت نام کنید
برای دیدن لینک ها باید ثبت نام کنید
برای دیدن لینک ها باید ثبت نام کنید