I completed a Java Project(with back end MySQL) i clean and build the project.now a jar file is obtained.i want to run this jar file on an other computer which does not have java.So the JAR file may not run.How can i solve this problem.? Can it solve by converting the JAR file into .EXE? then where i keep project back end(MySQL).? is there any possibility to store the back end as a *txt * file.?
You have to have Java installed to run a jar file, just like you have to have .NET installed to run C# code. You could have your installer install a JVM if necessary (install4j does this), or you could compile your program to a native executable (like with Excelsior JET). If you’re using MySQL, then your program will have to have access to some MySQL database; if your SQL is sufficiently standard, you could use an embedded database like H2.
A Web site can be hosted from any computer, but if there’s no Internet connection, how would anyone connect to it? Java can run a Web server (such as embedded Jetty or Tomcat), but it seems like you really need to learn from the beginning about Java Web applications, which are written in a very different style from GUI applications.