Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes forum!
  • 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
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

problem in classPath

 
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all,
my classpath is :

.;C:\Program Files\Java\jdk1.5.0_07lib\tools.jar;C:\ProgramFiles\Java\jdk1.5.0
_07\bin;C:\Program Files\Java\jre1.5.0_10\bin;C:\Program Files\Java\jre1.5.0_10\
lib;C:\j2sdk1.4.2_04;C:\j2sdk1.4.2_04\jre\lib;C:\j2sdk1.4.2_04\jre\lib\comm.jar;
C:\j2sdk1.4.2_04\bin;D:\gaurav\workBench\ONSStudio;D:\gaurav\workBench\ONSStudio
\Installer\jdom.jar;D:\gaurav\workBench\ONSStudio\Installer\jdom-contrib.jar;D:\
gaurav\workBench\ONSStudio\Pythonfiles\JSGEN;C:\Program Files\Java\jre1.5.0_07;E
:\gaurav\j2ee\apache-tomcat-5.5.20\common\lib\servlet-api.jar

in the start only i've put java 1.5 references, but still it picks java 1.4 versions only and throws me errors for any java 1.5 features

any idea what else i need to do?
 
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The problem is not in your classpath - but most likely in your path environment variable. What is the value of your path?

Regards,
JD
 
author
Posts: 23928
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Another item to look for... if you are not running your Java program directly with the java command, but via a batch file, the classpath may be "initialized" by your batch file.

Henry
 
gaurav abbi
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
my path variable is

C:\Program Files\Java\jre1.5.0_07;C:\Program Files\Java\jre1.5.0_07\bin;C:\j2sdk
1.4.2_04\bin;E:\oracle\ora92\bin;C:\Program Files\Oracle\jre\1.3.1\bin;C:\Progra
m C:\j2sdk1.4.2_04\bin;E:\oracle\ora92\bin;C:\Program Files\Oracle\jre\1.3.1\bin
;C:\Program Files\Oracle\jre\1.1.8\bin;C:\Python24;C:\WINDOWS\system32;C:\Progra
m Files\Microsoft Visual Studio\Common\Tools\WinNT;C:\Program Files\Microsoft Vi
sual Studio\Common\MSDev98\Bin;C:\Program Files\Microsoft Visual Studio\Common\T
ools;C:\Program Files\Microsoft Visual Studio\VC98\bin

and i'm running from command prompt only

java test
 
Marshal
Posts: 76487
366
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I thought it was path not classpath when I saw your first post.
Your first JDK entry is for JDK 1.4; you need to enter your JDK 1.5.0 path in a similar format before the JDK 1.4 entry. Make sure the JDK entries end with \bin (Windows, I think /bin on Linux), and you would probably do well to delete the 1.4 entry.

When the computer looks for the entry "java" using the path as set up, the first one it finds is in your jdk1.4 installation; if you require Java 5 features, your application will crash.

Please check whether the jre entries ought to end with \bin too.

Hope this helps.

CR
 
gaurav abbi
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all,
thanks for your replies, its working now..

but i've one doubt.
whats the difference b/w "classpath" and "path" variable.
 
Sheriff
Posts: 11343
Mac Safari Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by gaurav abbi:
...whats the difference b/w "classpath" and "path" variable.


See PATH and CLASSPATH.
 
I don't even know how to spell CIA. But this tiny ad does:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic