|
Re: JNI Launcher Problem [message #1701069 is a reply to message #1701064] |
Thu, 09 July 2015 07:47 |
|
Hi Johannes,
first of all, you need to check if Titan was compiled with the "JNI enabled" option; please see README.linux for further details:
You need to have a Makefile.personal containing the following lines:
JDKDIR := /usr/lib/jvm/java-7-openjdk-amd64
JNI := yes
If Titan is compiled with the option JNI := yes, than a library file libmctrjninative.so is created in TTCN3_DIR/lib
TTCN3_DIR and LD_LIBRARY_FILE environment variables have to be set
accordingly( LD_LIBRARY_FILE has to include TTCN3_DIR/lib)
Please be aware that the JNI interface can be used used both by the Eclipse IDE and the Java Executor API; the latter permits control of Titan execution from Java ( see titan_executor_api/doc)
Best regards
Elemer
|
|
|
|
|
|
Re: JNI Launcher Problem [message #1701077 is a reply to message #1701076] |
Thu, 09 July 2015 08:35 |
|
Hi Johannes,
to be honest, I run out of ideas....
What exactly are you trying to accomplish? You want to run the IDE in JNI mode or you want to control execution from a separate JAVA code?
The Eclipse Executor has another mode that does not use JNI, see par. 4.1 of the Eclipse_Executor_userguide
BR Elemer
|
|
|
|
Re: JNI Launcher Problem [message #1701096 is a reply to message #1701082] |
Thu, 09 July 2015 09:49 |
|
Hi Johannes,
this limitation as in 5.6 could very well be the problem;
let me ask you what goes wrong when you try to start the plug-in from the command line as indicated in 5.6?
meanwhile I got two hints from colleagues who know Java better than I do:
-in eclipse.ini one can add Java settings ; please try to set java.library.path here ; this then should be read and used by Eclipse
-the name of the launcher in:
java -classpath startup.jar Djava.library.path=$LD_LIBRARY_PATH org.eclipse.core.launcher.Main
might change; see eclipse.ini (or Google) for the current launcher name
BR Elemer
|
|
|
Re: JNI Launcher Problem [message #1701099 is a reply to message #1701096] |
Thu, 09 July 2015 10:13 |
Johannes Bro Messages: 56 Registered: June 2015 |
Member |
|
|
jbruder@jbruder-VirtualBox:/usr/lib/eclipse$ java -classpath startup.jar Djava.library.path=$LD_LIBRARY_PATH org.eclipse.core.launcher.Main
Fehler: Hauptklasse Djava.library.path=:.home.jbruder.titan.Install.lib konnte nicht gefunden oder geladen werden
jbruder@jbruder-VirtualBox:/usr/lib/eclipse$
Translated to english:
jbruder@jbruder-VirtualBox:/usr/lib/eclipse$ java -classpath startup.jar Djava.library.path=$LD_LIBRARY_PATH org.eclipse.core.launcher.Main
Error: Mainclass Djava.library.path=:.home.jbruder.titan.Install.lib could not be found or loaded
jbruder@jbruder-VirtualBox:/usr/lib/eclipse$
But I have a solution now: If i start eclipse with the terminal it works ! Maybe i have to define the environment variables different. I will take a look and post here the solution.
[Updated on: Thu, 09 July 2015 10:24] Report message to a moderator
|
|
|
|
Re: JNI Launcher Problem [message #1701112 is a reply to message #1701100] |
Thu, 09 July 2015 12:40 |
Johannes Bro Messages: 56 Registered: June 2015 |
Member |
|
|
I found the problem:
see : https://help.ubuntu.com/community/EnvironmentVariables
.....
The shell config file /etc/bash.bashrc is sometimes suggested for setting environment variables system-wide. While this may work on Bash shells for programs started from the shell, variables set in that file are not available by default to programs started from the graphical environment in a desktop session.
......
That is the explanation why it worked fine so far i use only the command line.
How I solved this problem ( note there are many ways see link) :
- create a new file titan_env.sh inside the /etc/profile.d/ directory. All files ending with .sh inside this folder will be considered.
- use a editor to create: sudo nano /etc/profile.d/titan_env.sh
- put there all necessary path variable as described in installation guide
My file looks like this
TTCN3_DIR=/home/jbruder/titan/Install
PATH=$PATH:$TTCN3_DIR/bin
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$TTCN3_DIR/lib
MANPATH=$MANPATH:$TTCN3_DIR/man
export TTCN3_DIR PATH LD_LIBRARY_PATH MANPATH
best regards
Johannes
[Updated on: Thu, 09 July 2015 12:40] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.03210 seconds