Re: Under Linux, Call java from C++



On 30 Sep 2005 09:03:57 -0700, tony_lincoln@xxxxxxxxx wrote:
> Yes. I changed the path into:
>
> rakta:~/GAQ$ export
> LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/jvm/java-1.4.2-sun-1.4.2_05/jre/lib/i386/server:/usr/lib/jvm/java-1.4.2-sun-1.4.2_05/jre/lib/i386
>
> Then compile it, and the error kept the same:

LD_LIBRARY_PATH has nothing to do with compiling the code. It's only
there to help find the libraries that are needed when you *run* the
program.

> invokeLinux.cpp: In function `int main()':
> invokeLinux.cpp:24: error: `JNI_VERSION_1_4_2_05' undeclared (first use
> this
> function)
> invokeLinux.cpp:24: error: (Each undeclared identifier is reported only
> once
> for each function it appears in.)
>
> If I remove the line "vm_args.version = JNI_VERSION_1_4_2_05",
> I can compile it, but the final result kept the same:
> "Can't create Java VM"

I've responded to this in another post. This JNI_VERSION isn't valid.

/gordon

--
[ do not email me copies of your followups ]
g o r d o n + n e w s @ b a l d e r 1 3 . s e
.



Relevant Pages

  • Re: simple compilaton question
    ... > before I try to compile Main? ... "javac *.java" in each of my java source file directories the first ... with gcj. ... slow to ask for help on mailing lists. ...
    (comp.lang.java.programmer)
  • Re: Java server wont run after reboot
    ... Working with classpaths in Java isn't too hard, ... package definitions in your source code. ... Execute from that directory, no classpath definition needed. ... Assuming that you compile your code in the same directory and deposit the ...
    (RedHat)
  • Re: Java programmer lured back by .Net (Questions)
    ... I have finally decided to put all my business logic in C++ and compile that to native code. ... Security is the only reason why I could see that being a problem but I'm sure there is a way around it. ... Of course it learned a lot from Java, and improved upon many things which Java is slowly catching up on. ... I would like to be able to place my executable on my remote server and then "load" the executables on demand from accross the internet - so that there are no executables on the local machine for prying eyes to reverse engineer. ...
    (microsoft.public.dotnet.distributed_apps)
  • Re: Standard Database Interface?
    ... Windows binary and examples athttp://aspn.activestate.com/ASPN/Cookbook/Tcl?kwd=TclBlend. ... use native tcl and binary packages. ... and Java i.e Tcl/TK 8.4.13 and Java 1.4.2.12. ... patient enough to show me a step by step method on how to compile ...
    (comp.lang.tcl)
  • Re: How to avoid the message "Unknown source"?
    ... You haven't provided any source code and you haven't even identified the ... If you are getting a compiler error, javac, the java compiler, should be ... If you are geting a compile ... exception message that will give you a clue about your problem. ...
    (comp.lang.java.help)