[Java] Development Kit Issues
Ali Helmy
alihelmy at gmail.com
Sun Mar 26 19:04:53 UTC 2006
Hey mates,
I need to inquire about two issues in particular regarding JDK... Firstly,
so that you can understand my background:
- I'm running FedoraCore 5
- In the FC installation, I installed the regular Java Development libs &
tools (such as eclipse, gcj, ...etc)
- I downloaded and installed the JDK1.5 and the JVM from Sun Microsystems,
Inc.
- I removed all the java related bins in the /usr/bin folder, then recreated
the links to the new bins in the /usr/java/jdk1.4.0/bin library to make the
javac, java, jar, javah... etc commands use the new JDK
Now here's my problems:
A) When i create a jar file (ex: jar -cf Anyfile.jar Anyclass.class), the
manifest file created with it (META-INF/MANIFEST) lists:
Manifest-Version: 1.0
Created-By: 0.92-gcc
where you see, that my problem is that the manifest file was created by
"gcc" apparently, and not 1.5.0_01 (Sun Microsystems Inc.) which should have
been the case... so, how can i change the manifest file maker?
B) When developing this simple program to test reading & writing to an input
device keda bagaraboh that replaces the keyboard for the (System.in), i get
this message when compiling with javac... However, this message is not an
error, it is just a note... the program DOES compile, yet i don't know what
is causing the bloody note...
The Program:
import java.io.*;
public class ReadingFromConsole{
public static void main(String[] args){
//propmt user
System.out.println("Say something");
//set the input stream
DataInputStream IStream = new DataInputStream(System.in);
//read the dara
String UsrInput = new String();
try{
UsrInput = IStream.readLine();
} catch(IOException e) {
System.out.println("Error getting input");
}
//print the data out to the user
System.out.println("You said: " + UsrInput);
}
}
And the Note I Get after compiling with (javac -Xlint:deprecation ...etc):
[ahelmy at Laptop Java]$ javac -Xlint:deprecation ReadingFromConsole.java
ReadingFromConsole.java:12: warning: [deprecation] readLine() in
java.io.DataInputStream has been deprecated
UsrInput = IStream.readLine();
So, does anyone know a replacement to read directly a line of user input
from the (System.in) through a console? Because .readline( ) was the one
listed in the API
Sorry for the long mail, but I hope that through the [java] tag, anyone
who's not interested can just ignore the mail
Fare Faw
--
A. Helmy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20060326/03992127/attachment-0001.htm>
More information about the fedora-list
mailing list