Hi...
So, I have this application called Impact, it is an explicit time integration Finite Elements code written in Java...
http://impact.sourceforge.net/
I untar the pack, and launch the application calling a script, from within the untarred folder,
Code:
alex@iskandhar:~/stuff/Impact$ ls
COPYING ImpactClusterServerKill.bat ImpactGUI_JOGL_OGL_solaris_sparcv9.sh ImpactGUI_OGL_windows_amd64.bat Pro.conf featured.ico
Constraints.properties ImpactClusterServerKill.sh ImpactGUI_JOGL_OGL_windows_amd64.bat ImpactGUI_OGL_windows_i586.bat README impact.png
Graph.conf ImpactClusterTask.bat ImpactGUI_JOGL_OGL_windows_i586.bat ImpactOpt.bat bin/ interfaces/
Impact.bat ImpactClusterTask.sh ImpactGUI_OGL_linux_amd64.sh* ImpactOpt.sh bin_cluster/ jalopy.xml
Impact.ico ImpactGUI_JOGL_OGL_linux_amd64.sh ImpactGUI_OGL_linux_i586.sh License.txt build.xml lib/
Impact.sh* ImpactGUI_JOGL_OGL_linux_i586.sh ImpactGUI_OGL_macosx.sh Loads.properties cluster.png lib_cluster/
ImpactClusterClient.bat ImpactGUI_JOGL_OGL_macosx.sh ImpactGUI_OGL_solaris_amd64.sh Material.properties debug.bat lib_j3d/
ImpactClusterClient.sh ImpactGUI_JOGL_OGL_solaris_amd64.sh ImpactGUI_OGL_solaris_i386.sh Opt.conf debug.sh make.bat
ImpactClusterServer.bat ImpactGUI_JOGL_OGL_solaris_i386.sh ImpactGUI_OGL_solaris_sparc.sh Post.conf doc/ src/
ImpactClusterServer.sh ImpactGUI_JOGL_OGL_solaris_sparc.sh ImpactGUI_OGL_solaris_sparcv9.sh Pre.conf examples/
alex@iskandhar:~/stuff/Impact$./ImpactGUI_OGL_linux_amd64.sh
This launches a gui which allows me to setup a case, which needs some setup file, tipically some *.in and a mesh file, tipically some *.msh.
Other mode of executuion consists of calling the setup file as argument to Impact.sh script ( CLI execution mode, for g33k5
)
My problem is : I have packed the whole stuff into a Slackware .tgz, that places it in /usr/local/Impact, and placed a calling script in /usr/local/bin ,
Code:
alex@iskandhar:~/stuff/Impact/build# echo '/usr/local/Impact/ImpactGUI_OGL_linux_amd64.sh' > /usr/local/bin/Impact&&chmod +x /usr/local/bin/Impact
Why the heck doesn't it find the java libraries even after i having created the package with makepkg -l y -c n /path/to/package.tgz...?
Code:
Meskimen's Law:
There's never time to do it right, but there's always time to
do it over.
alex@iskandhar:~$ impact
bash: impact: command not found
alex@iskandhar:~$ Impact
Exception in thread "main" java.lang.NoClassDefFoundError: gui/ImpactGUI
Caused by: java.lang.ClassNotFoundException: gui.ImpactGUI
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Could not find the main class: gui.ImpactGUI. Program will exit.
alex@iskandhar:~$
I decided to hack the ImpactGUI_OGL_linux_amd64.sh script from
Code:
alex@iskandhar:~$ cat /usr/local/Impact/ImpactGUI_OGL_linux_amd64.sh
#!/bin/sh
export LD_LIBRARY_PATH=lib_j3d/linux_amd64
java -Xmx1000m -Xss1m -cp .:bin:doc:lib/jogl.jar:lib/gluegen-rt.jar:lib/patbinfree153.jar:lib_j3d/j3dcore.jar:lib_j3d/j3dutils.jar:lib_j3d/vecmath.jar -Djava.library.path="lib_j3d/linux_amd64" gui.ImpactGUI
to
Code:
alex@iskandhar:~$ cat /usr/local/Impact/ImpactGUI_OGL_linux_amd64.sh
#!/bin/sh
export LD_LIBRARY_PATH=/usr/local/Impactlib_j3d/linux_amd64
java -Xmx1000m -Xss1m -cp .:bin:doc:lib/jogl.jar:lib/gluegen-rt.jar:lib/patbinfree153.jar:lib_j3d/j3dcore.jar:lib_j3d/j3dutils.jar:lib_j3d/vecmath.jar -Djava.library.path="lib_j3d/linux_amd64" gui.ImpactGUI
no avail,
Code:
alex@iskandhar:~$ Impact
Exception in thread "main" java.lang.NoClassDefFoundError: gui/ImpactGUI
Caused by: java.lang.ClassNotFoundException: gui.ImpactGUI
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Could not find the main class: gui.ImpactGUI. Program will exit
even after adding /usr/local/Impact/bin to PATH... won't go...
Can someone please tell me what is wrong here...?
I can run this thing from within its directory... but I do not like messing within the directories of my applications, this is why I sent this to /usr/local, and placed a calling script in /usr/local/bin...
Why can't this go...?
BRGDS
Alex