Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Recognition of java archive #19

Closed
ClemSc opened this Issue Mar 3, 2016 · 15 comments

Comments

Projects
None yet
5 participants

ClemSc commented Mar 3, 2016

Hi !
For Linux users, linking the java executable archive of JabRef does not work out of the box. It is easily solved by linking a bash launcher instead:

#!/bin/bash
java -jar /my/target/to/JabRef.jar "$@"

"$@" collect the import parameter passed by Jabfox.

Perhaps Jabfox could call java directly when linked the jar archive.

Great plugin btw, I've been looking for it !

Collaborator

tobiasdiez commented Mar 3, 2016

Thanks for your feedback!

If you put in the .jar file as the path, then what happens? Is an error displayed, does JabRef opens but nothing is imported or does nothing happens? (Did you escaped the path using double slashes as for example in C:\\Path\\to\\JabRef.jar?)

Comment for myself: possible solution or another approach

@tobiasdiez tobiasdiez added this to the 1.0: Publish to MozillaDev milestone Mar 3, 2016

ClemSc commented Mar 3, 2016

Ok, I just repeated the steps on an other computer, putting the .jar as the path (being as /home/username/bin/jar/jabref2-10.jar) and here JabRef opens and import the data. I'll try to reproduce the issue tomorrow on the computer I noticed it, it might have been my mistake (pretty sure to have used the browse function though).

ClemSc commented Mar 4, 2016

So what does not work:

On Firefox 44.0.2, Jabfox 0.9.0, JabRef 3.2, path to JabRef: /home/username/bin/jar/JabRef-3.2.jar, java version 1.8.0_74 (from Oracle java 8 packages). I checked the permission of the jar file.
When hitting the "Import Ref. into JabRef..." button, the notification "Import the following Items into Jabref etc." is prompted, but nothing happen: JabRef don't open, if already opened, nothing is imported. No error msg prompted (I dunno if I can get you an error log somehow with FF features ?).

Still not working :

Again on Firefox 44.0.2, Jabfox 0.9.0 BUT JabRef 2.10, path to JabRef: /home/username/bin/jar/JabRef-2.10.jar, java version 1.7.0_95 (from OpenJDK java 7 packages). I checked the permission of the jar file.
When hitting the "Import Ref. into JabRef..." button, the notification "Import the following Items into Jabref etc." is prompted, but nothing happen: JabRef doesn't open, if already opened, nothing is imported. No error msg prompted (I dunno if I can get you an error log somehow with FF features ?).

What works: the same things but path to JabRef: /home/username/bin/JabRef.sh (JabRef.sh being the bash script provided above).

Its seems to be related to the version of Firefox, I think what worked for me yesterday was on Firefox 39

btw, using Firefox 44.0.2, it complains that Jabfox 0.9.0 is not verified. In this version of FF, it can be only temporarily overrided by changing the preference xpinstall.signatures.required to false in the Firefox Configuration Editor (about:config page). Mozilla also warns that the override will no longer be possible in version 46 and signature will be mandatory (see here)

Collaborator

tobiasdiez commented Mar 25, 2016

I did some further investigations into this but could not resolve the problem. Sometimes it works with java 1.7 but not always. Since it works on systems with a newer java version, I am inclined to just ignore the problem. Especially since you gave a workable workaround using the sh bash script. So well..closed for the moment.

@tobiasdiez tobiasdiez closed this Mar 25, 2016

Contributor

RKBK commented Apr 23, 2016

That script is also needed on Mac OSX.

Owner

koppor commented Aug 18, 2016

Does it work making the jar chmod +x?

I followed this instruction and created jabref.sh on my Ubuntu 14.04LTS. I use JabRef_3.6.jar and JabFox. However, when I click JabFox, after the loading, nothing happened in JabRef. Can I post my problem below this issue?
Thanks in advance!

Collaborator

tobiasdiez commented Oct 5, 2016

Hi @qqlovekerry.
Did you also linked to the jabref.sh file in the JabFox preferences?
What happens if you close JabRef and click the icon in Firefox? Normally JabRef should start then.

qqlovekerry commented Oct 6, 2016 edited

Hi @tobiasdiez,
Yes, I think I did. My JabRef_3.6.jar is located at /home/wenqiang/Desktop/JabRef_3.6.jar. I created jabref.sh at /home/wenqiang/apps/jabref.sh, and linked the path in JabFox to the bash script.
In order to give detailed information, I uploaded my screenshots.
location
jabfox
The content of my jabref.sh is:
#!bin/bash
java -jar /home/wenqiang/Desktop/JabRef_3.6.jar "$@"
I hope I provide enough information. I can add more if not.
My problem is, when I click the button of JabFox in FF, it will prompt a window showing that it is loading the snapshot, after the loading, the small window will vanish. But there is nothing happened in JabRef at all, neither with JabRef_3.6.jar opened nor closed.
I have tried JabFox on Win7 with .exe files. It works fine. After the loading, a window with bibtex information in JabRef will pop up.
My platform is Ubuntu 14.04LTS, my JabRef_3.6.jar is executable. Did I do something wrong?
Any help would be much appreciated!

