Re: Jar file with JDBC
Hi, When I added 'System.out.printStackTrace()' it told while compilation Method printStackTrace() not found in class java.io.PrintStream. System.out.printStackTrace(); I have imported java.io.*; What else I need to do? I have included postgresql.jar in my jar file. My classes are all in the same directory. Thanking You, Alpesh = KOTHARI ALPESH D. STUDENT M. TECH. CEDT INDIAN INSTITUTE OF SCIENCE BANGALORE-560 012 INDIA __ Do You Yahoo!? Talk to your friends online with Yahoo! Messenger. http://messenger.yahoo.com -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Missing shared X libraries
Hi, I installed JDK 118 on an Alpha Linux RH6.0 machine. However, when I try to invoke swing classes I get an error message that libawt.so canot locate libXm.so.1. Is there any simple solution to this? Is this a glibc or XFree86 problem? Any help would be much appreciated. Roy -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
jdk118/glibc compatibility
Hi Everyone, I noticed someone posting earlier about having the Blackdown jdk1.1.8 (which looks, from the filename, like it requires glibc-2.1.2) on a RedHat 6.0 system (which has glibc2.1.1). I know the blackdown web-site say glibc2.1.3 is required for the native threads package, but what about green threads? Would I need 2.1.2, 2.1.3, or is any 2.1.x okay? thanks in advance, Rich Ibbotson [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Jar file with JDBC
ALPESH KOTHARI wrote: > > Hi, > > When I added 'System.out.printStackTrace()' it told > while compilation > Method printStackTrace() not found in class > java.io.PrintStream. > > System.out.printStackTrace(); It should be: e.printStackTrace(); where e comes from: catch (Exception e) Matthias -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Running a program in the background
Dear List, I have written a little program that I would like to run in the background. My linux box is Linux 6.1. JDK 1.1.7b from blackdown. I know to put 2>&1 & at the end of the starting line, but when I do a System.out.println it prints to the window as expected. Can I detect, when the java app is running whether it has been started in the background? So I can skip the writing. Cheers, Marcus Marcus Monaghan BOOT Computers Limited Tel : 01270 611299 Fax : 01270 611302 -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Jar file with JDBC
ALPESH KOTHARI wrote:
> Hi,
>
> When I added 'System.out.printStackTrace()' it told
> while compilation
> Method printStackTrace() not found in class
> java.io.PrintStream.
>
> System.out.printStackTrace();
>
> I have imported java.io.*;
> What else I need to do?
> I have included postgresql.jar in my jar file.
> My classes are all in the same directory.
>
> Thanking You,
> Alpesh
>
Alpesh,
Postgresql.jar has nothing to do with it.
As the compiler says, there is no method printStackTrace() in
java.io.printStream.
Perhaps what you want is something like:
try {
// something
} catch (Exception ex) {
ex.printStackTrace(System.out);
// or just ex.printStackTrace() which will appear on System.err
}
--
David Marshall email: [EMAIL PROTECTED]
VM Systems, Inc. phone: 1-941-596-2480
Naples, FL USA fax: 1-941-596-2483
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
RE: Jar file with JDBC
The correct is not
try {
//some piece of code
} catch( Exception e ) {
e.printStackTrace( System.out );
}
???
--
From: ALPESH KOTHARI
Sent: quarta-feira, 29 de dezembro de 1999 07:44
To: Peter Mount
Cc: [EMAIL PROTECTED]
Subject:Re: Jar file with JDBC
Hi,
When I added 'System.out.printStackTrace()' it told
while compilation
Method printStackTrace() not found in class
java.io.PrintStream.
System.out.printStackTrace();
I have imported java.io.*;
What else I need to do?
I have included postgresql.jar in my jar file.
My classes are all in the same directory.
Thanking You,
Alpesh
=
KOTHARI ALPESH D.
STUDENT M. TECH.
CEDT
INDIAN INSTITUTE OF SCIENCE
BANGALORE-560 012
INDIA
__
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://messenger.yahoo.com
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
RE: Running a program in the background
No, you can't detect when the program is running in background (thinking in a generic environment). But you can use a Log application to redirect yor System.out to a network connection. And, you can use the syslogd client existing in Giant Java Tree... I've seen some sample in JavaTutorial, but I don't remember where... []s Edson Richter -- From: [EMAIL PROTECTED] Sent: quarta-feira, 29 de dezembro de 1999 12:19 To: [EMAIL PROTECTED] Subject:Running a program in the background Dear List, I have written a little program that I would like to run in the background. My linux box is Linux 6.1. JDK 1.1.7b from blackdown. I know to put 2>&1 & at the end of the starting line, but when I do a System.out.println it prints to the window as expected. Can I detect, when the java app is running whether it has been started in the background? So I can skip the writing. Cheers, Marcus Marcus Monaghan BOOT Computers Limited Tel : 01270 611299 Fax : 01270 611302 -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
RE: jdk118 under Redhat6.0
Does not put .class at the end of your line of command for execution. So, to run your program, do simple: java Clock2 this will work fine. -- From: Zhang Yuyong Sent: terça-feira, 28 de dezembro de 1999 23:14 To: [EMAIL PROTECTED] Subject:jdk118 under Redhat6.0 <> hi everyone: i used jdk118(glibc version) on redhat6.0, and i have already set my JAVA_HOME envoirment variable to "/opt/jdk118_v1" , and CLASSPATH is "/opt/jdk118_v1/lib/classes.zip:." . in the directory /opt/jdk118_v1/demo/Clock, i can complier the source file with "javac Clock2.java", but when i run it with "java Clock2.class", i get an error "can't find class Clock2.class", what should i do? any help will be appreciated! thanks the files in the /opt/jdk118_v1/demo/Clock lists as following: -rwxr-xr-x 1 root root 5033 Dec 28 16:41 Clock2.class -rwxr-xr-x 1 root root 8306 Dec 7 23:11 Clock2.java -rwxr-xr-x 1 root root 1469 Dec 7 23:11 example1.html -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Running a program in the background
Hi Marcus, You can do the following (with bash): java packageName.className 2>&1 > fileName And then do a ps ...|awk ...|grep ...|wc -l after a sleep with a grep perhaps? Or you can have your program create some kind of lock file. In the latter case you first delete the lock file, then start the Java program and then check whether the file exists with a time out or so. My 2cts :) Ernst [EMAIL PROTECTED] wrote: > > Dear List, > I have written a little program that I would like to run in the background. > > My linux box is Linux 6.1. > JDK 1.1.7b from blackdown. > > I know to put 2>&1 & at the end of the starting line, but when I do a > System.out.println it prints to the window as expected. Can I detect, when > the java app is running whether it has been started in the background? So I > can skip the writing. > > Cheers, > Marcus > > > Marcus Monaghan > BOOT Computers Limited > Tel : 01270 611299 > Fax : 01270 611302 > > > -- > To UNSUBSCRIBE, email to [EMAIL PROTECTED] > with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED] -- Ernst de Haan Freelance Java Architect "Come to me all who are weary and burdened, and I will give you rest" -- Jesus Christ -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: jdk118 under Redhat6.0
You should run java Clock2 (without the class extension), i.e java class_name -- Regards, Anthony G. Starovojtov, System Administrator of IMS Department, Kharkov State Technical University of Radioelectronics, pr. Lenina,14, room 254, Kharkov, 61726, Ukraine Phone +380 572 409451 (Work), +380 572 648863 (Home) E-mail: [EMAIL PROTECTED], [EMAIL PROTECTED] ICQ: 32572820; Yahoo Messenger ID: starovojtov Zhang Yuyong wrote: hi everyone: i used jdk118(glibc version) on redhat6.0, and i have already set my JAVA_HOME envoirment variable to "/opt/jdk118_v1" , and CLASSPATH is "/opt/jdk118_v1/lib/classes.zip:." . in the directory /opt/jdk118_v1/demo/Clock, i can complier the source file with "javac Clock2.java", but when i run it with "java Clock2.class", i get an error "can't find class Clock2.class", what should i do? any help will be appreciated! thanks the files in the /opt/jdk118_v1/demo/Clock lists as following: -rwxr-xr-x 1 root root 5033 Dec 28 16:41 Clock2.class -rwxr-xr-x 1 root root 8306 Dec 7 23:11 Clock2.java -rwxr-xr-x 1 root root 1469 Dec 7 23:11 example1.html
Re: Jar file with JDBC
On Wed, 29 Dec 1999, ALPESH KOTHARI wrote: > > Hi, > > When I added 'System.out.printStackTrace()' it told > while compilation > Method printStackTrace() not found in class > java.io.PrintStream. > > System.out.printStackTrace(); > > I have imported java.io.*; > What else I need to do? > I have included postgresql.jar in my jar file. > My classes are all in the same directory. Woops, printStackTrace() is a method of Exception not PrintStream. Thanks for the others who also spotted my mistake :-) Peter -- Peter T Mount [EMAIL PROTECTED] Main Homepage: http://www.retep.org.uk PostgreSQL JDBC Faq: http://www.retep.org.uk/postgres Java PDF Generator: http://www.retep.org.uk/pdf -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
CLASSPATH to Install Oracle JDBC driver for jdk1.2?
Oracle for Linux wants a CLASSPATH defined to install the JDBC driver. For the older java versions, it was the path to the classesxxx..zip file but this has changed with jdk1.2. What should it be now? ./jdk1.2/lib would be my first choice: correct? I would appreciate advice from someone who has been able to get these two working together. John Palsedge OneWorld Tools Quality Assurance J.D. Edwards World Source Company OTW, Building Three Phone: (303) 334-8703 Fax: (303) 334-1326 [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
J2EE on Linux
Anyone got it to work? john -- E-Mail: John N. Alegre <[EMAIL PROTECTED]> Date: 29-Dec-99 Time: 20:32:56 This message was sent by XFMail -- -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Jar file with JDBC
hai, I have installed JDK 1.2.2 on Redhat 6.0, i am able to compile and run java programs , but rmi is giving problems, when i type rmic it is giving the following error. Please tell me how to rectify the problem. java.lang.NoClassDefFoundError: sun/rmi/rmic/Main at java.lang.Throwable.(Throwable.java:40) at java.lang.Error.(Error.java:21) at java.lang.LinkageError.(LinkageError.java:21) at java.lang.NoClassDefFoundError.(NoClassDefFoundError.java:21) bye balaji -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
