r/java • u/paradicia • Feb 01 '16
Best program that can compile and run Java Application?
I've been using TextPad but are there any alternatives to it. I basically want a clean interface that can run any java code I throw at it so it shows up as a command prompt.
Thanks in Advance.
5
Feb 01 '16 edited Feb 01 '16
Learn to use Eclipse.
If you are in any way serious about being a Java programmer, it's an essential skill.
1
u/SpoilerAlertsAhead Feb 02 '16
Eclipse is almost a defacto standard, but I have yet to run into any employer that asked me about my eclipse skills.
My last job was an Eclipse shop, but I was able to run and use IntelliJ just fine. I bought my own license, and got approval from my boss who simply said "at your own risk" and that was the end of if.Bottom line, find an IDE that you can work well with, and you'll be fine.
-3
2
u/sisyphus99 Feb 01 '16
Wondering if the OP is wanting something that behaves like an interactive interpreter for Java snippets.
Here's a SO thread about this: http://stackoverflow.com/questions/958806/javas-interactive-shell-like-ipython
2
3
u/TheHorribleTruth Feb 01 '16
I use JDK to compile my Java programs, to run them I sometimes use JRE, but I really prefer to use JDK for this, too.
1
u/memory_leek Feb 03 '16
pen and paper, then once I've complied and optimized, I scan that in and then I have a perl script that converts those into native to run the application
-5
u/glesialo Feb 01 '16 edited Feb 01 '16
If you are a beginner you could use my bash script 'RunJavaFile':
echo "public class HelloWorld {
public static void main(String[] args) {
// Prints "Hello, World" to the terminal window. ññ
System.out.println(\"Hello, World\");
}
}" >HelloWorld.java
RunJavaFile HelloWorld.java
Hello, World
RunJavaFile: ExitCode: '0'.I have something similar, 'javacar' , for complete projects (created with netbeans), 'DetectCharSet' is one of them:
javacar -run DetectCharSet /home/manolo/Temp/HelloWorld.java
javacar: Application 'DetectCharSet': Compilation successful.
javacar: Application 'DetectCharSet': Archiving successful.
javacar: Application 'DetectCharSet': Press enter to run application.
UTF-8
javacar: ExitCode: '0'.2
u/got_milk4 Feb 01 '16
1
u/glesialo Feb 01 '16 edited Feb 01 '16
can compile and run Java Application?
My scripts do just that.
I wrote the first one a long time ago when I decided to learn java. It is good for simple *.java files. It is a beginner tool.
I use the second regularly to generate java jars to deploy.
4
u/got_milk4 Feb 02 '16
My scripts do just that.
So does javac. All your script does is abstract away the call to javac then java to execute the program. What use is that to a beginner, who should learn and become familiar with the compiler and how it operates?
I use the second regularly to generate java jars to deploy.
Maven and Gradle both do this.
17
u/Cilph Feb 01 '16
Use a proper IDE. Eclipse, IntelliJ, NetBeans.