Hello,
I am looking for documentation that specifies the following behavior
exhibited by java.
The following (assuming MyClass.class is accessible and has a main())
java MyClass *
yields the same result on Windows as on Unix, inspite of Windows not
expanding shell wildcards. Basically, the args[] passed to main()
contains names of files in that directory.
The basic behavior is documented in the following link: http://groups.google.com/groups?hl=e...argate.sgi.net
The last post by Kevin Kelley points this as 'specified' behavior for
java.exe.
The following link also points this as specified behavior. http://www.cse.fau.edu/~roy/cop4331/asgmt1.html#jdk1.2
Now I am trying to find out exactly WHERE is this specified.
I have run searches on java.sun.com and used their documentation
searcher also, but couldn't find any documentation.
Can some one please help?
Thanks.
Regards,
Bharath. 6 9131
Your statement: "inspite of Windows not expanding shell wildcards" is
not true. Windows does expand the wildcard, just like bash or csh (unix)
does.
If you want to see what is actually being passed in, echo it:
echo java MyClass *
Echo works on both Windows and unix as well.
So this has nothing to do with Java at all.
Bharath Dhurjati wrote: Hello,
I am looking for documentation that specifies the following behavior exhibited by java.
The following (assuming MyClass.class is accessible and has a main())
java MyClass *
yields the same result on Windows as on Unix, inspite of Windows not expanding shell wildcards. Basically, the args[] passed to main() contains names of files in that directory.
The basic behavior is documented in the following link: http://groups.google.com/groups?hl=e...argate.sgi.net
The last post by Kevin Kelley points this as 'specified' behavior for java.exe.
The following link also points this as specified behavior. http://www.cse.fau.edu/~roy/cop4331/asgmt1.html#jdk1.2
Now I am trying to find out exactly WHERE is this specified. I have run searches on java.sun.com and used their documentation searcher also, but couldn't find any documentation.
Can some one please help?
Thanks.
Regards, Bharath.
Not under XP Pro.
echo *
prints "*"
Wild card expansion has never been a function of batch but is done by
whatever is run under batch, see the "for" command in batch for this.
Constantine
mhandis wrote: Your statement: "inspite of Windows not expanding shell wildcards" is not true. Windows does expand the wildcard, just like bash or csh (unix) does.
If you want to see what is actually being passed in, echo it: echo java MyClass *
Echo works on both Windows and unix as well.
So this has nothing to do with Java at all.
Bharath Dhurjati wrote:
Hello,
I am looking for documentation that specifies the following behavior exhibited by java.
The following (assuming MyClass.class is accessible and has a main())
java MyClass *
yields the same result on Windows as on Unix, inspite of Windows not expanding shell wildcards. Basically, the args[] passed to main() contains names of files in that directory.
The basic behavior is documented in the following link: http://groups.google.com/groups?hl=e...argate.sgi.net
The last post by Kevin Kelley points this as 'specified' behavior for java.exe.
The following link also points this as specified behavior. http://www.cse.fau.edu/~roy/cop4331/asgmt1.html#jdk1.2
Now I am trying to find out exactly WHERE is this specified. I have run searches on java.sun.com and used their documentation searcher also, but couldn't find any documentation.
Can some one please help?
Thanks.
Regards, Bharath.
Not under XP Pro.
echo *
prints "*"
Wild card expansion has never been a function of batch but is done by
whatever is run under batch, see the "for" command in batch for this.
Constantine
mhandis wrote: Your statement: "inspite of Windows not expanding shell wildcards" is not true. Windows does expand the wildcard, just like bash or csh (unix) does.
If you want to see what is actually being passed in, echo it: echo java MyClass *
Echo works on both Windows and unix as well.
So this has nothing to do with Java at all.
Bharath Dhurjati wrote:
Hello,
I am looking for documentation that specifies the following behavior exhibited by java.
The following (assuming MyClass.class is accessible and has a main())
java MyClass *
yields the same result on Windows as on Unix, inspite of Windows not expanding shell wildcards. Basically, the args[] passed to main() contains names of files in that directory.
The basic behavior is documented in the following link: http://groups.google.com/groups?hl=e...argate.sgi.net
The last post by Kevin Kelley points this as 'specified' behavior for java.exe.
The following link also points this as specified behavior. http://www.cse.fau.edu/~roy/cop4331/asgmt1.html#jdk1.2
Now I am trying to find out exactly WHERE is this specified. I have run searches on java.sun.com and used their documentation searcher also, but couldn't find any documentation.
Can some one please help?
Thanks.
Regards, Bharath.
yes, there is no expansion under XP pro (just tried it too)
I don't have access to win 95 now, but years ago with turbo c++
there was no expansion either and Borland provided an
object file that you could link in to do the expansion prior
to invoking the program
"CD Rasmussen" <Co*******************@comcast.net> wrote in message
news:At********************@comcast.com... Not under XP Pro. echo * prints "*" Wild card expansion has never been a function of batch but is done by whatever is run under batch, see the "for" command in batch for this.
Constantine
mhandis wrote: Your statement: "inspite of Windows not expanding shell wildcards" is not true. Windows does expand the wildcard, just like bash or csh (unix) does.
If you want to see what is actually being passed in, echo it: echo java MyClass *
Echo works on both Windows and unix as well.
So this has nothing to do with Java at all.
Bharath Dhurjati wrote:
Hello,
I am looking for documentation that specifies the following behavior exhibited by java.
The following (assuming MyClass.class is accessible and has a main())
java MyClass *
yields the same result on Windows as on Unix, inspite of Windows not expanding shell wildcards. Basically, the args[] passed to main() contains names of files in that directory.
The basic behavior is documented in the following link: http://groups.google.com/groups?hl=e...ame=right&th=3
3f09e2bd3e85a8e&seekm=01be589d%24dc827700%24baac72 d1%40stargate.sgi.net
The last post by Kevin Kelley points this as 'specified' behavior for java.exe.
The following link also points this as specified behavior. http://www.cse.fau.edu/~roy/cop4331/asgmt1.html#jdk1.2
Now I am trying to find out exactly WHERE is this specified. I have run searches on java.sun.com and used their documentation searcher also, but couldn't find any documentation.
Can some one please help?
Thanks.
Regards, Bharath.
yes, there is no expansion under XP pro (just tried it too)
I don't have access to win 95 now, but years ago with turbo c++
there was no expansion either and Borland provided an
object file that you could link in to do the expansion prior
to invoking the program
"CD Rasmussen" <Co*******************@comcast.net> wrote in message
news:At********************@comcast.com... Not under XP Pro. echo * prints "*" Wild card expansion has never been a function of batch but is done by whatever is run under batch, see the "for" command in batch for this.
Constantine
mhandis wrote: Your statement: "inspite of Windows not expanding shell wildcards" is not true. Windows does expand the wildcard, just like bash or csh (unix) does.
If you want to see what is actually being passed in, echo it: echo java MyClass *
Echo works on both Windows and unix as well.
So this has nothing to do with Java at all.
Bharath Dhurjati wrote:
Hello,
I am looking for documentation that specifies the following behavior exhibited by java.
The following (assuming MyClass.class is accessible and has a main())
java MyClass *
yields the same result on Windows as on Unix, inspite of Windows not expanding shell wildcards. Basically, the args[] passed to main() contains names of files in that directory.
The basic behavior is documented in the following link: http://groups.google.com/groups?hl=e...ame=right&th=3
3f09e2bd3e85a8e&seekm=01be589d%24dc827700%24baac72 d1%40stargate.sgi.net
The last post by Kevin Kelley points this as 'specified' behavior for java.exe.
The following link also points this as specified behavior. http://www.cse.fau.edu/~roy/cop4331/asgmt1.html#jdk1.2
Now I am trying to find out exactly WHERE is this specified. I have run searches on java.sun.com and used their documentation searcher also, but couldn't find any documentation.
Can some one please help?
Thanks.
Regards, Bharath.
You are right, it doesn't work under windows with echo, only under
unix/linux.
The following C program demonstrates that Windows does expand *:
#include<stdio.h>
int main(int argc, char **argv) {
int i;
for(i = 0; i < argc; i++) {
printf("arg %d = %s\n", i+1, argv[i]);
}
return 0;
}
As does the following Java program:
public class Test {
public static void main(String[] args) {
for(int i = 0; i < args.length; i++) {
System.out.println("arg " + (i+1) + " = " + args[i]);
}
}
}
CD Rasmussen wrote: Not under XP Pro. echo * prints "*" Wild card expansion has never been a function of batch but is done by whatever is run under batch, see the "for" command in batch for this.
Constantine
mhandis wrote:
Your statement: "inspite of Windows not expanding shell wildcards" is not true. Windows does expand the wildcard, just like bash or csh (unix) does.
If you want to see what is actually being passed in, echo it: echo java MyClass *
Echo works on both Windows and unix as well.
So this has nothing to do with Java at all.
Bharath Dhurjati wrote:
Hello,
I am looking for documentation that specifies the following behavior exhibited by java.
The following (assuming MyClass.class is accessible and has a main())
java MyClass *
yields the same result on Windows as on Unix, inspite of Windows not expanding shell wildcards. Basically, the args[] passed to main() contains names of files in that directory.
The basic behavior is documented in the following link: http://groups.google.com/groups?hl=e...argate.sgi.net
The last post by Kevin Kelley points this as 'specified' behavior for java.exe.
The following link also points this as specified behavior. http://www.cse.fau.edu/~roy/cop4331/asgmt1.html#jdk1.2
Now I am trying to find out exactly WHERE is this specified. I have run searches on java.sun.com and used their documentation searcher also, but couldn't find any documentation.
Can some one please help?
Thanks.
Regards, Bharath.
This discussion thread is closed Replies have been disabled for this discussion. Similar topics
11 posts
views
Thread by PC |
last post: by
|
6 posts
views
Thread by QQ June |
last post: by
|
5 posts
views
Thread by Ayesha Ahsan |
last post: by
|
7 posts
views
Thread by Steve M |
last post: by
|
6 posts
views
Thread by David |
last post: by
|
2 posts
views
Thread by Andrea |
last post: by
|
1 post
views
Thread by David Van D |
last post: by
| |
7 posts
views
Thread by Jwe |
last post: by
| | | | | | | | | | |