B4J Question [SOLVED] Change Javac automatically before compile - or better?

rosippc64a

Active Member
Licensed User
Longtime User
Hi All,
I use java 11. I have a large developing project, works well, but now I encountered a problem, because I suppposed nowadays all customer use 64bit op. system. Bad idea.
So I am hesitating, should I tell the customer to reinstall his windows system to 64bit (reinstalling all used program, settings, etc), or I do something (as a good supplier) to make double version and create a 32bit version also.
So if I modify something in my program, I have to pay attention to make immediately two version, and I have to change the javac path in configure paths.
I found the b4jbuilder what would be good in a batch file running twice with two configuration, one for java 11 and other for java 8.
But I can't tell for the b4jbuilder what javac version I want to use, therefore I think may I can change it in b4xV5.ini, in the c:\Users\User\AppData\Roaming\Anywhere Software\B4J\ folder.
It is a bit dirty solution, but I have no other idea actually.
Had somebody of vou similar problem?
 

rboeck

Well-Known Member
Licensed User
Longtime User
I have the same problem; because i use the packager, i have to use packager 1.5 and the integrated packager. In my app i have to switch between jControls and jControls9.
 
Upvote 0

rosippc64a

Active Member
Licensed User
Longtime User
It would be nice, if selected libs would depend by build configurations, even though we could set the used java compiler by conditional directive!
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
 
Upvote 0

rosippc64a

Active Member
Licensed User
Longtime User
Many thanks Erel, works like a charm!
I completed like this to set the conditional directive and set the output jar name:
B4X:
'Compile with Java 8:  ide://run?file=%B4X%\ProjectCompiler.jar&VMArgs=-Db4x%3D%B4X%&Args=-Task%3DBuild&Args=-BaseFolder%3D..&Args=-Configuration%3DDefault_32bit&Args=-Output%3DLSZAMLAW32.jar&VMArgs=-Djavabin%3DC:\Program+Files\Java\jdk1.8.0_201\bin
'Compile with Java 11: ide://run?file=%B4X%\ProjectCompiler.jar&VMArgs=-Db4x%3D%B4X%&Args=-Task%3DBuild&Args=-BaseFolder%3D..&Args=-Configuration%3DDefault_64bit&Args=-Output%3DLSZAMLAW64.jar&VMArgs=-Djavabin%3DC:\java\jdk-11.0.1\bin
thank you again!!!
 
Upvote 0
Top