NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
rob.morning
Joined: 13 Jul 2012 Posts: 1
|
Posted: Fri Jul 13, 2012 2:50 pm Post subject: Socket error in Netbeans - not Eclipse though ! |
|
|
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:2
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 |
|
 |
|
|
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
|
|