How to program a screensaver with java???
Hi all,
Can someone tell em how to program a screensaver with java, and how should i begin ? or maybe someone know any useful information source?
thanks a lot.
ck
A quick google search gives me, among lots of other things:
http://kevinkelley.mystarband.net/java/sava.html
Good luck
Lee
Similar Messages
-
How to connect oracle database with JAVA
how to connect oracle database with JAVA....
using j2sdk and Jcreator . which connector to use .. what are the code for that ..PLEASE .... Ask in an Oracle Java forum.
And read the documentaiton. There is a whole document devoted to doing that. http://download.oracle.com/docs/cd/B19306_01/java.102/b14355/toc.htm has examples.
PLEASE ... do not ask product questions in a forum which clearly has a title saying it is devoted to assisting with download problems. -
How can i create messenger with java tv API on STB
deal all.
how can i create messenger with java tv API on STB.
how can Xlets communicate each other?
how?
i am interested in xlet communications with java tv.
is it impossible or not?
help all..You can create a messenger-style application using JavaTV fairly easily. JavaTV supports standard java.net, and so any IP-based connection is pretty easy to do. The hard part of the application will be text input, but people have been using cellphone keypads to send SMS messages for long enough that they're familiar with doing this. This doesn't work well for long messages, where you really need a decent keyboard, but for short SMS-type messages it's acceptable.
The biggest problem that you need to work around is the return channel. Many receivers only have a dial-up connection, ties up the phone line and potentially costs people money if they don't get free local calls. Always-on return channels (e.g. ADSL or cable modem) are still pretty uncommon, so it's something that you nee to think about. Of course, if you do have an always-on connection then this problem just goes away.
This is really one of those cases that's technically do-able, but the infrastructure may not be there to give users a good experience.
Steve. -
How to control tcp connection with java tcp socket programing ??
Hi,
I am connecting a server as using java socket programming.
When server close the connection (socket object) as using close() method ,
I can not detect this and My program continue sending data as if there is a connection with server.
How to catch the closing connection ( socket ) with java socket programming.
My Client program is as following :
import java.io.PrintWriter;
import java.net.Socket;
public class client
public client()
* @param args
public static void main(String[] args)
Socket socket=null;
PrintWriter pw=null;
try
socket = new Socket("localhost",5555);
pw = new PrintWriter(socket.getOutputStream(),true);
int i=0;
while (true)
i++;
pw.println(i+". message is being send.");
Thread.sleep(5000);
} catch (Exception ex)
ex.printStackTrace();
} finally
try
if(pw!=null)pw.close();
if(socket!=null)socket.close();
} catch (Exception ex)
ex.printStackTrace();
} finally
}I changed the code as following. But I couldn't catch the EOFException when I read from the socket. How can I catch this exception ?
import java.io.BufferedReader;
import java.io.EOFException;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.Socket;
import java.net.UnknownHostException;
public class client
public client()
* @param args
public static void main(String[] args)
Socket socket=null;
PrintWriter pw=null;
BufferedReader bufIn=null;
InputStreamReader inRead=null;
InputStream in=null;
try
socket = new Socket("localhost",5555);
in = socket.getInputStream();
inRead = new InputStreamReader(in);
bufIn = new BufferedReader(inRead);
pw = new PrintWriter(socket.getOutputStream(),true);
int i=0;
while (true)
i++;
try
bufIn.readLine();
pw.println(i+". message is being send.");
System.out.println(i+". message has been send");
} catch (Exception ex2)
System.out.println(ex2.toString());
System.out.println(i+". message could not be send");
} finally
Thread.sleep(5000);
} catch (EOFException ex)
ex.printStackTrace();
} catch (InterruptedException ex)
ex.printStackTrace();
} catch (IOException ex)
ex.printStackTrace();
} finally
try
if(pw!=null)pw.close();
if(socket!=null)socket.close();
} catch (Exception ex)
ex.printStackTrace();
} finally
} -
How to run sscript shell with java program
Hi everybody,
i want to know how can i do to execute a script shelle (bash) with program java (if it s possible)
for example this script:
#!/bin/bash
echo "hello"
can i run it with java program or i have to make dome modifications .
thank you for your help in advance.Well, if you want to be portable across platforms, you should write as much code in Java as possible and not rely on native scripts (I'm sure your script is more complex than this 'echo' example ;-) ).
Having said that, you can use the java.lang.Runtime class and in particular its various exec() methods.
Try something like this:
Process p;
try {
p = Runtime.getRuntime().exec("myscript.sh");
} catch (IOException ioe) {
}You can then "interact" with the spawned process with the Process object returned by the exec method.
Note you need to have the appropriate security rights.
For more details, look at the API documentation here:
http://java.sun.com/j2se/1.4.2/docs/api/
hth,
-Alexis -
Hello,
How can I make a .scr file with my .class file in Java3D? And, another question is, How can I put the animation in fullscreen to do the screensaver?
ThanksHi,
a .scr file is the same a .exe file. In order to create a screen saver with java 3d, you must write a .exe file and rename it to .scr.
The .exe file has to start your java 3d programm. To do so, it must execute javaw with some command line arguments:
javaw -Dj3d.fullscreen=REQUIRED <pathToYourClass>orjavaw -Dj3d.fullscreen=REQUIRED -jar <yourJarFile>Note: as i know, the fullscreen mode is only available in the DirectX version.
Ok. Let's assume the name for your java main class is "saver.SaverMain" and you are programming in C, then the main method would look like this:
int WINAPI WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
INT nCmdShow)
MSG msg;
HANDLE hAccelTable;
hInst = hInstance;
if (!InitApplication())
return 0;
hAccelTable = LoadAccelerators(hInst,MAKEINTRESOURCE(IDACCEL));
if ((hwndMain = CreatejavastarterWndClassWnd()) == (HWND)0)
return 0;
int aus=(int)ShellExecute(hwndMain,
"open",
"javaw",
"-Dj3d.fullscreen=REQUIRED saver.Savermain",
NULL,SW_SHOWNORMAL);
return aus;
}If you are looking for a free C compiler for Windows, then lcc from http://www.q-software-solutions.com is a nice choice.
Regards,
Oliver -
How to share a folder with java? in netbios in windows
hi. I want to write a programa that user can select a directory than
click the share button and the directory will be shared to other pcs.
the other pcs can acces this directory like \\servername\shareddirectory
the question is this. how can i share a director with java or JNI's?
please help me.
with my best regards....thanks about net share command.
i know how to use Runtime.getRuntime.exec()
but i cont find the syntax of net share command.
can u give an example? i use net help share and i try different
sytaxes but i cant find the correct one.
please give an examle about net share command.
thanks a lot. -
How to shutdown a pc with java??
Please I need to know how to shutdown a pc with a java program.
(I don't think Windows has one built in, but Icould be wrong), or JNI.
http://www.google.ie/search?hl=en&q=How+to+shutdown+pc
fromcommand+line&btnG=Google+Search&meta=
First link ;)Ahh, Learn something new every day, that be new in XP. Alas I don't use XP. -
How to use parameter file with java
Is it possible to use a parameter file with Java, and is there any class/method to make it easy to call and use these parameter from a text file, other than scanning the whole text file manually as we can do normally with visual basic/c++, so we can call the program with the parameter file, like java testing c:\\testing.ini
If I understand you correctly, you may be looking for a properties file. This is basically a text file that contains pairs of strings in the form:
parameter1=value1
parameter2=value2
parameter3=value3
...etc.
and the values are retrieved using the java.util.Properties class - see:
http://java.sun.com/j2se/1.3/docs/api/java/util/Properties.html
Sample use://Call chis method once, to load the props file.
//props file is called "demo.properties", and is
//in a directory that is included in the classpath
private void loadMyProperties() throws Exception
InputStream stream = getResourceAsStream("/demo.properties");
if(stream == null)
throw new Exception("stream is null!");
demoProperties = new Properties();
demoProperties.load(stream);
stream.close();
// Then you can retrieve properties in your code using:
String param3 = demoProperties.getProperty("parameter3");
//...etc -
How to use a proxy with java applications?
I have a nokia 6300 type s40v3
hello,
I would like to know if it is possible to use a proxy of any and how ? kind with java applications.
thank youWell, it works well when, into my applet, i do somethig like this:
URL url = new URL(host);
URLConnection connexion = url.openConnection();My applet uses proxy setting from IE6 but only if i use Java 1.4.2_08.
With IE6 and Java 1.5.04, it doesn't work (my applet doesn't use proxy settings)
With Firefox and Java 1.5.04, it's ok
Have you already seen a problem like this with Java 1.5.04 ? -
How long we can go with Java from now on?
Days ago, the forum is blue. But now change to red.
Java, will it still be hot like along with Sun? How long we can go with you?JoachimSauer wrote:
mrjava wrote:
What will be the strategy of Oracle with MySQL now?They claim to support it in full and continue development.
But this is really off-topic here ... we're not the oracle about everything related to Oracle.Not breathing the smoke of the correct kind of leaves, eh?
:D
¦ {Þ -
How i can start working with Java?
Right now i am having only 8 months of exp in ABAP. can any one help me out to start working with Java specially for Netweaver Purpose
It is great if you can get yourself familiar with java syntax, as is the case with any new langauage. However, the worst thing you can do is just code java in a top down approach. If you are not familiarizing yourself with OO concepts and best practices, then you are going to miss two important benefits that you will get from using OO programming - Reusability and flexibility in the frameworks that you develop (leveraging design patterns).
These benefits will also be directly obtainable when you use ABAP objects.
I am working in the opposite direction at the moment. I have some java experience, and I am starting to learn ABAP. I have used ABAP objects in my first project, and it was actually much better than I thought it would to be.
Java and OO programming will be an ongoing learning experience. You will not be an expert for quite some time. I do not consider myself to be an expert by any means, and I've be studying OO and java for a few years.
There is a fantastic book that explains OO concepts clearly, in much easier terms than the Gof "Design Patterns" book:
Java Design: Objects, UML, and Process by Kirk Knoernschild
You can read a few chapters at www.kirkk.com. (Use the JOUP link).
Hope this helps you.
- Brendan -
How to connect microsoft sql with java servlets
what are steps i should do after writing servlet program to connect with microsoft sql. what coding should i add in web.xml file.if any other steps mention it. i didn't get output or err msg in browser.if i should install jdbc drivers seperately for sql mention it.
Hi,
Try to find a DataBase driver for MS SQL ( type 4 which is a pure java) first and put it on the class path i.e under ../lib
Then in your sevlet, load the DriverManager and from it get a connection to the database as per JDBC spec.
Regards.
Alan Mehio
LONDON, UK -
How Connect to oracle database with java
i have trouble with my program
i use oracle 8i to my database and java for interface
this mycode :
import java.sql.*;
class TestThinApp {
public static void main (String args[])
throws ClassNotFoundException, SQLException {
Class.forName("oracle.jdbc.driver.OracleDriver");
// or you can use:
// DriverManager.registerDriver(
// new oracle.jdbc.driver.OracleDriver());
Connection conn = DriverManager.getConnection(
"jdbc:oracle:thin:@dssw2k01:1521:orcl","scott","tiger");
Statement stmt = conn.createStatement();
ResultSet rset = stmt.executeQuery(
"select 'Hello Thin driver tester '||USER||'!' result from dual");
while(rset.next())
System.out.println(rset.getString(1));
rset.close();
stmt.close();
conn.close();
i have trouble , becouse i can connect my database with java (JDK)
if any one can help me pls?
arifPLEASE .... Ask in an Oracle Java forum.
And read the documentaiton. There is a whole document devoted to doing that. http://download.oracle.com/docs/cd/B19306_01/java.102/b14355/toc.htm has examples.
PLEASE ... do not ask product questions in a forum which clearly has a title saying it is devoted to assisting with download problems. -
How to get php content with java ??
i have made a php file what will display a number,
here's a example
<?php
if ($action == "answer"){
echo "18274926";
?>
no i want to get the number with java
so here's my java code
import java.io.*;
import java.net.*;
import java.util.Date;
class URLConnecties
public static void main(String args[]) throws Exception
int teken;
URL url = new URL("http://www.gamer.mineurwar.nl/net/javachallenge.php?command=DaTe");
URLConnection urlconnection = url.openConnection();
System.out.println("Type inhoud: " +
urlconnection.getContentType());
System.out.println("Datum document: " +
new Date(urlconnection.getDate()));
System.out.println("Laatst gewijzigd: " +
new Date(urlconnection.getLastModified()));
System.out.println("Document vervalt: " +
urlconnection.getExpiration());
int lengteinhoud = urlconnection.getContentLength();
System.out.println("Lengte inhoud: " + lengteinhoud);
if (lengteinhoud > 0) {
InputStream in = urlconnection.getInputStream();
while ((teken = in.read()) != -1) {
System.out.print((char) teken);
in.close();
}if you change the url ro a .html file it displays the code correctly(source),
but when trying to get the content of a php file (the number)
it says that there is no content from the php file
yhe source of the original php file what's in the code can be found at
www.gamer.mineurwar.nl/net/javachallenge.txtThe 'content' is generated dynamically by a PHP script so the "content lenght" can't be known in advance by the server. For this reason connection.getContentLenght() returns -1; it doesn't mean that there is no content, only that it can't be known how much there will be.
To solve the issue, remove the if statement from around the while-loop:// if (lengteinhoud > 0) { DELETE THIS LINE
InputStream in = urlconnection.getInputStream();
while ((teken = in.read()) != -1) {
System.out.print((char) teken);
// } and this too
Maybe you are looking for
-
2 questions on BRF workflow for SC
Hello All I have 2 questions on BRF workflow as follows: 1) My requirement is that the PO be created only after all the items in the Shopping cart (from all decision sets) are approved by separate agents. How do I enforce this using BRF ?The closest
-
H
-
I need to install Ora 9i but I can't download the disk2.zip, actually I download the disk1 and 3 but the disk 2 is bad, I need that version of Oracle because all my applications are in this version. Where I can find another source for download the di
-
When I go to open a new window by the result of trying to open something on a page, the new window stays blank. There is no error message or anything, it just stays blank.
-
Hi everyone, Is it possible to export quicktimes or sequences out of FCP at higher than 8-bit colour? And does anyone know which codecs are 16/32 bit capable? The manual makes passing reference to floating point colour but never refers exactly in wha