草庐IT

name-binding

全部标签

Java/OS X 狮子 : Setting application name stopped working with JDK1. 7

到目前为止,我使用以下代码在我的AppleMacBook上设置应用程序名称(在顶部的“系统”菜单栏中)。(实际上,我想我是从stackoverflow复制的。)基本上,有一个单独的AppLauncher类,它使用System.setProperty()在为应用程序本身创建新的Runnable之前设置应用程序名称。工作得很好。但是,自从我下载并开始使用JDK1.7后,该解决方案就停止工作了-我在菜单中得到的是类名称而不是应用程序名称,就像我找到该解决方案之前一样。我尝试用谷歌搜索它,但无济于事。这里是曾经在JDK1.6下工作的已失效代码,缩减为相关部分:publicclassAppLau

java - Glassfish 4 : how to set application or module name for JNDI

我在OSGi包中使用EJB。现在当我需要获取EJB时,我有很长的jndi,例如:bean=(InterfaceName)ctx.lookup("java:global/longBundleName_version/OrganizationDirBean!and.plus.path.and.InterfaceName");我想改变这部分:longBundleName_version我的意思是,当我部署bundle时,这部分必须从[glassfish-]application.xml或[glassfish-]-ejb-jar.xml或任何其他xml描述符设置。我希望我的ejb的jndi名称

java - 如果我摆脱我的 'multiple SLF4J Bindings' 警告日志记录停止工作

我在tomcat6中有以下目录结构:tomcat|-lib||-logback-classic.jar||-logback-core.jar||-slf4j-api.jar||-myState.jar|-shared||-lib|||-myStateLogback.xml|-webapps||-myApp|||-WEB-INF||||-logback.xml||||-lib|||||-jcl-over-slf4j.jar|||||-logback-classic.jar|||||-logback-core.jar|||||-slf4j-api.jarmyState.jar需要位于tom

javax.naming.NameNotFoundException : Name [comp/env] is not bound in this Context. Java 调度程序无法找到 [comp] 错误

我想做的是在一段时间后更新我的数据库。所以我正在使用java调度程序和连接池。我不知道为什么,但我的代码只能工作一次。它将打印:initsuccesssuccessjavax.naming.NameNotFoundException:Name[comp/env]isnotboundinthisContext.Unabletofind[comp].atorg.apache.naming.NamingContext.lookup(NamingContext.java:820)atorg.apache.naming.NamingContext.lookup(NamingContext.jav

java - 跟踪在 javafx 中绑定(bind)的节点的变化

我想要这篇文章中提出的相同问题trackchangesofnodesboundinJavaFX我有这样的东西:(编辑)中南合作:publicclassFloatCircle{Nodenode;Circlerectangle;BoundslocalToScreen;staticArrayListlist=newArrayList();privateObjectBindingboundsInScene;Paneroot;publicFloatCircle(Nodenode,Paneroot){this.node=node;this.root=root;this.rectangle=newC

Java Hibernate Bug 参数绑定(bind)错误

我有这个简单的Hibernate代码。publicListbug(){//SimpleCriteriafinalCriterioneq=and(Restrictions.eq("fdl","N"),Restrictions.eq("cid",1),Restrictions.eq("did",2));returncurrentSession().createCriteria(Student.class).createAlias("school","s",JoinType.INNER_JOIN,Restrictions.eq("zipCode",1764)).createAlias("ad

java - web.xml的<filter-mapping>里面的<servlet-name>是什么意思?

我开始学习Struts2。我偶然发现了这段代码:web.xml...someothercodes...MyFilterMyFiltercom.xxx.yyy.zzz.MyFilterMyFilterMyActioncom.xxx.yyy.StrutsListenerMyActionorg.apache.struts.action.ActionServletparamName1param-name>paramVal1paramName2paramVal21...someothercodes...我的问题在这部分MyFilterMyAction为什么在中映射一个servlet标签?这种映射

java - Spring MVC 和表单绑定(bind) : how to remove an item from a List?

我有一个Person模型属性,其中包含电子邮件的列表。我创建了一些JavaScript代码,用于从HTML电子邮件列表中删除元素。这是纯JavaScript客户端代码,没有AJAX调用。提交后,我不明白为什么我在相应的@Controller方法中得到了所有的邮件,甚至那些在HTML中被删除的。谁能解释一下?JSP"type="text/css">Resumesmanager$(document).ready(function(){$('.trash').click(function(){$(this.parentNode).remove();});});PersonaldataEmai

java - Eclipse RCP 插件中的多个 slf4j 绑定(bind)

我有一个简单的Eclipse插件,在激活时会出现以下错误:SLF4J:ClasspathcontainsmultipleSLF4Jbindings.SLF4J:Foundbindingin[bundleresource://103.fwk8918249:1/org/slf4j/impl/StaticLoggerBinder.class]SLF4J:Foundbindingin[bundleresource://103.fwk8918249:4/org/slf4j/impl/StaticLoggerBinder.class]SLF4J:Seehttp://www.slf4j.org/co

Java:不区分大小写的枚举 Jersey 查询参数绑定(bind)

我试图覆盖/实现JSR311中的所有属性但是Jersey绑定(bind)似乎敏感:是原始类型有一个接受单个字符串参数的构造函数有一个名为valueOf或fromString的静态方法,它接受单个String参数(例如,参见Integer.valueOf(String))是List、Set或SortedSet,其中T满足上面的2或3。生成的集合是只读的。如何使Jersey绑定(bind)不区分大小写?编辑:代码如下:枚举:publicenumColor{GREEN,BLUE;publicColorfromString(Stringparam){StringtoUpper=param.to