This week's book giveaway is in the Beginning Java forum.
We're giving away four copies of Murach's Java Programming and have Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Java Programming this week in the Beginning Java forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Security Exception-Application unauthorized to access restricted api  RSS feed

 
Lucky Virdi
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am developing an instant messaging application, it is working fine with midp 1.x versions but gives securtiy exception saying APPLICATION UNAUTHORIZED TO ACCESS RESTRICTED API'S. I tried to go thru the code and found that a socket is being created but is unable to write on that socket. The application is working fine when tested on NOKIA N-GAGE but dosent work on NOKIA 7610,6260,6600....etc(probably it is not able to write on the tcp socket).. Looking for a solution badly!!!
 
jyothi gopu
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Understanding MIDP 2.0's Security Architecture

web page

If you deny the connection, Connector.open() throws a SecurityException. So you should handle them gracefully.
 
Lucky Virdi
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am facing yet another problem in reading from the socket, it seems it is not able to find end of file, i have given a condition to read the file till it gets -1 but it is not coming out of the while loop. The same code is working fine in MIDP 1.0 but gives problem using MIDP 2.0, can anyone help me out......
 
Get off me! Here, read this tiny ad:
Thoughts on deprecation in Java
https://coderanch.com/t/683016/java/Deprecation-Java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!