Hi Velo,

I must be missing something, but I tried everything I could to try to
make it run in Mac: adding it to the path, passing it via -
DflashPlayer.command=, moving it to an already existent path such as /
usr/bin and nothing works. The fact is that if I try to open Flash
Player from the command line it only works if I specify the full path,
regardless of where the player is, the PATH variables or anything. But
even if the PATH is not correct, it should work by passing -
DflashPlayer.command, right?

Any clues?
Thanks!


On Aug 28, 7:50 am, Marvin Froeder <[email protected]> wrote:
> I guess you could make a shortcut as well to FP in some already existing
> path right?
> At least I did that on linux and worked very well so far =D
>
> VELO
>
> On Fri, Aug 28, 2009 at 11:02 AM, James Cook <[email protected]> wrote:
> > I should mention, if the code above is run from inside Eclipse (or some
> > other IDE _not_ launched from the Terminal), the system path will not
> > include any of the paths that may of been added in .profile or
> > .bash_profile. On Mac OS X at least, if you want to add a new path to the
> > global system PATH environment variable, you edit the /etc/paths file.
>
> > -- jim
>
> > On Fri, Aug 28, 2009 at 9:32 AM, James Cook <[email protected]> wrote:
>
> >> Hi Logan,
>
> >> My understanding was when launching Java from the terminal, Runtime.exec()
> >> will have full access to the system path of the current process (unless you
> >> override them). That is what the second parameter to Runtime.exec() is for.
> >> Is this not the case?
>
> >> Since JDK 5, I've preferred to use ProcessBuilder.
>
> >> import java.io.*;
>
> >> public class Paths {
>
> >>         public static void main(String[] args) {
> >>                 System.out.printf("PATH environment variable is: %s\n\n",
> >> System.getenv("PATH"));
>
> >>                 try {
> >>                         String[] cmd = {"/bin/bash", "-c", "echo $PATH"};
> >>                         Process process = new ProcessBuilder(cmd).start();
>
> >>                         InputStream is = process.getInputStream();
> >>                         InputStreamReader isr = new InputStreamReader(is);
> >>                         BufferedReader br = new BufferedReader(isr);
>
> >>                         String line;
> >>                         while ((line = br.readLine()) != null) {
> >>                                 System.out.println(line);
> >>                         }
>
> >>                 } catch (Throwable t) {
> >>                         t.printStackTrace();
> >>                 }
> >>         }
> >> }
>
> >> They two paths output are the same on my Mac when I run the class from
> >> Terminal.
>
> >> -- jim
>
> >> On Thu, Aug 27, 2009 at 5:30 PM, Logan Allred <[email protected]> wrote:
>
> >>> Runtime.exec() in java doesn't honor your .profile or other settings
> >>> that alter the default path and other environment variables. So just
> >>> because it runs from the shell, doesn't mean it will run in java.
>
> >>> Logan
>
> >>> On Thu, Aug 27, 2009 at 1:08 PM, wlepinski<[email protected]> wrote:
>
> >>> > is exactly what happens. When I run the flashplayer from the command
> >>> > line it opens normally. But when I run mvn clean install that does not
> >>> > happen and I get an error saying that flash player can not be
> >>> > executed.
>
> >>> > =/
>
> >>> > On Aug 27, 3:16 pm, Marvin Froeder <[email protected]> wrote:
> >>> >> Ow man....
> >>> >> Something is very wrong there...
>
> >>> >> You are saying that if you run FlashPlayer.exe on command line it
> >>> launches
> >>> >> FP and when you run mvn clean install flexmojos can't launch FP?
>
> >>> >> Makes no sense to me =/
>
> >>> >> VELO
>
> >>> >> On Thu, Aug 27, 2009 at 1:13 PM, wlepinski <[email protected]> wrote:
>
> >>> >> > works....
>
> >>> >> > On Aug 27, 12:21 pm, Marvin Froeder <[email protected]> wrote:
> >>> >> > > Not sure what you mean, but on command line, if you run$
> >>> flashplayer
>
> >>> >> > > Does it work?
>
> >>> >> > > VELO
>
> >>> >> > > On Thu, Aug 27, 2009 at 11:38 AM, wlepinski <[email protected]>
> >>> wrote:
>
> >>> >> > > > because don't affect the plugin.
>
> >>> >> > > > On Aug 27, 11:19 am, Marvin Froeder <[email protected]> wrote:
> >>> >> > > > > I wounder why you can put it on OS path?!
> >>> >> > > > > VELO
>
> >>> >> > > > > On Thu, Aug 27, 2009 at 11:00 AM, wlepinski <[email protected]
>
> >>> >> > wrote:
>
> >>> >> > > > > > this not work for me.
>
> >>> >> > > > > > <build>
> >>> >> > > > > >               <plugins>
> >>> >> > > > > >                       <plugin>
>
> >>> <groupId>org.sonatype.flexmojos</
> >>> >> > > > > > groupId>
> >>> >> > > > > >                               <version>3.3.0</version>
> >>> >> > > > > >  <artifactId>flexmojos-maven-plugin</artifactId>
> >>> >> > > > > >                               <extensions>true</extensions>
> >>> >> > > > > >                               <configuration>
> >>> >> > > > > >                                       <testRunner>
> >>> >> > > > > >                                               <launcher>
>
> >>>  <flashplayerCommand>${flashPlayer.command}</flashplayerCommand>
> >>> >> > > > > >                                  </launcher>
> >>> >> > > > > >                                       </testRunner>
> >>> >> > > > > >                               </configuration>
> >>> >> > > > > >                       </plugin>
> >>> >> > > > > >               </plugins>
> >>> >> > > > > >       </build>
>
> >>> >> > > > > > $ mvn test -DflashPlayer.command=c:/work/flashplayer.exe
>
> >>> >> > > > > > the only way to get it working is putting the flashplayer on
> >>> the
> >>> >> > build
> >>> >> > > > > > folder.
>
> >>> >> > > > > > On Aug 27, 10:49 am, Marvin Froeder <[email protected]>
> >>> wrote:
> >>> >> > > > > > > You could use like this:
>
> >>> >> > > > > > > <build>
> >>> >> > > > > > >                <plugins>
> >>> >> > > > > > >                        <plugin>
>
> >>> >> > > >  <groupId>org.sonatype.flexmojos</groupId>
> >>> >> > > > > > >                                <version>3.3.0</version>
>
> >>> >> > > > > > >  <artifactId>flexmojos-maven-plugin</artifactId>
>
> >>>  <extensions>true</extensions>
> >>> >> > > > > > >                                <configuration>
> >>> >> > > > > > >                                        <testRunner>
> >>> >> > > > > > >                                                <launcher>
>
> >>>  <flashplayerCommand>${flashPlayer.command}</flashplayerCommand>
> >>> >> > > > > > >                                   </launcher>
> >>> >> > > > > > >                                        </testRunner>
> >>> >> > > > > > >                                </configuration>
> >>> >> > > > > > >                        </plugin>
> >>> >> > > > > > >                </plugins>
> >>> >> > > > > > >        </build>
>
> >>> >> > > > > > > For some reason maven is not injecting the flashplayer
> >>> command on
> >>> >> > > > > > component.
>
> >>> >> > > > > > > VELO
>
> >>> >> > > > > > > On Thu, Aug 27, 2009 at 10:42 AM, wlepinski <
> >>> [email protected]>
> >>> >> > > > wrote:
>
> >>> >> > > > > > > > this also works for me. but is very impratical put
> >>> flashplayer
> >>> >> > on
> >>> >> > > > > > > > every flex project.
>
> >>> >> > > > > > > > On Aug 27, 10:23 am, Brian <[email protected]> wrote:
> >>> >> > > > > > > > > We've also gotten this error when trying to set the
> >>> >> > flashplayer
> >>> >> > > > > > > > > command via a system variable.  The only work around
> >>> we found
> >>> >> > was
> >>> >> > > > > > > > > putting the flashplayer executable on the path for the
> >>> user
> >>> >> > > > running
> >>> >> > > > > > > > > the build.  We also found that allowHeadlessMode set
> >>> to false
> >>> >> > did
> >>> >> > > > not
> >>> >> > > > > > > > > work and xvfb-run still tried to spawn a process to
> >>> execute
> >>> >> > the
> >>> >> > > > test
> >>> >> > > > > > > > > runner; we were trying to use the xvnc plugin for
> >>> Hudson and
> >>> >> > we
> >>> >> > > > > > didn't
> >>> >> > > > > > > > > want to use xvfb.  In the end we switched over to xvfb
> >>> since
> >>> >> > we
> >>> >> > > > > > > > > couldn't turn it off.
>
> >>> >> > > > > > > > > On Aug 27, 9:15 am, wlepinski <[email protected]>
> >>> wrote:
>
> >>> >> > > > > > > > > > <build>
> >>> >> > > > > > > > > >                 <plugins>
> >>> >> > > > > > > > > >                         <plugin>
>
> >>> >> > > > > > > > <groupId>org.sonatype.flexmojos</groupId>
>
> >>> <version>3.3.0</version>
>
> >>> >> > > > > > > > <artifactId>flexmojos-maven-plugin</artifactId>
>
> >>> >> > <extensions>true</extensions>
> >>> >> > > > > > > > > >                                 <configuration>
> >>> >> > > > > > > > > >                                         <testRunner>
>
> >>> <launcher>
>
> >>> >> > > > > > > > <flashplayerCommand>flashplayer.exe</flashplayerCommand>
>
> >>> </launcher>
>
> >>> </testRunner>
> >>> >> > > > > > > > > >                                 </configuration>
> >>> >> > > > > > > > > >                         </plugin>
> >>> >> > > > > > > > > >                 </plugins>
> >>> >> > > > > > > > > >         </build>
>
> >>> >> > > > > > > > > > i'm getting the same error.
> >>> >> > > > > > > > > > =(
>
> >>> >> > > > > > > > > > On Aug 27, 9:59 am, Marvin Froeder <
> >>> [email protected]>
> >>> >> > wrote:
>
> >>> >> > > > > > > > > > > Could you try the following configuration on
> >>> >> > pom:<testRunner>
> >>> >> > > > > > > > > > >   <launcher>
>
> >>> <flashplayerCommand>yourCommand</flashplayerCommand>
> >>> >> > > > > > > > > > >   </launcher>
> >>> >> > > > > > > > > > > </testRunner>
>
> >>> >> > > > > > > > > > > VELO
>
> >>> >> > > > > > > > > > > On Thu, Aug 27, 2009 at 9:52 AM, wlepinski <
> >>> >> > [email protected]
>
> >>> >> > > > > > wrote:
>
> >>> >> > > > > > > > > > > > Running the following command
> >>> >> > > > > > > > > > > > $ mvn clean install
> >>> >> > > > > > -DflashPlayer.command=c:/work/flashplayer.exe
>
> >>> >> > > > > > > > > > > > i'm getting...
>
> >>> >> > > > > > > > > > > > [INFO]
>
> >>> ------------------------------------------------------------------------
>
> ...
>
> read more »

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Flex Mojos" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/flex-mojos?hl=en?hl=en

http://blog.flex-mojos.info/
-~----------~----~----~----~------~----~------~--~---

Reply via email to