java1.4

How to see if a substring exists inside another string in Java 1.4

How can I tell if the substring "template" exists inside a String in java 1.4 It would be great if it was a non case sensitive check. Thanks! ...

Recommendations for a Java 1.4 MVC framework for Jrun?

I am revisiting a project and need to limit it to Java 1.4 (unfortunately). I was interested in introducing a MVC framework to improve ease of maintenance in the future. Besides Struts 1, what options do I have? The lightweight the framework, the better. Not to dismiss Struts off hand, I've just heard a lot of bad things about it. If a...

Examples of how to add an iterator to a custom class in Java 1.4?

Could someone give me an example of the best way to add an iterator to a custom class pre Java 5's iterable interface? Would wrapping a Collection be the best option? Something like public Iterator iterator() { return wrappedCollection.iterator(); } In my initial post I confused Iterator with Iterable. The end result I am interes...

Backport Java 5/6 features to Java 1.4?

We are stuck with Java2SE v1.4 till the end of 2010. That's really nasty, but we can't help it. What options do we have to use some of the new features already now? I can think of several ways like changing the bytecode, e.g. using Retrotranslator or Retroweaver. backport of libraries, e.g. Concurrent Backport, but this does not help f...

Alternative to enum in Java 1.4

Since Java 1.4 doesn't have enums I'm am doing something like this: public class SomeClass { public static int SOME_VALUE_1 = 0; public static int SOME_VALUE_2 = 1; public static int SOME_VALUE_3 = 2; public void receiveSomeValue(int someValue) { // do something } } The caller of receiveSomeValue...

Accessing Windows system variables in Java 1.4

What is the best/foolproof way to get the values of environment variables in Windows when using J2SE 1.4 ? ...

Is Java bytecode compatible with different versions of Java?

If I compile an application using Java 5 code into bytecode, are the resulting .class files going to be able to run under Java 1.4? If the latter can work and I'm trying to use a Java 5 framework in my Java 1.4 application, is there anything I should watch out for? ...

java 1.4 :how to insert multiple records in a database with one single hit using executeBatch?

i am reading records data from a file(records count can be up to thousands ).Now i want to insert each record in to database.I want to insert all of records in one hit to reduce performance hit. If i use addBatch(String sqlQuery ) on statment object,my sql query should be static .but in my case query will be non static.Please tell me pos...

Null Object When Passed Into An Anonymous Inner Class

When passing a final object (A String in the code below) it shows up as null when printed from the anonymous inner class. However, when a final value type or straight final String is passed in, its value is correctly displayed. What does final really mean in context of the anonymous inner class and why is the object passed null? publi...

Web service frameworks for Java 1.4?

We want to implement web services on our Weblogic 8.1 Java 1.4 application. We want to create new server services and call services in other apps. And we need to stick with Java 1.4 (for now). Due to 1.4 we can't use frameworks like Restlet or Jersey. Are there any good web service (preferably REST) API frameworks that support Java 1...

java:not able to set auto commit mode with value false in java 1.4 api?

sql server 200 java 1.4 jboss 3 HI am getting exception message "You cannot set autocommit during a managed transaction" code is below try { try { connection = getConnection(); } catch (Exception e) { throw new ConnectionException(e.getMessage()); } for(int i=0;i<recordIds.size();i++) { String cu...

how to call procedure in database asynchronously from java 1.4 code?

platform: Sql server 2000 java 1.4 ejb 3.0 ...

To use AES with 256 bits in inbuild java 1.4 api.

I am able to encrypt with AES 128 but with more key length it fails. code using AES 128 is as below. import java.security.*; import javax.crypto.*; import javax.crypto.spec.*; import java.io.*; /** * This program generates a AES key, retrieves its raw bytes, and * then reinstantiates a AES key from the key bytes. * The reins...

What are default settings used by .net user login control api for AES algorithm?

I am using same user name and password login for a user on two web applications (one in .net 3.5 and other in java 1.4). Both websites are using different database on same server.For maintaining user name password authentication .net user login-control is used.when user updates his password we need to update same password in database use...

Posting a SOAP XML to an SSL

When I try to post the XML to an SSL link by the following code public void send(String url, String xmldoc) { StringBuffer sb = new StringBuffer(); try { ByteArrayInputStream bais = new ByteArrayInputStream(xmldoc .getBytes()); InputSource is = new InputSource(bais); DocumentBuilderFactory factory = DocumentBuil...

Java 1.4, compile java class from source file like ToolProvider class of the jdk 1.6

There is a standard way to compile a java class from a .java file like do the ToolProvider class of the jdk 1.6 but with Java 1.4: JavaCompiler compiler = ToolProvider.getSystemJavaCompiler(); int result = compiler.run(null, null, null, "Hello.java"); ?? Anyone have some idea. Many thanks. ...

Is it possible to complie Java 1.5 source Web Applications to 1.4?

I tried compiling my webapplication with javac – source 1.5 – target 1.4 I end up with the error: javac: source release 1.5 requires target release 1.5 Since I’m using generics and other features; when I try compiling with –source 1.4 I end up with the errors: (use -source 5 or higher to enable generics) (use -source 5 or higher to en...

Java 1.4 to Java 6 migration

Hi, I have some enterprise apps running on Java 1.4. They mostly invoke Stored Procedures on a DB, Parse XML files (at the most few megs large), read and write from and to disk. We have a requirement where now we have to migrate these apps to Java 6(No code changes to be done at all). My questions: If I don't recompile my apps under...

How To Replace @Resource Annotation with Java 1.4 Compliant Version

Hello, I have a test class that has a @Resource annotation for a setter and I need to make it Java 1.4 compliant, so obviously the annotation has to go. I'm using Spring. So, how would I replace something like @Resource("my.resource") so that the setter gets the correct dependency injection? Would I need to make a bean in an xml file? ...

What is the Java 1.4.2 equivalent of Pattern.quote()

What would be a Java 1.4.2 equivalent of Pattern.quote? I was using Pattern.quote() on a URI but now need to make it 1.4.2 compatible. ...