jdk1.4

jdk1.4下json lib使用时所需的jar包版本

孤街醉人 提交于 2020-02-29 09:16:38
因需要在遗留系统(jdk1.4环境)使用到json和java对象的互转,想到用json-lib,遂到官网查看相关文档。 经实践,jdk1.4环境下,正常使用json-lib工具包,需如下jar包: json-lib-2.3-jdk13.jar commons-beanutils-1.8.0.jar commons-collections-3.2.1.jar commons-lang-2.5.jar ezmorph-1.0.6.jar commons-logging.jar 注:json-lib最好不要使用 2.4 版本的(json-lib-2.4-jdk13.jar),在jdk1.4下解析json字符串会有问题。会报如下错误: 问题根源:remove是java.lang.ThreadLocal类的方法,但是jdk1.4中没有这个方法的实现,jdk1.5中才实现。使用会低版本的json-lib就不存在此bug。 来源: oschina 链接: https://my.oschina.net/u/574750/blog/806285

Which PDF Generation API (Java) supports Gujarati Font?

南楼画角 提交于 2020-01-12 13:51:22
问题 I have tried iText, PDFBox & Oracle Forms. And I also succed in case of iText to generate Gujarati PDF Document. But, unfortunately it is not generating proper Font in Gujarati (UTF-8) language. I have my project in jdk 1.4 & that is mandatory to use. So, I need older version of API that support Gujarati Font. Please suggest if any option is available. Sample Code: public void GeneratePDFusingiText(String lStrGujaratidata) { try { BaseFont bf = BaseFont.createFont("C:\\Windows\\Fonts\\Shruti

Which PDF Generation API (Java) supports Gujarati Font?

冷暖自知 提交于 2020-01-12 13:51:03
问题 I have tried iText, PDFBox & Oracle Forms. And I also succed in case of iText to generate Gujarati PDF Document. But, unfortunately it is not generating proper Font in Gujarati (UTF-8) language. I have my project in jdk 1.4 & that is mandatory to use. So, I need older version of API that support Gujarati Font. Please suggest if any option is available. Sample Code: public void GeneratePDFusingiText(String lStrGujaratidata) { try { BaseFont bf = BaseFont.createFont("C:\\Windows\\Fonts\\Shruti

Controling the Volume of an Audio Clip in Java 1.4

痞子三分冷 提交于 2019-12-11 00:39:51
问题 I would have thought that this would be an easy thing to do, but no amount of googling around has turned up any solutions. I have written an application for a client that runs in full screen and allows the user to page through educational books in order to help teach kids to read. So far so good. Some phrases from the displayed materials are read back to the user and, again, so far so good. Normally, these sounds are read at the system volume. (ie, at whatever volume any other system sound

Tomcat 5.5 Monitoring with JDK 1.4 on Windows

独自空忆成欢 提交于 2019-12-08 07:59:53
问题 According to this documentation http://tomcat.apache.org/tomcat-5.5-doc/monitoring.html#Enabling_JMX_Remote it should be possible to remotely Monitor a Tomcat 5.5 Server running on a JDK 1.4 but after searching all over the web and trying multiple OSs I still am no further than on day one. My results thus far are. Settign up Tomcat with the standard -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=%my.jmx.port% -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management

Why the output is different between JDK 1.4 and 1.5?

*爱你&永不变心* 提交于 2019-12-03 12:13:07
问题 I'm running this code with JDK 1.4 and 1.5 and get different results. Why is it the case? String str = ""; int test = 3; str = String.valueOf(test); System.out.println("str[" + str + "]\nequals result[" + (str == "3") + "]"); if (str == "3") { System.out.println("if"); } else { System.out.println("else"); } outputs: on jdk 1.4 str[3] equals result[true] if on jdk 1.5 str[3] equals result[false] else 回答1: According to this page, the Integer#toString method (which is called by String#valueOf

Why the output is different between JDK 1.4 and 1.5?

杀马特。学长 韩版系。学妹 提交于 2019-12-03 03:32:44
I'm running this code with JDK 1.4 and 1.5 and get different results. Why is it the case? String str = ""; int test = 3; str = String.valueOf(test); System.out.println("str[" + str + "]\nequals result[" + (str == "3") + "]"); if (str == "3") { System.out.println("if"); } else { System.out.println("else"); } outputs: on jdk 1.4 str[3] equals result[true] if on jdk 1.5 str[3] equals result[false] else According to this page , the Integer#toString method (which is called by String#valueOf(int) ) is implemented like this in 1.4: public static String toString(int i) { switch(i) { case Integer.MIN

data type to represent a big decimal in java

回眸只為那壹抹淺笑 提交于 2019-11-30 14:52:10
Which data type is apt to represent a decimal number like "10364055.81". If tried using double: double d = 10364055.81; But when I try to print the number, its displaying as " 1.036405581E7 ", which I don't want. Should I use BigDecimal? But its displaying as 10364055.81000000052154064178466796875 . Is there any datatype that displays the values as it is? Also the number may be bigger than the one taken as example. BTW, will using BigDecimal effect the performance of the application?? I might use this in almost all my DTOs. You should use BigDecimal - but use the String constructor , e.g.: new

JNA, Java Native开发利器

痞子三分冷 提交于 2019-11-29 16:21:43
下面的文章由转载而来,java与c++的调用 基本思路是这样子,但是结合我的使用经验,在使用jna和jnative的时候需要考虑到jdk的版本,jnative跟jdk1.4的结合可能会有点问题,因为我之前选的是jnative,而我们的jdk版本是1.4,我们下载的jnative jar不支持1.4版本,这样才换了jna,庆幸jna支持jdk1.4,特作此说明。 -------------------------------------------------------------------------------------------------- 简单的来说,这篇文章就是介绍一个十分好用的Java Native开发工具, JNA。 在Java编程中,大部分时间都不需要理会JNI,但是当你需要调用一个本地的C/C++库的时候,你就不得不考虑如果在Java中调用C库中的接口(dll, so)。这样的情况有很多,比如当你需要访问一个硬件时,而硬件厂商只提供C语言写的驱动和库文件。 刚开始,或许像我一样,大部分人知道Java有一个叫JNI的东西可以做到这一点,还不坏不是么,至少可以实现它。但是JNI的编写相当复杂和拙劣,关键的一点是需要编写C代码,要知道这对于相当一部分Java程序员来说可不是一个容易的事情。除了你要精通C语言,还要熟悉JNI的知识

How to run a task daily from Java?

感情迁移 提交于 2019-11-27 19:11:40
How can I run a task daily at a specified time (say 11:00 am) using java.util.Timer ? I'm using JDK 1.4.2, I know it's old, but it's what the project requires. Quartz is the most well known solution to schedule processes in Java environments, but you have a lot of options. Check this list: Quartz is an open source job scheduling system that can be integrated with, or used along side virtually any J2EE or J2SE application. Quartz can be used to create simple or complex schedules. Jcrontab is designed to be extended and integrated with any project. Reads and stores the tasks to execute in a file