• 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

Compiler Error Version Problem

 
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have installed jdk 1.5 and jdk 1.3 in my pc..

I want to compile code using 1.3 How can i do it

I have set
classpth = jdk1.3/lib
path =jdk1.3/bin
java_home = jdk1.3

But it is take jdk1.5 in java -version

i dont want to use javac -source 1.3 *.java

because i think this is compile by 1.5 according to java 1.3 so my another(java 1.3) server given error (MajorMinor Version 59.0 ) so how can i compile java file using jdk1.3 without remove jdk1.5...
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

But it is take jdk1.5 in java -version


So your PATH is no set properly.
 
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
If you type in "set PATH" in a command prompt, it will show you what the PATH is set to. Is JDK 1.5 still in the path, before JDK 1.3?

Windows looks at the path from left to right, so if JDK 1.5\bin is in the PATH before JDK 1.3\bin, it will use JDK 1.5.
 
Nilesh Patel
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My path setting is C:\jdk1.3.1_17\bin
 
Nilesh Patel
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here is the List of all My set variables:

C:\jdk1.3.1_17>set
ALLUSERSPROFILE=C:\Documents and Settings\All Users
APPDATA=C:\Documents and Settings\User\Application Data
CATELINA_HOME=C:\Program Files\java\Tomcat 5.0
CLASSPATH=C:\jdk1.3.1_17\lib;C:\Program Files\jdk1.5.0_06\lib;C:\Program Files\j
ava\Sun\AppServer\lib\j2ee.jar;.;
CommonProgramFiles=C:\Program Files\Common Files
COMPUTERNAME=KISPL-WEBRAJ-03
ComSpec=C:\WINDOWS\system32\cmd.exe
FP_NO_HOST_CHECK=NO
HOMEDRIVE=C:
HOMEPATH=\Documents and Settings\User
J2EE_HOME=C:\Program Files\java\Sun\AppServer
JAVA_HOME=C:\jdk1.3.1_17
LOGONSERVER=\\KISPL-WEBRAJ-03
NUMBER_OF_PROCESSORS=2
OS=Windows_NT
Path=C:\Program Files\Corel\Corel SVG Viewer\;C:\WINDOWS\system32;C:\WINDOWS;C:\
WINDOWS\System32\Wbem;C:\Program Files\Microsoft SQL Server\80\Tools\BINN;C:\Pro
gram Files\IDM Computer Solutions\UltraEdit-32;C:\jdk1.3.1_17\bin
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER=x86 Family 15 Model 4 Stepping 3, GenuineIntel
PROCESSOR_LEVEL=15
PROCESSOR_REVISION=0403
ProgramFiles=C:\Program Files
PROMPT=$P$G
SESSIONNAME=Console
SystemDrive=C:
SystemRoot=C:\WINDOWS
TEMP=C:\DOCUME~1\User\LOCALS~1\Temp
TMP=C:\DOCUME~1\User\LOCALS~1\Temp
USERDOMAIN=KISPL-WEBRAJ-03
USERNAME=User
USERPROFILE=C:\Documents and Settings\User
windir=C:\WINDOWS
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Where is 1.5 installed ?
 
Nilesh Patel
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have found two copy of jdk1.5

jdk1.5

C:\Program Files\java\jdk1.5.0_06
C:\Program Files\jdk1.5.0_06

jdk1.3

C:\jdk1.3.1_17
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Check in each of the following directory if there is a java.exe in it:
1. C:\Program Files\Corel\Corel SVG Viewer\
2. C:\WINDOWS\system32
3. C:\WINDOWS
4. C:\WINDOWS\System32\Wbem
5. C:\Program Files\Microsoft SQL Server\80\Tools\BINN
6. C:\Program Files\IDM Computer Solutions\UltraEdit-32
 
Nilesh Patel
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I have found java.exe in

C:\WINDOWS\system32

it might be for jre 1.5 which i have installed explicitly because some applet requre 1.5 so i have installed for browser...

i am wonder that if i have uninstalled jre 1.5 then applet not running ..
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's ok. Correct your PATH variable so that 1.3 comes first.
For example :
Path=C:\jdk1.3.1_17\bin;C:\Program Files\Corel\Corel SVG Viewer\;C:\WINDOWS\system32;C:\WINDOWS;C:\
WINDOWS\System32\Wbem;C:\Program Files\Microsoft SQL Server\80\Tools\BINN;C:\Pro
gram Files\IDM Computer Solutions\UltraEdit-32
 
Nilesh Patel
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
in path variable some value come automatically so my

Path =C:\jdk1.3.1_17\bin

become

Path=C:\Program Files\Corel\Corel SVG Viewer\;C:\WINDOWS\system32;C:\WINDOWS;C:\
WINDOWS\System32\Wbem;C:\Program Files\Microsoft SQL Server\80\Tools\BINN;C:\Pro
gram Files\IDM Computer Solutions\UltraEdit-32;C:\jdk1.3.1_17\bin

How can i take first C:\jdk1.3.1_17\bin in Path variable..
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

in path variable some value come automatically


Well, it does not come magically
Go the System Properties (right click on My Computer).
Select the Advanced tab, and go to "Environment Variables".
Here, you'll see the PATH. Modify it so that 1.3 comes first.
 
Nilesh Patel
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Okay not automatically but implicitly..

means I have installed some software so it is come implicitly

Right now only one value in path and it is "jdk1.3" but it is come last..
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic