Code Monkey home page Code Monkey logo

Comments (7)

 avatar commented on July 25, 2024

Actually, it should not affect Packr, it works even though java doesn't have the executable bit.

from packr.

 avatar commented on July 25, 2024

Actually, it causes ProcessBuilder to throw:

java.io.IOException: Cannot run program "java": error=0, spawn failed
	at java.lang.UNIXProcess.forkAndExec(Native Method)
	at java.lang.UNIXProcess.<init>(UNIXProcess.java:248)
	at java.lang.ProcessImpl.start(ProcessImpl.java:134)
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)

@code-disaster Can we please re-open this issue?

It shouldn't matter, but just in case:

OS: OS X 10.12.1 (Sierra)
JRE: 1.8.0_72-b15 (Oracle)

P.S. Maybe related to #70?

from packr.

 avatar commented on July 25, 2024

Just in case there was any doubt, the issue is resolved by chmod +x jre/bin/java.

from packr.

 avatar commented on July 25, 2024

@code-disaster This could be remedied in Packr.java at L208, L220, & L230 by using Java 7 nio: Files.copy (source, target, StandardCopyOption.COPY_ATTRIBUTES) in conjunction with nio Path Operations instead of Apache Commons IO.

from packr.

 avatar commented on July 25, 2024

Ah. Looks like you're still trying to support Java 6. Any good reason for this? Can we require Java 7 and get access to nio?

from packr.

code-disaster avatar code-disaster commented on July 25, 2024
  • Java 6: historical reasons. Just didn't bother yet.
  • Attributes: good point, but I don't know if this works when e.g. packing a Mac or Linux bundle on a Windows host, because of the different file system attributes.
  • ProcessBuilder: just curious, why do you want to fork java?

from packr.

 avatar commented on July 25, 2024

ProcessBuilder: just curious, why do you want to fork java?

To launch a host-and-play java game server from a java client.

Attributes: good point, but I don't know if this works when e.g. packing a Mac or Linux bundle on a Windows host, because of the different file system attributes.

Only one way to find out! But think about it - packr is already failing to preserve any permissions. Why not make a best attempt with nio, and at least log a warning if permissions won't be preserved (i.e., nio throws on unsupported CopyOption(s)). That would be 100x better than the current behavior imo.

from packr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.