How to get things to download as java files






















This would translate to a simple code below:. BufferedInputStream ; import java. It is recommended to use its overloaded version with connection and read timeout parameters. FileUtils ; import java. File ; import java. Average rating 4. Vote count: 8. No votes so far! Be the first to rate this post. Primary Primary. Skip to content.

This post will discuss how to download a file from a URL in Java. I like playing Minecraft, and I like to play with friends. So I tried to download the sever. It asked me if I wanted to save, open, or save then open. I clicked open it brought me back to the same page. Why did this download not download as a java. Please help. This is my second time hopefully you can help get it fixed.

This thread is locked. You can follow the question or vote as helpful, but you cannot reply to this thread. I have the same question Report abuse. Details required :. Cancel Submit. Previous Next. I would like to help you. Let's try with the save option, please. Let me know, please. If you open a command window, and type java -version does it say something? Also, instead of posting on a thread over a year old, you should create a new thread, your issue could be different even though it looks the same.

You can post now and register later. If you have an account, sign in now to post with your account. Note: Your post will require moderator approval before it will be visible. Restore formatting. Only 75 emoji are allowed. Display as a link instead. Clear editor. Upload or insert images from URL. By Ganoss Started 3 hours ago. By HomelessHobo Started 3 minutes ago. By mclich Started Tuesday at PM. By basykung Started 1 hour ago. By using this site, you agree to our Privacy Policy.

Currently Supported: 1. X Latest , 1. X LTS. Java and you: How to avoid crashes. Will not download as JAVA file. Share More sharing options Followers 0. Related Articles.

Article Summary. Method 1. Install Java on your computer if it isn't installed. You can't run JAR files without Java installed on your computer. You may have to restart your computer for Java to be fully implemented. Double-click the JAR file.

If it's executable and you have Java installed, it should open. If it doesn't open, proceed to the next step.

You may see a pop-up window asking which program you want to use to open the file. Make sure your JAR file is an executable file. JAR files that you download in order to set up programs are different from "library" JAR files, which store data that a program running Java can use.

For example, many of the JAR files in a program's data folders are not executable files. If you downloaded your JAR file from online, make sure you clicked the Windows version of the file rather than the Mac version. Update Java. If your JAR file produces an error when you double-click it, you may need to update Java.

Double-click your JAR file again. If it doesn't open this time, the file you're trying to open isn't executable and thus cannot be "run" in the traditional sense. Method 2. Try double-clicking your JAR file. If double-clicking the file doesn't open it, proceed to the next step. If you downloaded your JAR file from online, make sure you downloaded the Mac version and not another operating system's version.



0コメント

  • 1000 / 1000