Can any body please tell me what code is used for clear screen in Java? For example in C++
system("CLS");
What code is used in Java for clear screen?
Thanks!
Is there any way to access the Windows Event Log from a java class. Has anyone written any APIs for this, and would there be any way to access the data from a remote machine?
The scenario is:
I run a process on a remote machine, from a controlling Java process.
This remote process logs stuff to the Event Log, which I want to be able to see in the controlling process.
Thanks in advance.
I've never seen a good list of free Java libraries.
What are some of your can't-live-without Java libraries?
Note: to keep this poll as useful as possible, please remember:
Post only one library per answer
We don't want duplicate answers, so before posting check if the library has been mentioned already
When adding a new library, provide a short summary of what it does / why you think it's useful
I was reading that JavaDoc for Threadlocal here
http://java.sun.com/j2se/1.5.0/docs/api/java/lang/ThreadLocal.html
and it says
"ThreadLocal instances are typically private static fields in classes that wish to associate state with a thread (e.g., a user ID or Transaction ID). "
But my question is why did they choose to make it static (typically) - it makes it a bit confusing to have "per thread" state but its static?
So I have to send a java project to someone outside our company who has no experience with java and they need to compile it. Is there an easy way to do it on the windows command line that does not require writing out lists of the files?
Personally I think javac should be smart enough to handle
javac *
when in the folder just under the root of the package hierarchy. Is there anything in this ballpark?
How can i control calendar user interface in java? My current project needs to provide calendar in web. User can control public holiday, block day and so on when client choose to book. So i need to provide calendar control with java. If anyone have idea, pls help me to solve. Thanks.
Regards,
leo
Hello guys.
I have a problem.
How i can run my java-applet directly without embedded in my web page?
I know appletViewr can execute applet without a browser but I need to get java applet without html page.
Just started to getting familiar with graphics in Java.
What is the simplest way to draw primitives (lines, rectangles) in Java without OpenGL (JOGL)?
Looking for methods like putPixel, lineTo, etc.
Hi..........
I am creating a notepad application in Java.I have created the text area also the menus .I have a menu called "EDIT" and under that I have "UPPERCASE"..If i select a particular text and click on "UPPERCASE" ,I want the string to be converted into uppercase.
Can anyone tell me how to implement this in Java.
How to connect to MYSQL DB from Java, create table, insert data, retrieve it with datatypes.
How to make use of the data to/from in Flex application.
plz help me out..
i have basic knowledge in sending and receiving messages using BlazeDS.
and calling JAVA METHODS USING ...
I am currently developing a java program where I need to show the difference between two text.
Is there any library available for visually show the difference, that is the diff output in my java program or how can I do so. Any suggestion will be very helpful for me.
Does anyone know a Library which provides a Thread.sleep() for Java which has an error not higher than 1-2 Millisecond?
I tried a mixture of Sleep, error measurement and BusyWait but I don't get this reliable on different windows machines.
It can be a native implementation if the implementation is available for Linux and MacOS too.
EDIT
The link Nick provided ( http://blogs.sun.com/dholmes/entry/inside_the_hotspot_vm_clocks ) is a really good resource to understand the issues all kinds of timers/sleeps/clocks java has.
I would like to start learning Java, but there are so many resources out there... I am having a hard time deciding which path to take. I saw a neat book, Objects First with Java, and I tested out Bluej and some tutorials. Anyone use this and have comments?
Hi,
A little help from you all...
I was trying to convert a simple java program into jar but nothing seems to happened.
I have 2 files: Tester.java , Tester.Class.
Then I used this command line:
jar -cvf Tester.jar Tester.class
The .jar file was created but nothing seems to work.
What did I missed?
thanks
Can any one clear me exactly what happend when we do import statement in java files. does it inscrease the size of file if we add more and more java classes.
why we dont use classloader for the same
and what are the restrictin for importing.
i wonder if the multi threading in python/ruby is equivalent to the one in java?
by that i mean, is it as efficient?
cause if you want to create a chat application that use comet technology i know that you have to use multi threading.
does this mean that i can use python or ruby for that or is it better with java?
thanks
HI
I like to know why there are two Date classes in two different packages one in java.util.Date and one in java.sql.Date?
Whats the use of having two Date classes?
After some googling an obvious answer or starting point for a Java IRC bot has not presented itself, my question; is there an existing framework to help me do build an IRC bot? Failing that, is this possible using Sockets in Java to do this and has anyone seen an example around the web?
cheers guys.
Hi!
I'm a c# guy giving Java a try .. so how would I do the following in java.
in C#
public T create_an_instance_of<T>(){
T instance = default (T);
// here's usually some factory to create the implementation
instance = some_factory.build<T>();
// or even..
instance = some_factory.build(typeOf(T) );
return instance;
}
hello fellow java developers,
Im trying toget the System.getProperty("os.name") of my own machine. I am running a java application directly from the machine from within eclipse.
My machine is "windows 7"
the returned value is "windows vista" ! Seems wrong, very wrong. and yes I am sure that I am running the app on a windows 7 machine...
Any ideas as to what is going on here?
I have a object store in Java. My C program stores data (in form of char array) in java. Now I wish to retrieve data from my store. I cannot find any function call that returns me an char array. How can I do this?
The advantages of immutable objects in Java seem clear:
consistent state
automatic thread safety
simplicity
You can favour immutability by using private final fields and constructor injection.
But, what are the downsides to favouring immutable objects in Java?
i.e.
incompatibility with ORM or web presentation tools?
Inflexible design?
Implementation complexities?
Is it possible to design a large-scale system (deep object graph) that predominately uses immutable objects?
I'm writing a .NET application that will make an RPC call to a Java application (via a message queue). The data sent in both directions will be large arrays of floating-point numbers. What is the best way to serialize them to send them across the wire? I'd like something more compact than text, but architecture-independent as the server may not be an x86 machine. The Java application can be changed as needed.