tdocs2 Well-Known Member Licensed User Longtime User Aug 10, 2015 #1 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
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
giga Well-Known Member Licensed User Longtime User Aug 10, 2015 #2 Did you check if java was installed? Is it a .jar or .exe What does the icon for your executable look like? Upvote 0
Did you check if java was installed? Is it a .jar or .exe What does the icon for your executable look like?
tdocs2 Well-Known Member Licensed User Longtime User Aug 10, 2015 #3 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
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
R Roycefer Well-Known Member Licensed User Longtime User Aug 10, 2015 #4 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 Code: Copy java -version That will tell you what the latest Java version that is installed on that computer. Then, from the console, type Code: Copy 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: Aug 10, 2015 Upvote 0
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 Code: Copy java -version That will tell you what the latest Java version that is installed on that computer. Then, from the console, type Code: Copy 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.
tdocs2 Well-Known Member Licensed User Longtime User Aug 10, 2015 #5 Thank you, Royce. Is this what you mean? Best regards. Sandy Upvote 0
giga Well-Known Member Licensed User Longtime User Aug 11, 2015 #7 tdocs2 said: 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 Click to expand... @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
tdocs2 said: 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 Click to expand... @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.