ClemSc commented Oct 6, 2016

Hi. Did you check 'executable' in Jabref.sh permissions ?

Le jeudi 6 octobre 2016, qqlovekerry notifications@github.com a écrit :

Hi @tobiasdiez,
Yes, I think I did. My JabRef_3.6.jar is located at
/home/wenqiang/Desktop/JabRef_3.6.jar. I created jabref.sh at
/home/wenqiang/apps/jabref.sh, and linked the path in JabFox to the bash
script.
In order to give detailed information, I uploaded my screenshots.
<
https://ci3.googleusercontent.com/proxy/mLt-xJIzNFO2221S54ZE4pR92_1o4V1kde3IOxk1r0bQlCQ2pq8dYbGU3anowNtO7J3oizljmNBWwqLJwoynW8pkZ1eKmjvqcu4U6s0iQCpjqEZhrYONJdTrSb308nU2pYs9Ac4Wu4Ukor8uryFY0qyV5nty-t1NbHT7=s0-d-e1-ft#https://cloud.githubusercontent.com/assets/16799190/19138393/655a27ec-8bae-11e6-94c0-16adaecf9862.png

<
https://ci5.googleusercontent.com/proxy/mmYnXRdqjR5MRX7F_u81nr6t0fQpqJOLzVeC3u1Au7ZYOnto0dfB2YKCP752z42fpnBN-UCdOb1ZUN_5KX-EneD4vwrjp3_V-zL3I3vuVzVcBe8iMPDGyK4gddGop3_AqLUvlqICqG4pgZwN92RJnCZPKGs5UyPUcQeD=s0-d-e1-ft#https://cloud.githubusercontent.com/assets/16799190/19138395/69d09716-8bae-11e6-9aed-9ef7a333126f.png

I hope I provide enough information. I can add more if not.
My problem is, when I click the button of JabFox in FF, it will prompt a
window showing that it is loading the snapshot, after the loading, the
small window will vanish. But there is nothing happened in JabRef at all,
neither with JabRef_3.6.jar opened nor closed.
I have tried JabFox on Win7 with .exe files. It works fine. After the
loading, a window with bibtex information in JabRef will pop up.
My platform is Ubuntu 14.04LTS, my JabRef_3.6.jar is executable. Did I do
something wrong?
Any help would be much appreciated!


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.<
https://ci5.googleusercontent.com/proxy/X8nyxCJ1oehlJTM7pmVTbP4u_05KRgRN7qaAHV7XNlTNoVQnuiwlnrbUEqurCBAuEUO3QEvIe22dngAekT0OtO1kIBZCjWPWpUFv5HlFgdzHv37bMEnvqsJ765gWC7OZVoaampUAruPJWCv9sKjnwW8Cs3nctA=s0-d-e1-ft#https://github.com/notifications/beacon/AQvCRew55YYlQChECfzSNJs5mWC_QXaKks5qxF4hgaJpZM4Ho22U.gif>

Hi @ClemSc,
I think I add +x to my jabref.sh, which can be seen in this picture.
jabrefsh

Collaborator

tobiasdiez commented Oct 6, 2016

Mhh sorry, but I have no real idea why the script doesn't work for you.
I assume calling JabRef.sh opens JabRef, right? Maybe it works if you place the bash script in the same folder as the JabRef.jar file.

Contributor

RKBK commented Oct 6, 2016

@qqlovekerry Did you check "Listen for remote operation on port: 6050: in the JabRef Advanced settings? I'm not sure if that's supposed to be needed, though.

Hi @tobiasdiez, I have relocated my jabref.sh to the same folder of JabRef.jar. It seems still does not work.
Hi @RKBK, I think I have checked this option. You can see that in the following picture.
listen
And Hi @ClemSc, I think I should ask one more question to all you guys. What if I execute my jabref.sh directly by ./jabref.sh? I think it would evoke JabRef_3.6.jar, is that right? However, in my terminal, it show an error something like bash: ./jabref.sh: bin/bash: bad interpreter:No such file or directory. But if I type java -jar /home/wenqiang/Desktop/JabRef_3.6.jar in terminal, JabRef can be evoked successfully. Is there something wrong with my bash script?
Thanks in advance!

qqlovekerry commented Oct 7, 2016 edited

Dear everyone @ClemSc @tobiasdiez @RKBK,
I am awfully sorry. The problem is caused by my mistake, I forget one / before bin. That should be #!/bin/bash instead of #!bin/bash. JabFox works well after I corrected my script. Really sorry for bothering all you guys.
Thanks a bunch for all your helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment