03-26-2007
error in java
hi everyone
i am attaching a java code below,
it is running perfectly fine on windows but not on unix system.
unix system is having java 1.2 environment.
and this code is java 1.1 onwards compatible.
WELL THE ERROR GIVEN IS UNKNOWN HOST EXCEPTION
plz help me out.
import java.net.*;
import java.io.*;
import java.util.*;
public class MailTest
{
private BufferedReader in;
PrintWriter out;
String response=" ";
public MailTest()
{
try
{
Socket s= new Socket("mail.punjab.spiceindia.com", 25);
out = new PrintWriter( s.getOutputStream());
in = new BufferedReader (new InputStreamReader (s.getInputStream())); String hostName= InetAddress.getLocalHost().getHostName();
send(null);
send("HELO" + hostName );
send("MAIL FROM:" + "rajiv_kaura@spiceindia.com" );
send("RCPT TO:"+ "randeep_bhalla@spiceindia.com");
send("this is test mail");
out.println("test mail");
send(".");
s.close(); \
}
catch(IOException e)
{
System.out.print(e.toString());
}
}
public void send(String s) throws IOException
{
if (s!=null)
{
out.println(s);
out.flush();
}
}
public static void main(String[] args)
{
MailTest m1=new MailTest();
}
}
Last edited by parmeet; 03-28-2007 at 02:03 AM..
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all,
I am getting a License error when Iam trying to call a perl script which builds TestRT (Test Real Time) application. When Iam calling the same script from command prompt it is building successfully.
Iam using Solaris 9 Operating system.
I have checked all the environment variables... (0 Replies)
Discussion started by: srini.g
0 Replies
2. Programming
Can you help me with my code?
I wrote a Java program and ran it in gdb, the debugger said that :
(gdb) run handhelditems 1 1000
Starting program: /home/wqq/crawl/handhelditems/crawl_what_i_want handhelditems 1 1000
Program received signal SIGPWR, Power fail/restart. (2 Replies)
Discussion started by: cf.george
2 Replies
3. UNIX for Dummies Questions & Answers
I need Help folks;
I'm very new to Java & i was trying to compile some java files & i got a lot of errors (see below), could some one tell me what am i doing wrong?
These are the files i need to compile:
AddCommentActionLogging.java
EditPageActionLogging.java
When i run:... (4 Replies)
Discussion started by: Katkota
4 Replies
4. Programming
Dear
anyone can help me??I really not know what do my server OCj4 log means...is it OC4J normal??
2/1/10 1:51 PM: Servlet error
java.lang.IllegalStateException: Response has already been committed, be sure no t to write to the OutputStream or to trigger a commit due to any other action be... (0 Replies)
Discussion started by: netxus
0 Replies
5. OS X (Apple)
Hi,
Im trying to install a program called relax, i installed fink according to the instructions from the fink website to install to mac os 10.6. It seems to be working alright but when i try to install the program i get this error but i dont know what to do with it,
User% fink install... (3 Replies)
Discussion started by: olifu02
3 Replies
6. Solaris
Hi folks,
I had a sparc machine with Solaris9 and built in java1.4.2
I installed Java1.5 on top of it by running the file jre-1_5_0_22-solaris-sparcv9.sh
Now when I run the java application, I get the following error:
Error occurred during initialization of VM... (2 Replies)
Discussion started by: manojsomanath
2 Replies
7. Solaris
I don't know if this the right place to post this.
My issue is this, I'm trying to add this patch to upgrade my java on my Solaris server. I'mtrying to update to java 1.5.0_34 from java 1.5.0_32.
patchadd ./118666-36 I get this error:
Patch 118666-36 failed to install due to failure produced... (1 Reply)
Discussion started by: bitlord
1 Replies
8. Shell Programming and Scripting
Dear All,
while running java -version i am getting following error
/usr/lib/dld.sl: Can't find path for shared library: libjli.sl
/usr/lib/dld.sl: No such file or directory
ARIES32: Core file for PA32 application saved to /finacle/RIPU/core.java
Abort(coredump)
its creating a core dump.
... (3 Replies)
Discussion started by: ripudaman.singh
3 Replies
9. AIX
Hello AIX and Java gurus,
I have a java error that I have no clue how to resolve. I am trying to run the popular NMONVisualizer utility against a NMON dataset and getting the error as shown below:
/db2storage/NMON >java -jar NMONVisualizer_2015-02-02.jar com.ibm.nmon.ReportGenerator... (1 Reply)
Discussion started by: okonita
1 Replies
10. Programming
i am on red hat Linux .
package hiveudf;
import org.apache.hadoop.hive.ql.exec.UDF;
import org.apache.hadoop.io.Text;
public class lowercaseudf extends UDF {
public Text evaluate(final Text s) {
if (s == null) { return null;}
return new... (4 Replies)
Discussion started by: boncuk
4 Replies
LEARN ABOUT MOJAVE
schemagen
schemagen(1) General Commands Manual schemagen(1)
NAME
schemagen - Java(TM) Architecture for XML Binding Schema Generator Specification Version: 2.0
Reference Implementation (RI) Version: 2.0 ea3
Launching schemagen
The schema generator can be launched using the appropriate schemagen shell script in the bin directory for your platform.
The current schema generator can process either Java source files or class files.
We also provide an Ant task to run the schema generator - see the instructions for using schemagen with Ant.
For Solaris/Linux
% path/to/jaxb/bin/schemagen.sh Foo.java Bar.java ...
Note: Writing schema1.xsd
For WindowsNT/2000/XP
> path ojaxbinschemagen.bat Foo.java Bar.java ...
Note: Writing schema1.xsd
If your java sources/classes reference other classes, they must be accessable on your system CLASSPATH environment variable, or they need
to be given to the tool by using the -classpath/-cp options. Otherwise you will see errors when generating your schema.
Command Line Options
Usage: schemagen [-options ...] <java files>
Options:
-d <path> : Specify where to place processor and javac generated class files
-cp <path> : Specify where to find user specified files
-classpath <path> : Specify where to find user specified files
-help : Display this usage message
Generated Resource Files
The current schema generator simply creates a schema file for each namespace referenced in your Java classes. There is no way to control
the name of the generated schema files at this time. For that purpose, use the schema generator ant task.
See Also
o JAXB 2.0:
* Release Notes @
http://java.sun.com/webservices/docs/2.0/jaxb/ReleaseNotes.html
* XJC @
http://java.sun.com/webservices/docs/2.0/jaxb/xjc.html
* XJCTask @
http://java.sun.com/webservices/docs/2.0/jaxb/xjcTask.html
* SchemaGen @
http://java.sun.com/webservices/docs/2.0/jaxb/schemagen.html
* schemagenTask @
http://java.sun.com/webservices/docs/2.0/jaxb/schemagenTask.html
* Sample Apps @
http://java.sun.com/webservices/docs/2.0/jaxb/samples.html
* Changelog @
http://java.sun.com/webservices/docs/2.0/jaxb/changelog2.html
o JAXB 1.0.x:
* Release Notes @
http://java.sun.com/webservices/docs/2.0/jaxb/jaxb-1_0.html
* Changelog @
http://java.sun.com/webservices/docs/2.0/jaxb/changelog.html
o JAXB RI Extensions:
* Runtime Properties @
http://java.sun.com/webservices/docs/2.0/jaxb/vendorProperties.html
* XJC Customizations @
http://java.sun.com/webservices/docs/2.0/jaxb/vendorCustomizations.html
* Develop Plugins @
http://java.sun.com/webservices/docs/2.0/jaxb/developPlugins.html
o JAXB RI Schema Languages:
* W3C XML Schema @
http://java.sun.com/webservices/docs/2.0/jaxb/vendorSchemaLangs.html#xschema
* RELAX NG @
http://java.sun.com/webservices/docs/2.0/jaxb/vendorSchemaLangs.html#relaxng
* DTD @
http://java.sun.com/webservices/docs/2.0/jaxb/vendorSchemaLangs.html#dtd
o JAXB Community:
* Java.net Homepage @
http://jaxb.dev.java.net
* Developer interest list @
https://jaxb.dev.java.net/servlets/ProjectMailingListList
* FAQ @
https://jaxb.dev.java.net/faq/index.html
07 Aug 2006 schemagen(1)