This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java appl

 
Rajeev Kadam
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can we write a java application without main which prints message on console
using System.out.println()??
 
Michael Yuan
author
Ranch Hand
Posts: 1427
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
no a j2me question. move to JiG (beginner).
 
Joel McNary
Bartender
Posts: 1824
Eclipse IDE Java Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do you write a java application without a main method? Are you talking about an applet?
In any case, I don't think that this is a possibility. If you somehow start your application through a means whereby it does not have a console window, you will have to redirect your System.out calls to have it display wherever you want. In order to diplay to a system console, you would have to know which console and other bits of system-level information that Java does not provide.
You could, of course, write your own console class and have the data directed there.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic