Version « Development « Java I/O Q&A





1. How do you handle developer individual files under version control?    stackoverflow.com

Some files in our repository are individual to each developer. For example some developers use a local database, which is configured in a properties file in the project. So each developer ...

2. Get code file version diff showing methods (names) impacted    stackoverflow.com

I want to get a diff between two versions of a code file (of the Java/C#) variety - and from that get a list of methods (names) impacted. Has this been ...

3. How to determine a proper serial version ID?    stackoverflow.com

How to determine a proper serial version ID? Should it be any big long value using some generators or any integer wld suffice ?

4. handling Java custom serialization with multiple versions of serializer classes?    stackoverflow.com

I have a custom data storage format I'm implementing on top of either HDF5 or NetCDF. My data format evolves occasionally (but rarely), and it is important to be able to ...

5. How do you move **all** versions of files from one folder to another in Documentum using DFC    stackoverflow.com

This piece of code moves all current versions of files from one folder to another but leaves all older versions unmoved. (Context is java code of DFC accessing Documentum.)

 String strObjId ...

6. writing junit test to cover cross version serialization    stackoverflow.com

does any of you have any info/idea on how can I test my application for cross version compatibility. I am testing these object's serialization in current "HEAD" version. but I need ...

7. java - is it possible to choose version number when compile a file?    stackoverflow.com

I've wrote a java code and compiled it. (foo1.6.class) According to my search, my local machine has Java 1.6, and the tomcat server that I uploaded foo1.6.class only accepts version number 1.5 ...

8. Managing serveral versions of serialized Java objects    stackoverflow.com

Lets say that I have a program that for some reason need to handle old versions of serialized objects. Eg: when deserializing, one of these versions may be encountered.

class Pet {
  ...

9. Is serialized object compatible in all version of java?    stackoverflow.com

My friend asked me if we serialize an object in java 1.5 and then deserialize it back in java 1.6 then it will throw an exception. What is that exception and ...





10. What changes can make serialized class versions incompatible?    stackoverflow.com

I'm experimenting with the java serialization API to create small persistent objects. In my research I have found a lot on the importance of versioning, so you can detect and ...

11. Data format compatibility between Thrift versions    stackoverflow.com

I am trying to upgrade a system that uses Thrift 0.2 libraries for communication. Since this is rather old version (latest stable is 0.5), and there have been alleged significant improvements ...

12. Existing solution for file deltas/versioning in Java    stackoverflow.com

When versioning or optimizing file backups one idea is to use only the delta or data that has been modified. This sounds like a simple idea at first but actually determining where ...

13. Get version of a .pkg file?    stackoverflow.com

I have a Java application for MAC OSX that I have coded and made a .pkg of it. While creating the .pkg I gave it a version number also. ...

14. How to deal with a Java serialized object whose package changed?    stackoverflow.com

I have a Java class that is stored in an HttpSession object that's serialized and transfered between servers in a cluster environment. For the purpose of this explanation, lets call this ...

15. Why does serialization require a serial version UID in implemented class?    stackoverflow.com

Why does serialization require a serial version UID in implemented class?

16. Upgrade path for json file format    stackoverflow.com

We are storing user preferences for a Java app in a JSON file using Jackson. As we continue to develop the app, we will be adding preferences, renaming ...





17. Howto deserialize class, if class version was changed    stackoverflow.com

I want to write the code, that can deserialize the class even if the class was changed (but you have old class version). The idea is simple.

  1. Read the serialVersionUID of ...

18. XmlID/XmlIDREF and inheritance in latest JAXB version (Java 7)    stackoverflow.com

I am using @XmlID and @XmlIDREF tags to reference one object from another. It was working fine in Java 6 even with inherited classes. The example code I've created looks like ...

19. file versioning control using java.    stackoverflow.com

My requirement is,In my project,i maintained a folder which have set of images which are uploaded by user.but user can upload same named image n number of times.to overcome this overhead ...

20. SVNKit - Check if Directory exists    stackoverflow.com

So, I've created a project TEST under an SVN repository and I want to know if this project directory exists with SVNKit library. Protocol is http. I tried for example...

  private ...

21. J2SE version in the JNLP file    coderanch.com

When I specify J2SE version 1.3 in my .jnlp fileas follows - it starts looking for jre of j2se 1.3, despite of the fact that machine has j2se 1.4 installed on it. Is there a way to specify the version in such a way that it will accept that version or any version which is higher than the specified ...

22. how to check version of a file in java    coderanch.com

i want to check the version of a .dll fine on the client side with signed aplet. can any one help me in thi sregard that how can the version be checked. i can check the date and time stamp .. and file permissions like readable and writeable but not version so can any one guide me in this regard that ...

23. class versioning    coderanch.com

Hi, I know that a serialVersionUID must be added to all subsequent versions of a class to maintain backwards compatibility. How would one handle the case where second version of the class did not specify a serialVersionUID to deserialize a serialized first version of the class. I'm getting a "local class incompatible" error message due to different serialVersionUID values. That ones ...

24. Strange problem when chaning java version    coderanch.com

Hi I was hoping someone could help me out with this rather strange error. I'm running a server application on a Weblogic 8.1 (Which means it runs java 1.4.2_08). I then connect to a server with a client compiled and ran with Java 1.5.0_10 which works just fine. Now I try to RUN (Not compile) the same client with Java 1.6.10_10Rc ...

25. get ocx file version in java    coderanch.com

26. versions to maintain the files    coderanch.com

27. Object Serialization (version UID) Question    coderanch.com

It has been a *long* time since I did this, I can't seem to remember the correct thing to do... Ok, if I just want to make some data object serializable, I just have to implement Serializable -- got that. The compiler will give it a version UID so that if the source changes it can resolve that it may not ...

28. How can we get the file version    coderanch.com

hey i have 2 files in which one of files compiled by jdk1.4 version and the other jdk 1.5 versions the 2 files has same name.. my fnd uses jdk1.5 when i give him class file which was compiled by jdk 1.5 version he gets an error msg when ran with jdk1.4 version.. so is there any way to see the ...

29. Serializing java.util across different Java versions    coderanch.com

I've got some code that uses a java.util.ArrayList (which implements Serializable) to send objects back and forth between different systems on the network. We have application server and MQ upgrades coming up, and I'm concerned that serialization will break when we do the upgrade. Basically, I'll have something like this: System 1: IBM JVM 1.4.2 System 2: IBM JVM 1.5.x The ...

30. How to compile a file with J2SE 1.3.1 written in a older version    coderanch.com

I downloaded some files from the internet, written in swing 1.1 and I trying to compiling that with J2SE 1.3.1 and I got the message that the package com.sun.java.swing.text.*; I know that the change thepackage name after that to javax.swing and I try to change it in the java classes that I downloaded but that generate anothers errors. I downloaded from ...

31. How to find the jdk version used to compile a file    coderanch.com

As that Wikipedia article explains, the version number Jesper mentioned is contained in bytes 7 and 8 of a class file. But it shouldn't be necessary to look at the file contents: the error message should tell you which class version was found; with that number and the table Jesper posted you can determine which JDK version is needed.

32. Do I Need All These Versions of the JDK..I mean the JRE files?    coderanch.com

Ah, thanks very much. I was hoping I could get rid of some of the updates. Yes, I am using Vista so I will delete with the control panel. It's a shame it doesn't automatically remove the old version after the update. I am loving learning this language. There is a beauty in it.

33. serialized objects in old versions of java    coderanch.com

I remember having trouble deserializing an object once because the version of Java (I think it was 1.3) was older than the version of java that was used to serialize the object (maybe 1.5?) I also remember being successful doing the exact same thing. Well, I want to know, what are the rules for deserializing objects? That is, if you serialize ...

34. Serialization - different JVM version ?    coderanch.com

@ Kri shan See this Following is a quote from documentation The serialization runtime associates with each serializable class a version number, called a serialVersionUID, which is used during deserialization to verify that the sender and receiver of a serialized object have loaded classes for that object that are compatible with respect to serialization. If the receiver has loaded a class ...

35. error while using Rtfwriter by iText version 2.1.3    coderanch.com

hello all, I am working on a requirement of generating a RTF document using iText API. When i am using iText1.4.8 jar file there is no exception and RTF file is successfully generated. But I got the following below exception when I am using iText 2.1.3 and iText-rtf-2.1.7 jar files. (because after iText-1.4.8.jar version, support of rtf is moved.) Exception in ...

36. Is there any efficient and tested java util library that has a java version of the tail command?    coderanch.com

Hi, I'm wondering if anyone knows of any java util library (like Apache Commons) that has an efficient and tested java implementation of the unix tail command? By effective I mean that it should be able to handle very large files (>1GB), with various unknown line lengths, quickly without lots of I/O or high memory usage. And by tested I mean ...

37. Checking file version, date and time stamp created    coderanch.com

I am thinking of a way if possible ? to write a program in java to check particular files in particular directory in windows of above mentioned attributes - the version of the file the date it was created the time it was created these are mainly txt, bat for the time stamp check and exe, dll for time stamp and ...

38. How to run a java file with any one JRE version when two JRE's are available.    coderanch.com

Here's a real-world case: I'm using NetBeans 6.9. It only runs on Java 6, so I have Java 6 installed on my development machine. However, the software that we're building has to be able to run on Java 5 - we need to test it on a Java 5 virtual machine. So I also have Java 5 installed to be able ...

39. Why does serialization require a serial version UID in the subclasses of the implementing class.    coderanch.com

The serialVersionUID is used to determine compatibility between the deseralized object and current version of the class. and serialVersionUID is static , means *specific to a class*, not an objects of the class . so every class should contain serialVersionUID separately. more over, a two different class can have same serialVersionUID. serialVersionUID is a serialization stream unique identifier

40. finding java compiler version of a war file    coderanch.com

Welcome to the Ranch! I don't think there is an easy way to find that out directly from a war file. However, you could look inside the war file for *.class files (in the WEB-INF/classes directory). This blog post explains how you can get the version number of a class file using javap (a tool that is included with the JDK). ...

41. Class Version in Serialization    java-forums.org

Hi, Please let me clear about the following, While serializing a class object, a unique version UID of data type long created by the compiler for the class file as version identifer. Also that it is possible to define the serialVersionUID variable manuallly in the java code. But, We know that static variables are not serialized. It means the version UID ...

42. Get file product version etc..    java-forums.org

44. How to get the file version?    forums.oracle.com

45. How to check the JDK version of a compiled java file    forums.oracle.com

If you have a Java 1.4 JRE and a Java 1.5 JRE installed as well as your Java 1.6 JRE you can just try if it will load on a Java 1.4 JRE, then on the Java 1.5 JRE. Alternatively you can dig into the class file and check the major/minor version numbers. For me the first hit on Google was ...

46. How To Managed Serialized Data Over Multiple Application Versions    forums.oracle.com

Lately I've been struggling with deciding how to deal with serialized data between application versions. Assume you have some software that has to be able to save data files. As the application evolves, the data format changes. The application needs to be able to load data saved from prior application versions. When I first started out I just used a Serializable ...

47. Serialization and Java bytecode version    forums.oracle.com

I have the following scenario: the server sends serialized objects compiled with java 1.5 (the source code is compilable with java 1.4) to clients running java 1.4. I thought I would have problems and conflicts of java versions but the application runs fine. Is there any risk in such scenario? I mean, would it be better if I compiled with java ...

48. Get version of WAR file on manifest.    forums.oracle.com

public String getClientVersion(){ try { Class cls = Class.forName ( "com.sismed.principal.IWG2" ); ProtectionDomain pDomain = cls.getProtectionDomain(); CodeSource cSource = pDomain.getCodeSource(); URL loc = cSource.getLocation(); JarFile jar = new JarFile ( new File(loc.getFile()) ); Manifest manifest = jar.getManifest(); Attributes attrs = (Attributes) manifest.getMainAttributes(); String clienteVersion = attrs.getValue("Specification-Version"); return clienteVersion; } catch (ClassNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } ...

49. Java version of Unix "file" utility?    forums.oracle.com

Could someone point me toward a Java implementation of the file (1) utility? I need to examine uploaded files to make use they really are what their MIME type and extension say they are. Writing utility classes from scratch to read the magic number in the file header seems like reinventing the wheel. thanks!

50. Building Files using different JDK version in single project.    forums.oracle.com

Hello, In my current project i have to implement a web service client which works with JDK6 but the project in which i need to integrate the client is build using JDK5. Is it possible that i can build the web service client package using JDK6 and rest of the project using JDK5? Please help me