NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Socket error in Netbeans - not Eclipse though !

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users
View previous topic :: View next topic  
Author Message
rob.morning



Joined: 13 Jul 2012
Posts: 1

PostPosted: Fri Jul 13, 2012 2:50 pm    Post subject: Socket error in Netbeans - not Eclipse though ! Reply with quote

I have some code to connect to a server via a socket .. The connection line is shown below ..

Socket s = new Socket("myMailServer", 25);

which immediately throws

java.net.SocketException: Permission denied: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:529)
at java.net.Socket.connect(Socket.java:478)
at java.net.Socket.<init>(Socket.java:375)
at java.net.Socket.<init>(Socket.java:189)
at com.rbm.SMTPTest.sendMail(SMTPTest.java:43)
at com.rbm.SMTPTest.main(SMTPTest.java:2Cool


It's running on Java 6 .. Windows 7 .. Trying to connect to MS Exchange ..

Strange thing is when I run EXACTLY the same code thru Eclipse on the same machine it works fine .. It runs as an application (not an applet ) so no SecurityManager or anything like that involved .. Both apps are executed under administrator authorisation .. Can anyone help ?? Where can I look ?
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo