Search:

Type: Posts; User: Bent

Search: Search took 0.49 seconds.

  1. Thread: How to cal a dll?

    by Bent
    Replies
    3
    Views
    1,825

    Re: How to cal a dll?

    Try JNA. It provides an easier interface than JNI and you don't typically have to write adapter interfaces in C.
  2. Replies
    17
    Views
    3,288

    Re: How to include .ser file into .jar file

    You need to be careful just using user.dir. The user dir can change depending on how the jar is run. If you run from the command line in the jar directory, for example, using java -jar myApp.jar,...
  3. Replies
    17
    Views
    3,288

    Re: How to include .ser file into .jar file

    I did some testing to check it out further. The results were interesting.

    class.getResource returns a a different type of URL depending on whether you're running from a JAR or from a *.class file....
  4. Replies
    17
    Views
    3,288

    Re: How to include .ser file into .jar file

    Well, to get at the problem, we need a get a fix on more details.
    How are you running the JAR?
    What is your classpath when you run it?
    How are you setting the classpath?
    What is your folder...
  5. Replies
    17
    Views
    3,288

    Re: How to include .ser file into .jar file

    As a general rule: If it is in a JAR, it is not a File. You have to use the Class.getResourceAsStream methods to get at it.

    If it is a file, (a REAL file, on your file system, NOT in the JAR) you...
  6. Replies
    17
    Views
    3,288

    Re: How to include .ser file into .jar file

    You've got a lot more difficulty there. From what I understand, JAR files were not intended to be dynamic resource caches, but static ones. There are probably a number of issues but one was that JARs...
  7. Replies
    17
    Views
    3,288

    Re: How to include .ser file into .jar file

    You'll probably want to use the getResourceAsStream method instead of getResource. If I understand it correctly, the file in the JAR doesn't represent a proper file for a File object, so trying to...
  8. Replies
    17
    Views
    3,288

    Re: How to include .ser file into .jar file

    Usually when I have this problem reading files from JARs, it is a character case issue. When you're reading files from disk in windows, the file names are case insensitive. But when you're getting...
Results 1 to 8 of 8