For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings

 

Need to speed up your development?
Have a look at our:

Samples & Tools

 

Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

Java Sample Problems!!!

Mahmoud Hanafi's picture
Forums: 

I download the Java Sample program and ran the "runme.bat" I got the following error.

Thanks in advance for all your help!!

I have cut the whole section here --------------------------------------- D:\CASCADESamples\java>runme

D:\CASCADESamples\java>set CSF_GraphicShr=D:/Cascade/CAS3.0\windows_nt\dll\OpenG l.dll

D:\CASCADESamples\java>set CSF_UnitsLexicon=YOURPATH\java\etc\Lexi_Expr.dat

D:\CASCADESamples\java>set CSF_UnitsDefinition=YOURPATH\java\etc\Units.dat

D:\CASCADESamples\java>set CSF_MDTVFontDirectoryYOURPATH\java\etc Environment variable CSF_MDTVFontDirectoryYOURPATH\java\etc not defined

D:\CASCADESamples\java>set PATH=D:/Cascade/CAS3.0\windows_nt\dll;D:\Program File s\Microsoft Visual Studio\Common\Tools;D:\Program Files\Microsoft Visual Studio\ Common\Msdev98\BIN;D:\Program Files\Microsoft Visual Studio\DF98\BIN;D:\Program Files\Microsoft Visual Studio\VC98\BIN;C:\WINNT\system32;C:\WINNT;D:\jdk1.2.2\bi n;d:\lsdyna3d\;D:\Cascade\CAS3.0\Windows_NT\dll;D:\Cascade\CAS3.0\Windows_NT\lib ;;c:\Corel\Office7\Shared\TrueDoc\Bin

D:\CASCADESamples\java>java -classpath .;CASCADESamples.jar SamplesStarter POP --> on est dans MetaGraphicDriverFactory avec AShrName == D:/Cascade/CAS3.0\ windows_nt\dll\OpenGl.dll POP : on est dans OpenGl_GraphicDriver::OpenGl_GraphicDriver avec AShrName == D: /Cascade/CAS3.0\windows_nt\dll\OpenGl.dll POP : on est dans MetaGraphicDriverFactory apres new AShrName == D:/Cascade/CAS 3.0\windows_nt\dll\OpenGl.dll POP --> on est dans MetaGraphicDriverFactory avec AShrName == D:/Cascade/CAS3.0\ windows_nt\dll\OpenGl.dll POP : on est dans OpenGl_GraphicDriver::OpenGl_GraphicDriver avec AShrName == D: /Cascade/CAS3.0\windows_nt\dll\OpenGl.dll POP : on est dans MetaGraphicDriverFactory apres new AShrName == D:/Cascade/CAS 3.0\windows_nt\dll\OpenGl.dll Exception in thread "main" java.lang.UnsatisfiedLinkError: D:\CASCADESamples\jav a\SampleAISBasicJni.dll: Can't find dependent libraries

at java.lang.ClassLoader$NativeLibrary.load(Native Method)

at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1319)

at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1243)

at java.lang.Runtime.loadLibrary0(Runtime.java:470)

at java.lang.System.loadLibrary(System.java:768)

at SampleAISBasicJni.UnitsAPI. (UnitsAPI.java:26)

at SampleAISBasicPanel.createViewPanel(SampleAISBasicPanel.java:86)

at SamplePanel.jbInit(SamplePanel.java:51)

at SamplePanel. (SamplePanel.java:28)

at SampleAISBasicPanel. (SampleAISBasicPanel.java:68)

at SamplesStarter. (SamplesStarter.java:83)

at SamplesStarter.main(SamplesStarter.java:168)

-----Original Message----- From: Arnaud HAFFRAY [mailto:a-haffray@paris1.matra-dtv.fr] Sent: Tuesday, February 01, 2000 11:39 AM To: Hanafi Mahmoud Contr AFRL/HEPA Subject: Your problem

Hello,

Thanks for your interest on opencascade.

To resolve your problem look at this new runme.bat Just change your path by the samples install directory name.

