• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Resources sorting in CLASSPATH are not same in different Linux kernels

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I have two environment base on following Linux operating systems, and the JDK version are same as j2sdk1.4.2_12, and locale are also same as en_US.UTF-8.

Linux server1 2.6.9-22.ELsmp #1 SMP Mon Sep 19 18:32:14 EDT 2005 i686 i686 i386 GNU/Linux
Linux server2 2.6.9-42.0.3.ELsmp #1 SMP Mon Sep 25 17:28:02 EDT 2006 i686 i686 i386 GNU/Linux

My problem is the resources sorting in CLASSPATH are different in preceding two operating systems. Here is the sample.

Server 1: CLASSPATH=../../a/PbcSrc.zip:../../a/Pbc.jar
Server 2: CLASSPATH=../../a/Pbc.jar:../../a/PbcSrc.zip

Since the only difference of two environment is the kernel version, does it influence the sorting of resources in CLASSPATH?


Best regards,
Leon
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The CLASSPATH is an environment variable that you set yourself somewhere, in a configuration file or startup or login script. The system does not automatically set it for you. The Linux kernel does not have anything to do with your CLASSPATH.

You must have slightly different configuration / startup / login scripts on the two systems somewhere.

By the way, it's not a good idea to write Java programs that rely on the fact that things in the CLASSPATH are in a certain order - it makes your program very susceptible to small system configuration changes.
[ November 08, 2006: Message edited by: Jesper Young ]
reply
    Bookmark Topic Watch Topic
  • New Topic