Command /bin/sh failed with exit code 126

3,824 views
Skip to first unread message

feed...@mytaxicontrol.com

unread,
Sep 8, 2013, 6:52:25 AM9/8/13
to j2objc-...@googlegroups.com
Hello,
I am totally new to j2objc and have tried to get it running within Xcode.
Although I have checked setup several times, I continue to get the error:

/bin/sh: /Users/croeltgen/Desktop/j2objc-0.8.5: is a directory
Command /bin/sh failed with exit code 126

on command:

/bin/sh -c "${HOME}/Desktop/j2objc-0.8.5 -d ${DERIVED_FILES_DIR} -sourcepath ${PROJECT_DIR}/$source-root \\
   --no-package-directories ${INPUT_FILE_PATH}; "

Of course "Desktop/j2objc-0.8.5" is a directory!
What am i doing wrongly?

Help is very much appreciated!

feed...@mytaxicontrol.com

unread,
Sep 8, 2013, 10:53:42 AM9/8/13
to j2objc-...@googlegroups.com, feed...@mytaxicontrol.com
Am still struggling with this. Being blocked with Xcode, I tried to do it via command line, but here I am stuck again.
When I run the command j2obj from /scripts, it tells me that it cant find the needed .jar file. I moved then the script to /dist and it starts the conversion. However it produces errors, like

error: Hello.java:1: The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files
error: Hello.java:1: The type java.lang.String cannot be resolved. It is indirectly referenced from required .class files
error: Hello.java:1: Implicit super constructor Object() is undefined for default constructor. Must define an explicit constructor

on the simple Hello.java example.

Help!

Tom Ball

unread,
Sep 8, 2013, 11:40:23 AM9/8/13
to j2objc-discuss
The error states your problem: "${HOME}/Desktop/j2objc-0.8.5" is a directory. You need to run the script instead, "${HOME}/Desktop/j2objc-0.8.5/j2objc".



--
You received this message because you are subscribed to the Google Groups "j2objc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to j2objc-discus...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Tom Ball

unread,
Sep 8, 2013, 11:42:57 AM9/8/13
to j2objc-discuss, feed...@mytaxicontrol.com
The script assumes that it is in the distribution bundle, so when you moved it elsewhere, it could no longer find the j2objc runtime library (libjre_emul.a). Either put the script back, or delete the distribution directory you modified and unzip it again to create an unchanged version.


feed...@mytaxicontrol.com

unread,
Sep 8, 2013, 12:50:18 PM9/8/13
to j2objc-...@googlegroups.com

feed...@mytaxicontrol.com

unread,
Sep 8, 2013, 12:53:13 PM9/8/13
to j2objc-...@googlegroups.com
Ok, I see. Changed it now, but I get

/bin/sh: /Users/croeltgen/Desktop/j2objc-0.8.5/dist/j2objc: Permission denied

There's only 1 user working on my Mac

Am Sonntag, 8. September 2013 17:40:23 UTC+2 schrieb Tom Ball:

feed...@mytaxicontrol.com

unread,
Sep 8, 2013, 1:08:44 PM9/8/13
to j2objc-...@googlegroups.com, feed...@mytaxicontrol.com
Ok, could get it to run now in terminal. Xcode still a rpoblem, but never mind, I only need to run it once.

secret...@gmail.com

unread,
Nov 1, 2013, 4:32:40 AM11/1/13
to j2objc-...@googlegroups.com
2013年9月8日日曜日 19時52分25秒 UTC+9 feed...@mytaxicontrol.com:

hi

did you change folder name?
if you change folder name, you try to repair to old folder name.

Tom Ball

unread,
Nov 1, 2013, 10:31:42 AM11/1/13
to j2objc-discuss
The j2objc command is *in* that directory, so you need to invoke it using directory/j2objc (just like any other script or executable file):

${HOME}/Desktop/j2objc-0.8.5/j2objc -d ${DERIVED_FILES_DIR} -sourcepath ${PROJECT_DIR}/$source-root
    --no-package-directories ${INPUT_FILE_PATH}



Mustafa Mirza

unread,
Sep 4, 2022, 4:44:19 AM9/4/22
to j2objc-discuss
how were you able to fix the permission denied error i am having the same error

Anh Kiệt Khương

unread,
Sep 13, 2022, 8:40:20 AM9/13/22
to j2objc-discuss
me too, I ran a Expo-app on my mac and get them same error 
Vào lúc 15:44:19 UTC+7 ngày Chủ Nhật, 4 tháng 9, 2022, Mustafa Mirza đã viết:
Reply all
Reply to author
Forward
0 new messages