Try repl.it or BrowXY (both linked in our sidebar) - they allow multiple files. Answer from desrtfx on reddit.com
🌐
Physics Forums
physicsforums.com › other sciences › computing and technology
Online compilers that will run code that features TextIO? • Physics Forums
November 18, 2022 - Hi everyone I've been trying to teach myself coding using the free materials from https://math.hws.edu/javanotes/index.html I've been using online compilers because I got a "Error: Could not find or load main class" message immediately upon installing Eclipse. The online compilers work for some solutions, but won't run others. https://www.programiz.com/java-programming/online-compiler/ is one such compiler.
🌐
Quora
quora.com › Which-is-the-best-Java-online-compiler
Which is the best Java online compiler? - Quora
Answer (1 of 3): Why do you want an online Java compiler? What is your use case? The web based answers above/below are great if you want to quickly test something. My preference is Ideone.com. But no so great if you want to compile a large project, but don’t want to do so locally.
Discussions

How to make two files within one project in an online compiler?
Please ensure that: Your code is properly formatted as code block - see the sidebar (About on mobile) for instructions You include any and all error messages in full You ask clear questions You demonstrate effort in solving your question/problem - plain posting your assignments is forbidden (and such posts will be removed) as is asking for or giving solutions. Trying to solve problems on your own is a very important skill. Also, see Learn to help yourself in the sidebar If any of the above points is not met, your post can and will be removed without further warning. Code is to be formatted as code block (old reddit: empty line before the code, each code line indented by 4 spaces, new reddit: https://imgur.com/a/fgoFFis ) or linked via an external code hoster, like pastebin.com, github gist, github, bitbucket, gitlab, etc. Please, do not use triple backticks (```) as they will only render properly on new reddit, not on old reddit. Code blocks look like this: public class HelloWorld { public static void main(String[] args) { System.out.println("Hello World!"); } } You do not need to repost unless your post has been removed by a moderator. Just use the edit function of reddit to make sure your post complies with the above. If your post has remained in violation of these rules for a prolonged period of time (at least an hour), a moderator may remove it at their discretion. In this case, they will comment with an explanation on why it has been removed, and you will be required to resubmit the entire post following the proper procedures. To potential helpers Please, do not help if any of the above points are not met, rather report the post. We are trying to improve the quality of posts here. In helping people who can't be bothered to comply with the above points, you are doing the community a disservice. I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns. More on reddit.com
🌐 r/javahelp
8
1
July 26, 2022
Online Java programing IDE with support for multiple files - Code.org Professional Learning Community
I’m looking for some help, but it is not with Code.org to be honest. I teach a java programing class virtually, and I have a couple of students that have very limited computing resources. Does anybody know of an online resource that will allow java programing and compiling with multiple files. More on forum.code.org
🌐 forum.code.org
0
February 6, 2024
Any free, or cheap, online compilers for Python and Java?
Not a compiler but it seems like you are trying to make a version of repl.it More on reddit.com
🌐 r/Compilers
15
0
October 13, 2023
java - Solving mismatch exceptions only appearing in one compiler - Stack Overflow
This is for an online assignment. The goal is to accept two inputs (in this code, the x and y variables) multiple times and then print the largest and smallest value of each variable. Here is the c... More on stackoverflow.com
🌐 stackoverflow.com
🌐
OneCompiler
onecompiler.com › html
HTML Online Editor (Compiler, Interpreter & Runner)
OneCompiler's HTML online compiler helps you to write, compile, run and view HTML code online. It also supports CSS and JavaScript
🌐
Google Play
play.google.com › store › apps › details
Compile Java - Run .java Code - Apps on Google Play
Features : 1. Compile & Run - Compile & Run Java Programs 2. Code Editing & Syntax Highlighting - Enables you to edit code and automatically detects and highlights syntax 3. Exercise Questions - Exercise questions to help you improve your knowledge 4. Programs with Code - All the general DSA programs with code 5. Fun Facts - Some fun facts about programming and computer science This app is brought to you by the company OnePercent, based in Bangalore, India.
Rating: 3 ​ - ​ 292 votes
🌐
Ideone
ideone.com
Online Compiler and IDE >> C/C++, Java, PHP, Python, Perl and 70+ other compilers and interpreters - Ideone.com
Ideone is something more than a pastebin; it's an online compiler and debugging tool which allows to compile and run code online in more than 40 programming languages.
🌐
NextLeap
nextleap.app › online-compiler › java-programming
NextLeap - Online Java Compiler
Experience the power of Java with NextLeap's Java Online Compiler. Write, compile, and debug Java code online in real time.
Find elsewhere
🌐
OneCompiler
onecompiler.com › java
Java Online Compiler
Write, Run & Share Java code online using OneCompiler's Java online compiler for free. It's one of the robust, feature-rich online compilers for Java language, running on Java 25. Getting started with the OneCompiler's Java editor is easy and fast.
🌐
Sololearn
sololearn.com › en › Discuss › 126629 › hey-guys-im-trying-to-compile-my-1st-java-program-can-someone-help-me-with-my-most-recent-error-below-thanks-
Hey guys I'm trying to compile my 1st Java program, can someone help me with my most recent error below. Thanks | Sololearn: Learn to code for FREE!
An IDE may be a standalone application, or it may be included as part of one or more existing and compatible applications.... Credits to google. ... OK thanks guys, here's my code public class ExampleProgram2 { public static void main (String[] ...
🌐
Code.org
forum.code.org › t › online-java-programing-ide-with-support-for-multiple-files › 39279
Online Java programing IDE with support for multiple files - Code.org Professional Learning Community
February 6, 2024 - I’m looking for some help, but it is not with Code.org to be honest. I teach a java programing class virtually, and I have a couple of students that have very limited computing resources. Does anybody know of an online…
🌐
UnoGeeks
unogeeks.com › home › blog › one compiler java
One Compiler Java
December 26, 2023 - In Java, you typically use the ... bytecode, which can be executed on the Java Virtual Machine (JVM). There is no single “one compiler” for Java; instead, you use the standard JDK tools for compiling Java progr...
🌐
OneCompiler
onecompiler.com
OneCompiler - Write, run and share code online | Free online compiler with 100+ languages and databases
One Compiler helps over 12.8 million users worldwide write code online. PopularProgrammingWebDatabases · HTML · Python · JavaScript · Java · MySQL · C · C++ PHP · C# Assembly · Lua · PL/SQL · NodeJS · MongoDB · Groovy · React · PostgreSQL · Ruby · Embed our Editor & Challenges ...
🌐
Reddit
reddit.com › r/compilers › any free, or cheap, online compilers for python and java?
r/Compilers on Reddit: Any free, or cheap, online compilers for Python and Java?
October 13, 2023 -

I'm trying to make an online editor and compiler for my students to run code on. Yes, there are some out there but they don't fit my needs.

I've been able to use OneCompiler's API through RapidAPI but it costs a bit too much. Is there an open source compiler I can run on a server and connect to? I've tried use Codex-API but can't get the darn thing to work. It needs me to setup a docker container and such but I get errors. Not sure if it's a me thing or not so I'm looking for guidance from y'all with other possible solutions that I might be missing. Thanks.

🌐
Programiz
programiz.com › java-programming › online-compiler
Online Java Compiler - Programiz
// Online Java Compiler // Use this editor to write, compile and run your Java code online class Main { public static void main(String[] args) { System.out.println("Try programiz.pro"); } }
🌐
OnlineGDB
onlinegdb.com › online_java_compiler
Online Java Compiler - online editor
/****************************************************************************** Online Java Compiler. Code, Compile, Run and Debug java program online. Write your code in this editor and press "Run" button to execute it.
🌐
JDoodle
jdoodle.com › online-java-compiler
Online Compiler and Editor/IDE for Java, C, C++, PHP, Python, Ruby, Perl - Code and Run Online
JDoodle is an Online Compiler, Editor, IDE for Java, C, C++, PHP, Perl, Python, Ruby and many more. You can run your programs on the fly online, and you can save and share them with others. Quick and Easy way to compile and run programs online.
🌐
OneCompiler
onecompiler.com › javascript
JavaScript Online Compiler & Interpreter
OneCompiler's JavaScript online editor helps you to write, compile, debug and run JavaScript code online
Top answer
1 of 2
2

The error trace seems to indicate that the InputMismatchException is thrown when scan.nextInt() is called.

After your print System.out.println("Would you like to enter another location?");, if the user inputs anything other than an integer, scan.nextInt() will throw an exception. Even if you read the user's input as a string as suggested by someone else, the parseInt method in escape = Integer.parseInt(scan.nextLine()) will throw an error because the string may not be a valid integer.

I suggest adding try-catch block as follows around the scan.nextInt() call so that your program doesn't crash when a user inputs something other than a valid integer (like the number 8.238).

boolean inputValid = false;
System.out.println("Would you like to enter another location?");
while (!inputValid) {
    try {
        escape = scan.nextInt();
        inputValid = true;
    } catch (InputMismatchException e) {
        inputValid = false;
        System.out.println("Please enter a valid Integer");
    }
}

This code will continue asking the user until the user enters a valid integer.

2 of 2
1

It might be because the online scanner's implementation of nextInt() is different and is causing the problems.

Perhaps trying to parse the input as a string and the as a double/int would work:

Scanner scan = new Scanner(System.in);
double x; // the latitude input
double y; // the longitude input
double n = -90; // the maximum north value
double e = -180; // the maximum east value
double s = 90; // the maximum south value
double w = 180; // the maximum west value
int escape = 1; // the value that dictates when it's time to exit the
// while loop
while (escape == 1) {
    System.out.println("Please enter the latitude:");
    x = Double.parseDouble(scan.nextLine());
    System.out.println("Please enter the longitude:");
    y = Double.parseDouble(scan.nextLine());
    if ((x > n) && (x <= 90))
        n = x;
    if ((x < s) && (x >= -90))
        s = x;
    if ((y > e) && (y <= 180))
        e = y;
    if ((y < w) && (y >= -180))
        w = y;
    if ((x > 90) || (x < -90) || (y > 180) || (y < -180))
        System.out.println("Incorrect Latitude or Longitude");
    System.out.println("Would you like to enter another location?");
    escape = Integer.parseInt(scan.nextLine());
        }
System.out.println("Farthest North: " + n);
System.out.println("Farthest South: " + s);
System.out.println("Farthest East: " + e);
System.out.println("Farthest West: " + w);

Again, this depends on the online scanner's way of doing things.

🌐
CodeChef
codechef.com › java-online-compiler
Online Java Compiler and Visualizer
Welcome to our AI-powered online Java compiler and interpreter, the perfect platform to run and test your Java code efficiently. Our tool makes coding easy for developers of any skill level, whether you're a beginner or experienced.
🌐
W3Schools
w3schools.com › java › java_compiler.asp
Java Online Compiler (Editor / Interpreter)
With our online Java compiler, you can edit Java code, and view the result in your browser.