Win a copy of Getting started with Java on the Raspberry Pi this week in the Raspberry Pi forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Liutauras Vilda
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Piet Souris

JSP loading a dll

 
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I am trying to do a system.load(D:\this\that\blah.dll)

When i do this it says that "JSPG0059E: Unable to compile class for JSP ". This is running on a webbased platform obviously should i have some type of http in front of it? I know my location of this load command is in the wrong place. In which jsp should I be trying ot load this dll?

Randy
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1. The path to the DLL should not have a HTTP: in front of it - you are loading a native library from the server's file system - not accessing a resource through a URL.

2. Is the path to the DLL correct? If you are using "\", remember this is the start of an escape sequence in Java - use "\\" or "/" instead.

3. Is there any further information on why the JSP was unable to be compiled? This would probably help you figure out what was not working...

4. JSPs are supposed to just provide presentation... loading a DLL in one doesn't seem like the best design decision...
 
Tempora Telora
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am just trying to load the dll to see if this is going to work. I was thrown on mid of the project and I noticed that this dll is not getting loaded.

1. When loading the dll it is a string so java should not have a problem with it.

2. There are no other errors in my code. If i comment the line out it works.. If i uncomment it doesnt work.

I dont really know why it will not load the dll though. I am use an absolute path and i have tried using hte system.loadlibrary command as well.
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry - I think I misunderstood - when you wrote "some type of http in front of it" I thought you meant putting "http://" in front of the path to the DLL... did you mean what you should put around the code in the page instead?

You should use a JSP declaration tag (<%! ... %>) to include the code to load the library in your page, something like:



(Though again, doing this in a JSP isn't a good design decision...)
[ June 05, 2006: Message edited by: Nathan Pruett ]
 
Sheriff
Posts: 67732
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've moved this to Java in General (intermediate) since doing this from a JSP (I'll echo that I don't think that's a good idea) is no different from any other Java program.
 
Tempora Telora
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Error 500: com/sun/xml/rpc/client/BasicService

Is my current error. It occurs when I try and warp and call a class using the (Service)class.forname(etc)

I have googled everywhere but, this is throwing me for a loop and i didnt want to repost
 
It's a tiny ad only because the water is so cold.
Low Tech Laboratory
https://www.kickstarter.com/projects/paulwheaton/low-tech-0
reply
    Bookmark Topic Watch Topic
  • New Topic