运行Ant报Out of Memory错误
June 28, 2009 – 7:49 pm|
执行ant时报Out of Memory错误。 解决办法: 设置环境变量ANT_OPTS指定JVM使用的内存。 Bash: % export ANT_OPTS=”-Xms128m -Xmx256m” Windows cmd: C:> set ANT_OPTS=-Xms128m -Xmx1024m >ant jar |
Web开发者日志 自强不息
|
执行ant时报Out of Memory错误。 解决办法: 设置环境变量ANT_OPTS指定JVM使用的内存。 Bash: % export ANT_OPTS=”-Xms128m -Xmx256m” Windows cmd: C:> set ANT_OPTS=-Xms128m -Xmx1024m >ant jar |
|
<bean id=”entityManagerFactory” class=”org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean”> |
|
The new clauses can be added to any SELECT statement, and they’re defined like this:
(No, I’m not kidding, the standard actually requires you to type all those seemingly redundant keywords…) You can use FETCH and OFFSET both alone and in combination with each other. For example, to select the three persons with the highest score from a table, you’d use a FETCH clause and no OFFSET clause, like this: 阅读全文 » |
|
Derby是开源的基于Java的关系型数据库,采用Apache License 2.0,目前已经包括在jdk6 update6中。 它有2种发布模式: 阅读全文 » |
|
public class SubReportsDemo { Class.forName(”org.apache.derby.jdbc.ClientDriver”); |
|
今天配置SVN出现以下现象 |
|
是否打印过程发生了问题 查看了JDK API的说明,发现在使用字体的时候,我没有特别设定,使用了默认字体。写了一个简单的输出平台默认字体的类,得到的字体却是一样的信息: Default font:java.awt.Font[family=Dialog,name=Dialog,style=plain,size=12] 1) 指定打印到图片的字体为中文 g2d.setFont(new Font(”宋体”, Font.PLAIN, 12)); 2) 上传WinXp 中的宋体字体文件到服务器(Solaris) 阅读全文 » |
|
使用jpa时特别要注意keep的class,包括方法名称,及keep属性设置 http://proguard.sourceforge.net/manual/examples.html#annotations 选项如下: -keepattributes Exceptions,InnerClasses,Signature,Deprecated, -keepnames class * implements java.io.Serializable -keepclassmembers class * implements java.io.Serializable { |
|
在使用ant编译项目的时候经常会遇到“警告:编码 GBK 的不可映射字符”这样的信息,这个主要是因为我们在写代码的时候加入了一些中文注释,而导致编译时候出现的问题。要处理这个问题,仅仅只需要在 build.xml文件中的调用javac的地方加入encoding的参数。 如下所示: <javac encoding=”utf-8″ destdir=”${compile.dir}” 阅读全文 » |
|
虽然是C#的,但用java也类似。 项目快完成了,最后要加上注册验证,翻了n多资料,终于做出来了。现在把体验说一下,以后要用的时候也好找。~~ .Net自带的类库里面有个算法。 |