B4J Question Jar Executable

tdocs2

Well-Known Member
Licensed User
Longtime User
Greetings.

Newbie question, most likely.

I completed a small app in B4J.
I copied the jar executable to another PC.
I double clicked on the jar file and nothing happens.

Obviously, I must be missing a step.

Your help is always appreciated.

Sandy
 

tdocs2

Well-Known Member
Licensed User
Longtime User
Thank you, Giga.

It is a jar.

I have to check JAVA.

If it is an exe, does JAVA still has to be present?

Sandy
 
Upvote 0

Roycefer

Well-Known Member
Licensed User
Longtime User
If you package it into an exe with Launch4J then Java still needs to be present on the target computer. Open the windows console and type
B4X:
java -version
That will tell you what the latest Java version that is installed on that computer. Then, from the console, type
B4X:
cd C:\Directory\where\jar\is\stored
java -jar MyJar.jar
where MyJar.jar is the name of your jar file. There, in the console, you'll be able to see any exceptions thrown or error messages generated when you run your jar file.

It is possible to package your jar into an exe with an embedded JRE, freeing you from having to have Java on the target computer. Check the tutorials forum for Erel's rundown on how that works.
 
Last edited:
Upvote 0

giga

Well-Known Member
Licensed User
Longtime User
Thank you, Giga.

It is a jar.

I have to check JAVA.

If it is an exe, does JAVA still has to be present?

Sandy
@Roycefer is correct you could either distribute it as a .EXE or a .JAR If you package it would make it allot easier in the end.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…