做了全新的Eclipse,JDK和android-sdk安装.
我目前在创建新项目时收到此错误
[2010-09-26 16:07:56 - 测试]错误:无法打开类文件C:\ workspace\Test\gen\com\example\test\R.java:没有这样的文件或目录
这是什么原因,我该如何解决?
Eclipse Helios 32 bit
java version "1.6.0_21"
Android sdk API 8
Run Code Online (Sandbox Code Playgroud)
PS我是Android开发的新手.
编辑:我尝试了大多数解决方案,但没有任何效果.所以我开始使用我朋友安装的Eclipse Ganymede.
我正在迁移我们的java-ee项目以使用Maven而不是Ant.
对于以下依赖项
<dependency>
<groupId>javolution</groupId>
<artifactId>javolution</artifactId>
<version>5.4.2</version>
</dependency>
Run Code Online (Sandbox Code Playgroud)
尝试编译时出现以下错误
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.
3.2:compile (default-compile) on project JAdaptiv: Compilation failure
[ERROR] error: error reading C:\Users\User.IVSTEL1\.m2\repository\javolution\
javolution\5.4.2\javolution-5.4.2.jar; invalid CEN header (bad signature)
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal o
rg.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on
project JAdaptiv: Compilation failure
error: error reading C:\Users\User.IVSTEL1\.m2\repository\javolution\javoluti
on\5.4.2\javolution-5.4.2.jar; invalid CEN header (bad signature)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:213)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
ct(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
ct(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBu
ild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(Lifecycl
eStarter.java:161) …Run Code Online (Sandbox Code Playgroud) 我正在运行Jenkins版本1.411并使用Maven进行构建.
即使应用程序成功构建,Jenkins也将其视为不稳定的构建.我已禁用所有测试以隔离问题.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 45.389s
[INFO] Finished at: Wed May 11 12:16:57 EST 2011
[INFO] [DocLinks] Skip document Adaptiv generated site ... (No such directory: site)
Final Memory: 27M/543M
[INFO] ------------------------------------------------------------------------
channel stopped
Archiving artifacts
Email was triggered for: Unstable
Sending email for trigger: Unstable
An attempt to send an e-mail to empty list of recipients, ignored.
Finished: SUCCESS
Run Code Online (Sandbox Code Playgroud) 运行我的Spring/Hibernate应用程序时,我在控制台上看到以下不需要的输出:
Hibernate: select securityus0_.ID ....
Hibernate: select securityus0_.ID ....
Hibernate: select securityus0_.ID ....
Hibernate: select securityus0_.ID ....
Run Code Online (Sandbox Code Playgroud)
我已经配置了我的Log4j记录器,如下所示:
<logger name="org.hibernate">
<level value="FATAL"/>
</logger>
<category name="STDOUT">
<priority value="WARN"/>
</category>
<category name="STDERR">
<priority value="WARN"/>
</category>
<!-- for all other loggers log only info and above log messages -->
<root>
<priority value="WARN"/>
<appender-ref ref="STDOUT" />
</root>
Run Code Online (Sandbox Code Playgroud)
我如何沉默这些消息?
我有单点登录工作漂亮,但单点登出不起作用.
场景是这样的:
两个应用程序的注销按钮首先调用session.invalidate()然后重定向到https://localhost:8443/cas/logout
单点注销过滤器是web.xml文件中的第一个过滤器.我也有SingleSignOutHttpSessionListenerweb.xml.
以下是我的web.xml摘录
<!-- CAS settings -->
<!-- Use filter init-param if your container does not support context params.
CAS Authentication Filter and CAS Validation Filter need a serverName init-param
in lieu of a context-param definition. -->
<context-param>
<param-name>serverName</param-name>
<param-value>https://localhost:8443</param-value>
</context-param>
<!-- Facilitates CAS single sign-out -->
<listener>
<listener-class>org.jasig.cas.client.session.SingleSignOutHttpSessionListener</listener-class>
</listener>
<!--
CAS client filters
Single sign-out filter MUST come first since it needs to be evaluated
before …Run Code Online (Sandbox Code Playgroud) 我正在使用Spring 3.0.5和Junit 4.8.2在测试期间是否可以使用多个事务管理器?
基本上我会尝试这样的事情.我需要在测试期间从两个单独的数据库中添加和删除内容.
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = { "classpath:/applicationContext-test.xml" })
@TransactionConfiguration(transactionManager = "txMgrA", defaultRollback = true)
@TransactionConfiguration(transactionManager = "txMgrB", defaultRollback = true)
@Transactional
public class SampleTest {
...
}
Run Code Online (Sandbox Code Playgroud) 我们有一个服务器应用程序和两个独立的客户端应用程序(两个都有不同的功能 - 一个用于前台,另一个用于后台).一切都是用Java编写的.
我们现在需要的是:如果两个应用程序都在运行 - 单击一个应用程序中的按钮 - >检查其他应用程序是否打开并触发该应用程序上的某些功能(显示消息,打开一个框架)
如果其他应用程序未打开 - >它应显示一条消息说明.
任何人都可以指出我正确的方向来实现这一目标.我能给出的最好的现实生活示例是:如果安装了iTunes应用程序,那么点击Web浏览器中的itunes链接会打开相关的appstore页面.
编辑:我们的应用程序根本不涉及网站.一切都使用Swing.