Skip to main content



      Home
Home » Newcomers » Newcomers » How to apply these two agruement in eclipse?
How to apply these two agruement in eclipse? [message #524487] Thu, 01 April 2010 03:07 Go to next message
Eclipse UserFriend
import java.util.regex.;
class Regex2 {
public static void main(String[] args) {
Pattern p = Pattern.compile(args[0]);
Matcher m = p.matcher(args[1]);
boolean b = false;
while(b = m.find()) {
System.out.print(m.start() + m.group());
}
}
}

And the command line:
java Regex2 "\d" ab34ef

How to do that in eclipse? I tried but don't work...because there are two arguments...I don't know how to input in the argument tab in the run setup
Re: How to apply these two agruement in eclipse? [message #524607 is a reply to message #524487] Thu, 01 April 2010 06:20 Go to previous message
Eclipse UserFriend
"JavaBen" <benjamin.yau@gmail.com> wrote in message
news:hp1gmu$90m$1@build.eclipse.org...
> import java.util.regex.;
> class Regex2 {
> public static void main(String[] args) {
> Pattern p = Pattern.compile(args[0]);
> Matcher m = p.matcher(args[1]);
> boolean b = false;
> while(b = m.find()) {
> System.out.print(m.start() + m.group());
> }
> }
> }
>
> And the command line:
> java Regex2 "\d" ab34ef
>
> How to do that in eclipse? I tried but don't work...because there are two
> arguments...I don't know how to input in the argument tab in the run setup

Enter them as you would enter them on the command line. Type "\d" ab34ef
into the Program arguments text box on the launch configuration dialog.
Previous Topic:Importing java application into eclipse
Next Topic:Linked Resources
Goto Forum:
  


Current Time: Fri Nov 07 04:41:54 EST 2025

Powered by FUDForum. Page generated in 0.10708 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top