set CSF_GraphicShr=%CASROOT%\windows_nt\dll\OpenGl.dll set CSF_UnitsLexicon=YOURPATH\java\etc\Lexi_Expr.dat set CSF_UnitsDefinition=YOURPATH\java\etc\Units.dat set CSF_MDTVFontDirectoryYOURPATH\java\etc

set PATH=%CASROOT%\windows_nt\dll;%PATH%

java -classpath .;CASCADESamples.jar SamplesStarter

Best regards

arnaud

Thanks, I renamed file and it works now.

But I had a few problems.

After loading the demo.bat I get the follow error but things seem to work.

"MDI: Load Accel failure!"

Also I download the Java samples I get the following error when I run "runme.bat"

DUMP-------start here----- 0x072C387C : Aspect_GraphicDeviceDefinitionError: The specified procedure could not be found.

jcas.CasCadeException: 0x072C387C : Aspect_GraphicDeviceDefinitionError: The spe cified procedure could not be found.

at CASCADESamplesJni.X3dService.Viewer(Native Method)

at SampleGeometryPanel.createViewPanel(SampleGeometryPanel.java:180)

at SamplePanel.jbInit(SamplePanel.java:51)

at SamplePanel. (SamplePanel.java:28)

at SampleGeometryPanel. (SampleGeometryPanel.java:130)

at SamplesStarter. (SamplesStarter.java:68)

at SamplesStarter.main(SamplesStarter.java:168) Exception in thread "main" java.lang.NullPointerException

at SampleGeometryPanel. (SampleGeometryPanel.java:143)

at SamplesStarter. (SamplesStarter.java:68)

at SamplesStarter.main(SamplesStarter.java:168)

Haffray Arnaud's picture

Hello,

in your case change the runme.bat like this :

set CSF_GraphicShr=D:\Cascade\CAS3.0\windows_nt\dll\OpenGl.dll set CSF_UnitsLexicon=D:\CASCADESamples\java\etc\Lexi_Expr.dat set CSF_UnitsDefinition=D:\CASCADESamples\java\etc\Units.dat set CSF_MDTVFontDirectory=D:\CASCADESamples\java\etc set PATH=D:\Cascade\CAS3.0\windows_nt\dll;%PATH%

Regards.

Arnaud

Mahmoud Hanafi's picture

Hi,

Make the changes to runme.bat But I still get the error ------------error dump ------------------ POP : on est dans OpenGl_GraphicDriver::OpenGl_GraphicDriver avec AShrName == D: \Cascade\CAS3.0\windows_nt\dll\OpenGl.dll POP : on est dans MetaGraphicDriverFactory apres new AShrName == D:\Cascade\CAS 3.0\windows_nt\dll\OpenGl.dll Exception in thread "main" java.lang.UnsatisfiedLinkError: D:\CASCADESamples\jav a\SampleAISBasicJni.dll: Can't find dependent libraries

at java.lang.ClassLoader$NativeLibrary.load(Native Method)

at java.lang.ClassLoader.loadLibrary0(ClassLoader.java, Compiled Code)

at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1243)

at java.lang.Runtime.loadLibrary0(Runtime.java:470)

at java.lang.System.loadLibrary(System.java:768)

at SampleAISBasicJni.UnitsAPI. (UnitsAPI.java:26)

at SampleAISBasicPanel.createViewPanel(SampleAISBasicPanel.java:86)

at SamplePanel.jbInit(SamplePanel.java:51)

at SamplePanel. (SamplePanel.java:28)

at SampleAISBasicPanel. (SampleAISBasicPanel.java:68)

at SamplesStarter. (SamplesStarter.java:83)

at SamplesStarter.main(SamplesStarter.java:168) --------------------end of error dump------------

------------------runme.bat-------------------- set CSF_GraphicShr=D:\Cascade\CAS3.0\windows_nt\dll\OpenGl.dll set CSF_UnitsLexicon=D:\CASCADESamples\java\etc\Lexi_Expr.dat set CSF_UnitsDefinition=D:\CASCADESamples\java\etc\Units.dat set CSF_MDTVFontDirecty=D:\CASCADESamples\java\etc

set PATH=D:\Cascade\CAS3.0\windows_nt\dll;%PATH%

java -classpath .;CASCADESamples.jar SamplesStarter ---------------------------------------------