« first day (16 days earlier)      last day (4933 days later) » 

5:14 PM
Anyone here to help with a Java problem?
 
 
3 hours later…
7:46 PM
So I'm looking to use JNI to embed a jvm into a C++ app so I can run some java stuff from there
What I've found in the docs thus far is you can say "hey JVM I just created! Here is a classpath to go searching under! wee!"
but is there a way to say "Oh hey JVM! Here is a chunk of mmaped memory where some jars live! go forth and run them!"?
 
8:26 PM
I don't think JVMs know English.
What about creating a web service interface to allow the C++ program to speak to the Java part?
One job that I worked at did this with PHP and Java.
PHP was used for generating the HTML pages and Java was used to interface with the database...they spoke to eachother through rest-based webservices
 
8:38 PM
hehe
my plan is a bit more devious than that :-)
this particular application has to run as a windows service, and i'm find JavaService a bit clunky in terms of fitting it into my normal workflow for managing applications
would be slick to have that all in one lump .exe that just spins up a jvm and calls "main" on the java app essentially
otherwise your suggestion is great, and is in fact how we designed other parts of this system
 
i think there are ways that you can generate an exe from java source code
i never tried it though
i'm not a c++ guy by any means
 
yeah
that and i don't just want an .exe of it, i need it to be able to /install as a windows service and respond to start / stop and such
my idea is crazy and hacky
just wanted to know if it was crazy, hacky, and possible
 
oh so instead of using a JavaService, you want the java program to run as a regular windows service?
 
exactly
javaservice works great
but it requires some overhead to configure properly, magic batch scripts, etc
so essentially i would have a C++ app that embedded the jars as a resource
 
couldn't you just like tell the service to run "java com.foo.MyProgram" when it starts?
 
8:43 PM
when it fires up it loads the jars and gives them to a vm
still requires multiple pieces; and not as fun!
i could load the resources, write them to some temp files and hand that off to the vm in classpath, but i don't like that either
 
hmm i dunno
 
yeah :-)
its cool
 
9:05 PM
gl anyways :)
 
heh thanks, we'll see what happens
i'm not a java dude, so this should be interesting :-P
 

« first day (16 days earlier)      last day (4933 days later) »