Skip to content

import static may throw a invalid error "No library found for library.class" #5577

@malcolm-gc

Description

@malcolm-gc

Modify processing so that the Error "No library found for library.class" is not displayed when it is actually found and used by the importing program

Expected Behavior

import static library.class;

Static import is a feature introduced in the Java programming language that allows members (fields and methods) defined in a class as public static to be used in Java code; without specifying the class in which the field is defined. from en.wikipedia.org/wiki/Static_imports They said it better than I could

No errors should be displayed.

Current Behavior

import static library.class;

Works library is available , the static values are available and do not need to be prefixed

An error is displayed in Processing IDE "No library found for common.Palette"
this error is in error . The library is being used.

removing the static option gets rid of the error but then the static values need to be prefixed with the class name.

Steps to Reproduce

files and more words are available from https://github.com/malcolm-gc/template_for_jar-

  1. Install the Project common_jar
  2. build the library by running CreateJarFile.bat this will build a library common.jar
  3. Install the Project PaletteJarSketch
  4. Start PaletteJarSketch in Processing
  5. run the project
  6. Observe that an error is displalyed "No library found for common.Palette" even though the library is being used

Your Environment

  • Processing version: Processing 3.3.7
  • Operating System and OS version: Windows 10

see https://discourse.processing.org/t/including-shared-pde-files-across-projects/1701/47
a response by one of the users indicates that a jar created in Eclipse will not throw this error

Possible Causes / Solutions

import static

https://github.com/processing/processing/wiki/Supported-Platforms#java-versions ( info provided by benfry)

I recommend that the bug report be closed as unsupported or invalid

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions