ostraaten
asked on
How to run Java/Eclipse jar without sudo on Ubuntu
I'm trying to run a Eclipse jar on Ubuntu. This jar is a command line utility part of Eclipse Process Framework that allows to publish from the command line rather than the IDE, for integrating in a build process/automating.
The command is
java -jar /home/ostraaten/Apps/epfc_ 1.5.0.1/pl ugins/org. eclipse.eq uinox.laun cher_1.0.1 .R33x_v200 80118.jar -data /ostraaten/EPF/workspace.1 50 -nosplash -application org.eclipse.epf.publishing .cmdline.P ublish -libraryPath /home/ostraaten/Apps/epfc_ 1.5.0.1/ep f_practice s/ -publishPath /home/ostraaten/EPF/Publis h/openup -config publish.openup -os linux -arch x86 -ws gtk
The above command does very little when I run like that. It does not execute or try to execute the publish procedure. There is no error. The command returns very quickly. When I add -verbose I see that it loads a bunch of stuff but does not execute anything.
When I add sudo to the command the command line works as expected. But of course I don't want to use sudo: all generated content will be owned by root and this also defeats the purpose of having the command line, If it prompts for a password, there is no use in making it part of the build process. Note: I can run the publish from the IDE (without the command line), no problems.
The issue is not Eclipse or Ubuntu related I think. This is an issue with Java that Sun created. At least that is my hunch. I know of one person who managed to get it working without sudo on Ubuntu, I think same version as me. So it is possible.
I searched using Google but found very little info on this issue. Now I would really appreciate some pointers on how to fix this and tackle this problem.
The command is
java -jar /home/ostraaten/Apps/epfc_
The above command does very little when I run like that. It does not execute or try to execute the publish procedure. There is no error. The command returns very quickly. When I add -verbose I see that it loads a bunch of stuff but does not execute anything.
When I add sudo to the command the command line works as expected. But of course I don't want to use sudo: all generated content will be owned by root and this also defeats the purpose of having the command line, If it prompts for a password, there is no use in making it part of the build process. Note: I can run the publish from the IDE (without the command line), no problems.
The issue is not Eclipse or Ubuntu related I think. This is an issue with Java that Sun created. At least that is my hunch. I know of one person who managed to get it working without sudo on Ubuntu, I think same version as me. So it is possible.
I searched using Google but found very little info on this issue. Now I would really appreciate some pointers on how to fix this and tackle this problem.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Using the -data option you have specified a new workspace directory which is automatically created during startup if it doesn't exist. Only root has the permissions to create something in "/" and it is created only with root-rwx-permissions. And so your first run created the "/ostraaten/EPF/workspace. 150"-dir with permissions 700.
ASKER
Don't understand that it works with sudo but anyway I'm happy. Thanks!