Creating a Java-accessible Java program for everyone

I just wrote a program in Java. I am curious if I can make the program downloadable online so that my friends and family can use it. I don’t know where to start.

I would like it to run locally. I can run the program locally on my computer by simply double-clicking the .class file, I can also create a shortcut for the .class file and run it directly from my desktop. Is there a way to archive the .java file along with the .class files (there are 4 .class files) and email them to the ones I want to use? I tried sending an email with a zip file to another computer in the house, but the .class file did not run the program on another computer ... is there any other way to do this?

Any suggestions?

+4
source share
6 answers

Check out Java Web Start :

"Java Web Start software allows you to download and run Java applications from the Internet. Java Web Start software:

  • Provides easy one-touch application activation.
  • Ensures that you always use the latest version of the application program
  • Eliminates complex installation or upgrade procedures "
+11
source

Why don't you just upload the * .jar file to the web server and not let your friends upload it from there? if you want the program to be embedded in a web page, you must write a java applet.

+1
source

You can distribute the Jar executable itself, or if you are interested in installing it through a browser, you can also view the java web start.

0
source

If you have created a web application, you can host it on GAE , which is a really good way of online applications. If your application is a Java desktop application, simply upload it to any FTP / HTTP server.

Another solution is to use the java web start style, which will allow users to download the application and launch it directly from the browser.


Resources:

In the same topic:

0
source

Unfortunately, Java is not the best language for sharing the application "with family and friends."
Basically, if you want them to be able to run the program, you first need to create a jar, and they need to install the JRE and run it from the command line. A really good option is to use something like Launch4J , which will help you create β€œnative” executables with a built-in JRE or a link to download it, an icon, an installer, and everything that makes your program more professional and less hobby.

0
source

It is possible. Suppose that [yourclass] is the name of the primary class (the name of the class file you double-click on), and [appname] is what you want for your application. Both are case sensitive. Just follow these steps:

1) enter an empty file named "manifest.mft".

2) write in manifest.mft:
"Manifest Version: 1.0
Main-Class: [yourclass]
Class path :.
"

3) create an empty file called "run.bat"

4) write in run.bat: "java -jar [appname] .jar"

5) first you need to compile your .java file: "javac [file] .java"

6), then you need to pack all the class files and the manifest file into a jar file:
"jar cvfm [appname] .jar manifest.mft * .class"

7) all you have to do is send the [appname] .jar and run.bat that you want, and all they need to do is double-click the run.bat file to launch your program. They must have the JRE installed and the bin foder from the JRE in the Windows PATH system variable.

0
source

All Articles