-
Hello, I have Java j2sdk1.4.1 as the default java mahine. (i.e. the java command work
Hello, I have Java j2sdk1.4.1 as the default java mahine. (i.e. the java command works from any directory)
but i have also j2sdk1.4.2_05.
my question is, when i open the bin directory of the j2sdk1.4.2_05 and type : javac myfile.java
which compiler will work?
-
Re: Hello, I have Java j2sdk1.4.1 as the default java mahine. (i.e. the java command
Originally posted by tleis
Hello, I have Java j2sdk1.4.1 as the default java mahine. (i.e. the java command works from any directory)
but i have also j2sdk1.4.2_05.
my question is, when i open the bin directory of the j2sdk1.4.2_05 and type : javac myfile.java
which compiler will work?
In this case it will use the 1.4.2_05 compiler.
The operating system (I'm asuming you use windows) checks the current dir first, to see if the app you define in your program is located there. If it finds it, it runs that one, if it doesn't find it in the current dir, it checks the dirs you specified in your System Path.
which in your case would result in it using the version 1.4.1 of the compiler.
-
Thank you very much
I was told about a cool way to check which one is used, by typing java -version, and it turned out that you are right.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks