Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Java 

[Java] Print text to cmd?

Hi HF!

I’m new to java and I just created a semi advanced scientific calculator for my programming class (I know it’s really basic but I started with java a few weeks ago, my teacher is also super slow) so everything print out to the console using the
PHP Code

<?php 
System
.out.println("Hi HF"); 
function.

When I compile the program into a jar file, it does nothing since Windows doesn’t have a console.

I’d like to be able to print text to cmd and input text as well. I have to use windows since my teacher doesn’t allow any other OS in class except windows or OSX (Kind of because I like Ubuntu)

Before you guys tell me to look it up on google. I’ve looked it up but none of the guides are working for me or I don’t know how to use the code since I’m a noob with java.

Thanks for any help!
what the fuck
https://docs.oracle.com/javase/7/docs/ap...m.html#out - System.out IS the "cmd".
Windows does have a "console", it's called the command prompt.
What you're experiencing is the fact that Java does not make its OWN console for execution, which is correct. It instead pipes stdin, stdout and stderr. If Java didn't have a standard implementation for this, then running it on different platforms would be garbage.
Open up cmd, and type
[/b]java -jar myJarFile.jar[/b]
New to trading cryptocurrencies but don't know where to start? Join Binance here! Binance is my favourite exchange for cryptocurrencies w/ low fees.

[Image: 793854efd3c9ee7d90ddd413ae9deed6.png]
(Oct 13, 2016 12:10 PM)Chickendipper Wrote:  what the fuck
https://docs.oracle.com/javase/7/docs/ap...m.html#out - System.out IS the "cmd".
Windows does have a "console", it's called the command prompt.
What you're experiencing is the fact that Java does not make its OWN console for execution, which is correct. It instead pipes stdin, stdout and stderr. If Java didn't have a standard implementation for this, then running it on different platforms would be garbage.
Open up cmd, and type
[/b]java -jar myJarFile.jar[/b]

Thanks for the help and clearing up a few things!


Possibly Related Threads...
Thread / Author Replies Views Last Post
[C] by ShallowMEFeb 17, 2020 07:08 PM 20 523 Feb 17, 2020 07:08 PM
Last Post: 0xDEAD10CC
[Java] by cryptobassboostMay 20, 2019 11:49 AM 4 249 May 20, 2019 11:49 AM
Last Post: bluriy
[Python] by F.A.S.TApr 15, 2019 01:25 PM 0 78 Apr 15, 2019 01:25 PM
Last Post: F.A.S.T