[vtkusers] Java UnsatisfiedLinkError using "java -jar xxx.jar" but succeed by double click the xxxfile.jar
Sathish Kumar
kingvsk at aol.com
Fri Apr 29 06:12:11 EDT 2011
Hi,
Nice. Please send a copy of your reply mails to *vtkusers at vtk.org*. So
that all vtk users will get a chance to view the solutions.
Thanks,
Sathish,
On Friday 29 April 2011 02:37 PM, 林可 wrote:
> Oh, I did as you told me and It worked:)
>
> You are really so kind, thank you so much :-p
>
> 在 2011年4月29日 下午4:11,Sathish Kumar <kingvsk at aol.com
> <mailto:kingvsk at aol.com>>写 道:
>
> Hi,
>
> Try to run following commands
>
> set PATH=%JAVA_HOME%\jre\bin;%PATH%;
> java -jar XXX.jar
>
> Sathish,
>
>
>
> On Friday 29 April 2011 12:39 PM, 林可 wrote:
>> Not yet...
>>
>> I checked JAVA_HOME and it is right. ("C:\sdk\Java\jdk1.6.0_22")....
>>
>> 在 2011年4月29日 下午2:57,Sathish Kumar <kingvsk at aol.com
>> <mailto:kingvsk at aol.com>>写 道:
>>
>> Is your Problem Solved?
>>
>> That looks JAVA_HOME contains the wrong path.
>>
>> Sathish,
>>
>>
>> On Friday 29 April 2011 12:23 PM, 林可 wrote:
>>> oh, this long text of "PATH" derives fromusing
>>> 'System.out.println("java.library.path")', the
>>> "java.library.path" contains something called system path,
>>> which is the part before "C:\sdk\vtk-5.6.1\VTKbin\bin\Debug"
>>> and I can't modify it, infact, my windows "PATH" is the part
>>> include and after
>>> "C:\sdk\vtk-5.6.1\VTKbin\bin\Debug;C:\dev\tools\apache-ant-1.7.0\bin;C:\sdk\Java\jdk1.......".
>>>
>>> I really hate windows :-| ....
>>>
>>> 在 2011年4月29日 下午2:26,Sathish Kumar <kingvsk at aol.com
>>> <mailto:kingvsk at aol.com>>写 道:
>>>
>>> Hi,
>>>
>>> I think the problem is in your path. Windows PATH should
>>> contain only backslashes. But your path contain
>>> "C:/sdk/Java/jdk1.6.0_22/bin/../jre/bin". So please
>>> change the slashes to backslash.(/ to \). Check the blue
>>> colored text.
>>>
>>>
>>> C:\sdk\Java\jdk1.6.0_22\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\sdk\Java\jdk1.6.0_22\jre\bin;C:/sdk/Java/jdk1.6.0_22/bin/../jre/bin/client;C:/sdk/Java/jdk1.6.0_22/bin/../jre/bin;C:\sdk\vtk-5.6.1\VTKbin\bin\Debug;C:\dev\tools\apache-ant-1.7.0\bin;C:\sdk\Java\jdk1.6.0_22\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;c:\notes;c:\Program
>>> Files\XLView;C:\Utilities;C:\lotus\component;C:\Program
>>> Files\IBM\Personal Communications\;C:\Program
>>> Files\IBM\Trace Facility\;C:\lotus\compnent;C:\Program
>>> Files\Intel\WiFi\bin\;C:\Program
>>> Files\ThinkPad\ConnectUtilities;C:\MySQL\MySQL Server
>>> 5.5\bin;C:\Program Files\TortoiseSVN\bin;C:\Program
>>> Files\CMake
>>> 2.8\bin;C:\sdk\python\Python27;C:\sdk\python\Python27\Scripts;C:\Program
>>> Files\Microsoft Visual
>>> Studio\Common\Tools\WinNT;C:\Program Files\Microsoft
>>> Visual Studio\Common\MSDev98\Bin;C:\Program
>>> Files\Microsoft Visual Studio\Common\Tools;C:\Program
>>> Files\Microsoft Visual Studio\VC98\bin;C:\Program
>>> Files\SSH Communications Security\SSH Secure Shell
>>>
>>>
>>> Sathish
>>>
>>>
>>>
>>> On Friday 29 April 2011 11:24 AM, 林可 wrote:
>>>> I copied awt.dll from my
>>>> "C:\sdk\Java\jdk1.6.0_22\jre\bin" to my VTK lib dir
>>>> "C:\sdk\vtk-5.6.1\VTKbin\bin\Debug", but I still got
>>>> the same error........ UnsatisFiedLinkError: ....
>>>> vtkRenderingJava.dll Can't find dependent libraries,
>>>> thanks very much anyway:)
>>>>
>>>> 2011/4/29 Sathish Kumar <kingvsk at aol.com
>>>> <mailto:kingvsk at aol.com>>
>>>>
>>>> Hi,
>>>>
>>>> Try to add awt.dll to your vtk lib path.
>>>>
>>>> Sathish,
>>>>
>>>>
>>>> On Friday 29 April 2011 07:21 AM, 林可 wrote:
>>>>> Hi, I compressed a vtk java wrapper demo in to a
>>>>> jar file, in which those vtk libraries are used:
>>>>> System.loadLibrary("vtkCommonJava");
>>>>> System.loadLibrary("vtkFilteringJava");
>>>>> System.loadLibrary("vtkIOJava");
>>>>> System.loadLibrary("vtkImagingJava");
>>>>> System.loadLibrary("vtkGraphicsJava");
>>>>> System.loadLibrary("vtkRenderingJava");
>>>>>
>>>>> The strange result is when I double-click the
>>>>> xxx.jar file, it runs well; but when I use a
>>>>> command line and type "java -jar xxx.jar", I will
>>>>> encounter an UnsatisfiedLinkError when loading
>>>>> vtkRenderingJava except which the other lib files
>>>>> are correctly loaded.
>>>>>
>>>>> here is my environment:
>>>>> - Win32 XP
>>>>> - vtk5.6.1
>>>>> - jdk 1.6.0_22
>>>>> - cmake 2.8.4
>>>>> - visual studio express 2008
>>>>>
>>>>> I also use Eclipse to run the demo directly, it
>>>>> also runs well. So I felt very strange.
>>>>>
>>>>> I am wondering if there are some jvm arguments I
>>>>> missed when try to launch by "java -jar xxx.jar",
>>>>> or some other reasons, thanks in advance.
>>>>>
>>>>> I am sure the vtk bin library is included in the
>>>>> "PATH" variant, for my java.library,path is as
>>>>> follows:
>>>>>
>>>>> C:\sdk\Java\jdk1.6.0_22\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\sdk\Java\jdk1.6.0_22\jre\bin;C:/sdk/Java/jdk1.6.0_22/bin/../jre/bin/client;C:/sdk/Java/jdk1.6.0_22/bin/../jre/bin;C:\sdk\vtk-5.6.1\VTKbin\bin\Debug;C:\dev\tools\apache-ant-1.7.0\bin;C:\sdk\Java\jdk1.6.0_22\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;c:\notes;c:\Program
>>>>> Files\XLView;C:\Utilities;C:\lotus\component;C:\Program
>>>>> Files\IBM\Personal Communications\;C:\Program
>>>>> Files\IBM\Trace
>>>>> Facility\;C:\lotus\compnent;C:\Program
>>>>> Files\Intel\WiFi\bin\;C:\Program
>>>>> Files\ThinkPad\ConnectUtilities;C:\MySQL\MySQL
>>>>> Server 5.5\bin;C:\Program
>>>>> Files\TortoiseSVN\bin;C:\Program Files\CMake
>>>>> 2.8\bin;C:\sdk\python\Python27;C:\sdk\python\Python27\Scripts;C:\Program
>>>>> Files\Microsoft Visual
>>>>> Studio\Common\Tools\WinNT;C:\Program
>>>>> Files\Microsoft Visual
>>>>> Studio\Common\MSDev98\Bin;C:\Program
>>>>> Files\Microsoft Visual
>>>>> Studio\Common\Tools;C:\Program Files\Microsoft
>>>>> Visual Studio\VC98\bin;C:\Program Files\SSH
>>>>> Communications Security\SSH Secure Shell
>>>>>
>>>>> Sincerely,
>>>>> Kevin Lin
>>>>> 2011-04-29
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Powered by www.kitware.com <http://www.kitware.com>
>>>>>
>>>>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>>>>>
>>>>> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>>>>>
>>>>> Follow this link to subscribe/unsubscribe:
>>>>> http://www.vtk.org/mailman/listinfo/vtkusers
>>>>
>>>>
>>>
>>>
>>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110429/998cc175/attachment.htm>
More information about the vtkusers
mailing list