[J2ME QA]Target port denied to untrusted applications问题回应

news/2024/6/1 13:11:01

 [When]

开发J2ME程序的时候,用户可能在运行Socket程序连接远端Socket服务器时出现不受信任的错误,如下面的代码:

SocketConnection sc =

(SocketConnection)Connector.open("socket://localhost:8080");

 

报错为:
Uncaught exception java/lang/SecurityException:

Target port denied to untrusted applications.

 

[HowTo]

可能导致的原因之一:

SocketConnection的使用中,只有受信任的midlet才可以去访问服务器的808080端口。如果不受信任的midlet尝试去访问服务器的808080端口,那么SecurityException会被抛出。

这时候,只要在J2ME Wireless Toolkit 选项里面的安全域里面选trusted

 

 [More Details]

WTKàKtoolbarà“偏好”菜单:

TrustedDomainInKToolbar





http://www.niftyadmin.cn/n/3649738.html

相关文章

flutter 主题_在Flutter中使用主题

flutter 主题One great aspects of Flutter is its use of UI packages like the Material and Cupertino design systems. They work to shortcut all of the minute and repetitive design choices like the appBar height or the shadows on buttons. But obviously always …

[J2ME QA]untrusted domain is not configured问题回应

[When]第一次使用Netbean 4.0/5.0开发程序的时候,用户可能在运行程序时,遇到下面这种报错,导致模拟器一闪而过:正在通过存储根 DefaultColorPhone 来运行 域名不正确,请切换到 untrustedjava.lang.SecurityException: …

[j2me]二级菜单演示 开源声明

郑昀ultrapower产品名称产品版本Keyword: JavaME 二级菜单MenuBarlet1.0.20[J2ME]二级菜单演示(MenuBarlet)开源说明我的资源:http://www.cnblogs.com/Files/zhengyun_ustc/menubar-1.0.20-src.rar这个1.0.20版本的j2me软件,能够在Nokia S60系列、索爱K7…

react ui 组件_如何使用React和Storybook构建UI组件

react ui 组件介绍 (Introduction) In the previous article, I gave an Introduction to Storybook and how it can be used to organize and build JavaScript components. Storybook is a UI library that can be used to document components. In this article, I’ll be e…

了解JavaScript中的变量范围

The scope is the execution context of a variable or function. It defines what data it has access to. This concept may seem pretty straightforward, but has some important subtleties. 作用域是变量或函数的执行上下文。 它定义了它有权访问的数据。 这个概念可能看…

[j2me]二级菜单界面演练[四]

Opera Mini的菜单也是最下方绘制的矩形条,然后drawString上菜单命令,我也要这么做,毕竟这么做简单些。若要做到类似于ucweb那种几乎接近于Windows任务栏/工具栏的那种效果,还尚需时日。今日花费点时间调整到这样吧,把左…

[j2me]二级菜单界面演练[三][0215Update]

今日又花费了点时间,调整界面上各种按键之下的效果,比如:上下左右方向键的作用;点击一次“选择”左软键就是展开主菜单,再点击一次“选择”左软键的作用就是消隐主菜单;等等诸如此类的效果,和Wi…

如何安装svelte_Svelte 3入门

如何安装svelte介绍 (Introduction) When building applications with JavaScript, high performance and penetrability will always be at the crux of the decisions made by software developers. Svelte is a high-performance component framework for imperative code. …