Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run a java executable file on other computer

I made a small application using Java Swings and then created a jar file of the project using 'clean and build' option in Netbeans. Then, I converted that .jar file in a .exe file using the software 'Launch4j' and it was perfectly running on my laptop. However when I tried running that exe file on other laptop. It displayed the error: Class NewJframe.firstfile couldnot be found. ( I made the database on the other laptop also with MySql Connection).

Please help me clarify why I am getting this error. Also, I would like to know what all are the requirements to run an .exe file on other computer which I made from a .jar file?

like image 875
user1502308 Avatar asked Mar 17 '26 17:03

user1502308


2 Answers

I would pretty much expect something like Launch4j to take care of all your packaging requirements; did it give you options to "include all dependencies" that you didn't click "YES" to...?

It sounds like it's packaged your app, but possibly not the Java runtime envt it needs to run your app.

like image 167
Brian Avatar answered Mar 19 '26 07:03

Brian


Try giving him the JAR file and see if he can run that. If he can, It's a problem with Launch4j, if he can't it's a problem with Java.

Alternatively try something like Excelsior JET instead.

like image 24
Mikkel Løkke Avatar answered Mar 19 '26 07:03

Mikkel Løkke



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!