Questions tagged [java-console]
20 questions
1
vote
1 answer
System Outs and Un handled exceptions from Java App is not having a timestamp when logged
Need help here. We have java apps started from our shell scripts in unix using java command and the output is redirected to a nohup file to ensure we capture any SystemOuts and any unhandled exceptions in a log file.
When the java app logs using the…

Achilles
- 45
- 1
- 1
- 5
1
vote
4 answers
Align a String to the right using printf in Java
I need to right justify the next output using Java:
class MyTree {
public static void staircase(int n) {
String myGraph = "#";
for(int i=0; i

htamayo
- 335
- 3
- 16
1
vote
0 answers
Is there a best way to print a nicely formatted table in java console application?
I have been working on a java console application and I've got a lot of data to print in a tabular way,
and I am wondering if there is any good way to do it instead of hard coding it which sometimes doesn't work for some data according to the data…

Felix DUSENGIMANA
- 11
- 1
- 4
1
vote
2 answers
How do I run a javascript command in WKWebView Swift
I am trying to run a javascript command that works if I run it in the console on the web. I have tried doing the code below, but I keep getting nil as my response.
webView.evaluateJavaScript("command") { (result, error) in
if error == nil {
…

Ze_Reid
- 21
- 1
- 6
1
vote
0 answers
Console Application Terminal UI with separate "windows"
I'm building java based console application where I need two windows of it. First window is for output and the second one will be used for entering commands for stopping application, restarting or something like it, nothing too big, just a simple…

iMajna
- 489
- 4
- 28
1
vote
1 answer
Java/Ubuntu - Print outside of main works on Windows but does nothing on Ubuntu 14.04
I have an Intellij project. I compile ('Make') it on Windows, and sends it onto a Ubuntu 14.04 remote server, running Java 1.8.
My problem is that the System.out.println() outside of the main method prints nothing.
I've spent a few hours on this…

Maxime Flament
- 721
- 1
- 7
- 24
0
votes
0 answers
Unable to read data from Java Console class. (I'm using Eclipse to run it!!)
I'm unable to run this code correctly.. Please help me out
public static void main(String[] args){
Console console = System.console(); // unable to fetch anything. It returns null
if (console == null) {
…

Saket Kumar
- 3
- 2
0
votes
2 answers
Is there any way to display all information about an Object, to the console(in eclipse)
Is there any way, to log information about all data members of an object to the console, in a similar fashion to JS in chrome?
Like how we get all information related to an object at a place in Chrome.

Code Hard
- 43
- 4
0
votes
1 answer
Adding Parent and Child Data in One Transaction in Hibernate
I am writing a sample java console application that writes data in hibernate. All hibernate configurations has been done. Here is the class structure of the project:
public class DBUser implements Serializable {
private static final long…

tahasozgen
- 469
- 5
- 27
0
votes
0 answers
Java console app jar - Handle Exception and continue in windows command prmpt
I have a Console Java Application in maven, infinite loop
I have handle exception in java
public class MyClassName {
public static void main(String[] args) {
while (true) {
start();
}
}
…

Bhesh Sejawal
- 558
- 2
- 7
- 22
0
votes
2 answers
How to refer to a file inside spring boot application jar as a -D property value while starting the app from command line?
I have a simple spring boot application that needs java.security.krb5.conf property value set to a custom krb5.conf file. I have added the file inside the src/main/resources folder and maven make it packaged into the jar.
to start the app , I…

Arun K
- 25
- 1
- 7
0
votes
0 answers
What does "finalize objects on finalization queue" do?
When I open the Java Console in Java SE 7 Update 76, I'm shown a list of keyboard shortcuts I can use for debugging. The shortcut for F is labeled finalize objects on finalization queue.
When I run this shortcut, it prints the following information…

Stevoisiak
- 23,794
- 27
- 122
- 225
0
votes
1 answer
Java Console closes too on startup, so it's impossible to see what startup error may jnlp app has. How to see its output?
I'm running a Java application as a jnlp and sometimes, when a problem occurs during startup it will spit something out to the Java Console and close. But it closes so fast that I can't actually see anything at all.
Is there some way to see this…

devoured elysium
- 101,373
- 131
- 340
- 557
-1
votes
2 answers
Is it possible to show an image in Java console?
I want to make a Java application that shows an image in the console, but I cannot find anything on the topic. How would I do this?

FrederickAmpsUp
- 23
- 7
-1
votes
2 answers
How to compile several classes in one ,java file
I would like to compile in a java source file with two classes. How can I do that? I compile my code with:
javac -classpath Class_ex_1.java
public class Class_ex_1 {
public static void main(String[] args) {
int del = 7;
…

Bilow Yuriy
- 1,239
- 3
- 13
- 20