Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

JvmBasedArgvFinder: sun.java.command not available on OpenJDK6 JVM #1

Open
mgodave opened this Issue · 8 comments

2 participants

@mgodave

Cannot find sun.java.command system property on OpenJDK6, this causes a NPE

Exception in thread "main" java.lang.NullPointerException
at org.skife.gressil.JvmBasedArgvFinder.getArgv(JvmBasedArgvFinder.java:58)
at org.skife.gressil.Daemon.buildARGV(Daemon.java:164)
at org.skife.gressil.Daemon.forkish(Daemon.java:131)
at org.skife.gressil.Daemon.daemonize(Daemon.java:148)

@mgodave

I am working on a work-around.

@brianm
Owner

Awesome, thank you! i wish there were a godo way to get at the native ARGV :-(

Let me know if you get stumped, I can set up a dev env with OpenJDK to explore. Sadly, main env is Mac, so no OpenJDK6 :-(

@brianm
Owner

I have been using it fine with OpenJDK 1.7 on Ubuntu, fwiw :-(

@brianm
Owner

I found where the java launcher sets this up in OpenJDK 7, but sadly I also found where it isn't setting it up in OpenJDK 6. I have not found anythign analogous in OpenJDK6 yet.

http://hg.openjdk.java.net/jdk7/jdk7//hotspot/raw-file/jdk7-b24/src/os/linux/launcher/java.c

That said, things seem to have been rearranged since b24, so still poking

@mgodave

Wow. You're fast. I'll be able to take a look tomorrow.

@brianm
Owner

Okay, found the launcher in the jdk6 tree, it has the same line to set things up

http://hg.openjdk.java.net/jdk6/jdk6/jdk/file/69fbcc78346e/src/share/bin/java.c

lines 324 and 1597

@mgodave

BTW, I am in need of being able to change the user and group of the spawned process. I was looking through the posix_spawn manpage and it looks like that's easily accomplished through the system call itself. I was planning on implementing that tomorrow (or Friday), is that something you would be interested in?

@brianm
Owner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.