Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / First Aid / March 2004

Tip: Looking for answers? Try searching our database.

Reverting to 1.4.2 without uninstalling 1.5.0

Thread view: 
Wendy S - 02 Mar 2004 21:41 GMT
I just installed 1.5.0 beta, but for the moment I need to continue working
with 1.4.2 on Windows 2000.

(Why is there no javac -version option??)  I've left JAVA_HOME set to
c:\j2sdk1.4.2_03, and Cygwin reports:
$ which javac
/cygdrive/c/j2sdk1.4.2_03/bin/javac

So I'm pretty sure I'm compiling with 1.4.2.  However, java -version reports
1.5.0-beta, even though JAVA_HOME is as above and my PATH includes
%JAVA_HOME%/bin.

Confused, I checked:
$ which java
/cygdrive/c/WINNT/system32/java

I always assumed I was using one of the java.exe files in 'bin' or 'jre/bin'
under the Java install, but apparently there has always been this *third*
copy of java.exe that I was really using.  And now that I think about it,
I'm pretty sure Roedy has a rant about this very thing in the Java Glossary
somewhere, but I couldn't find it.

I renamed the java.exe, javaw.exe and javaws.exe that I found in
c:\winnt\system32, and now Cygwin reports:
$ which java
/cygdrive/c/j2sdk1.4.2_03/bin/java

Better!  So I'll post this in case someone else has the same problem.  Or so
I can find it again when I install a new version of Java and the same thing
happens.

-Wendy S
Thomas Schodt - 02 Mar 2004 22:37 GMT
> I just installed 1.5.0 beta, but for the moment I need to continue working
> with 1.4.2 on Windows 2000.
>
> (Why is there no javac -version option??)

You can use javah -version
Andrew Thompson - 02 Mar 2004 23:00 GMT
> I just installed 1.5.0 beta, but for the moment I need to continue working
> with 1.4.2 on Windows 2000.
[quoted text clipped - 5 lines]
>
> So I'm pretty sure I'm compiling with 1.4.2.

IIUC Wendy, you need the -target and
-bootclasspath options of javac.

The -target option ensures the bytecodes
are compatible with that VM version, you
need to use -bootclasspath as well to ensure
you are not using any classes that are not
contained in that Java rt.jar

I use both options with my on-line compiler
<http://www.physci.org/javac.jsp?bcp=MS>

You will not be able to compile antything
with a color.WHITE in this mode, try it
with the CardLayout source to see.

Signature

Andrew Thompson
* http://www.PhySci.org/ Open-source software suite
* http://www.PhySci.org/codes/ Web & IT Help
* http://www.1point1C.org/ Science & Technology

Wendy S - 02 Mar 2004 23:25 GMT
> IIUC Wendy, you need the -target and
> -bootclasspath options of javac

Interesting... I compile with Ant, so:

<javac srcdir="${srcdir}\dev" destdir="${destdir}"
 deprecation="on" debug="on" target="1.4.2">
        <classpath refid="project.classpath"/>
     </javac>

> The -target option ensures the bytecodes
> are compatible with that VM version, you
[quoted text clipped - 8 lines]
> with a color.WHITE in this mode, try it
> with the CardLayout source to see.
Wendy S - 02 Mar 2004 23:35 GMT
> <javac srcdir="${srcdir}\dev" destdir="${destdir}"
>   deprecation="on" debug="on" target="1.4.2">
>          <classpath refid="project.classpath"/>
>       </javac>

I'm having trouble finding examples with Google.  Do I put 1.4.2 for target
or is just 1.4 sufficient?

And for bootclasspath, missing in the code above, the examples I found have
'classes.zip' but for 1.4 is that supposed to be 'rt.jar' (including the
path)?

Signature

Wendy S



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.