我在eclipse中做了一些新的警告设置.有了这些新设置,我面临一个奇怪的警告.阅读后我知道它是什么,但找不到删除它的方法.
这是我的示例代码问题
public class Test {
private String testString;
public void performAction() {
new Thread( new Runnable() {
@Override
public void run() {
testString = "initialize"; // **
}
});
}
}
Run Code Online (Sandbox Code Playgroud)
带**的行在eclipse中给我一个警告
Read access to enclosing field Test.testString is emulated by a synthetic accessor method.
Increasing its visibility will improve your performance.
Run Code Online (Sandbox Code Playgroud)
问题是,我不想更改访问修饰符testString.另外,不想为它创建一个getter.
应该做些什么改变?
More descriptive example
public class Synthetic
{
private JButton testButton;
public Synthetic()
{
testButton = new JButton("Run");
testButton.addActionListener(new ActionListener() {
public …Run Code Online (Sandbox Code Playgroud) 我的系统有findstr.exe但是当我尝试执行它时,它会给我以下错误
FINDSTR: Bad command line
Run Code Online (Sandbox Code Playgroud)
尝试了很多东西,但无法修复.我需要在我的批处理脚本中使用正则表达式.
还有其他建议吗?
我正在使用spring-hibernate并使用HibernateDAOSupport类.我有两个表以一对多的方式相互映射.我正在实施以下标准
DetachedCriteria criteria = getCriteria( "a" )
.setProjection( Projections.projectionList()
.add( Projections.groupProperty("a.id" ) )
.add( Projections.count( "a.id" ), "count" )
)
.createCriteria( "huApps", "hu")
.addOrder( Order.desc( "count" ) )
;
Run Code Online (Sandbox Code Playgroud)
这很好用,并创建以下查询
select
this_.id as y0_,
count(this_.id) as y1_
from
apps this_
inner join
huapps huapp1_
on this_.id=huapp1_.appid
group by
this_.id
order by
y1_ desc
Run Code Online (Sandbox Code Playgroud)
结果,它返回一个列表object[].但我希望它应该返回List<App>(App是我实现/创建标准的类).我希望它会创建查询
select
this_
from
apps this_
inner join
huapps huapp1_
on this_.id=huapp1_.appid
group by
this_.id
order by
y1_ desc
Run Code Online (Sandbox Code Playgroud)
请帮我写出正确的标准.我也尝试过,sqlProjection()但即使这样也行不通.有什么办法可以实现吗?
是否有任何Java API可以拨打移动电话(前提是服务提供商支持将安排拨打电话)?
myProgram(A) --> Java API to make a call like Skype(B) --> PSTN/Mobile network support(c)
Run Code Online (Sandbox Code Playgroud)
模块A将是我的Java代码,它将调用B的API,然后将调用转移到我的服务提供商.
我正在寻找B级的API.另外,我没有使用Android.我想在我的服务器上运行此代码.
我试过并降落到skype.对于使用Skype,应该在机器上安装Skype(我不想要).
还有其他解决办法吗?
我需要检查服务器是否启动?如果失败然后我需要发送电子邮件这个任务应该每隔30分钟重复一次.
我必须使用批处理文件.
我是memcached和sharding的新手.
我去过两篇文章.我需要在我的应用程序中实现它们.
我经历的文章很好,但没有一个给我如何使用这些技术.
任何人都可以向我建议我可以实际配置它们并运行样本的链接.
我想首先实现memcached,然后分片,然后将它们两者结合在一起.
谢谢你的帮助.
我想在java中编写ajax代码,即我想在不使用ajax的情况下使用ajax的功能.我正在寻找一些可以这样做的JAVA API.
就像我们通过JAVA程序发布网页数据一样,我想通过JAVA程序执行ajax的操作.
请建议.
java ×4
windows ×2
ajax ×1
batch-file ×1
command ×1
command-line ×1
criteria ×1
eclipse ×1
gwt ×1
hibernate ×1
javascript ×1
memcached ×1
performance ×1
phone-call ×1
postdata ×1
regex ×1
sharding ×1
spring ×1
tar ×1
unix ×1