Error while using the load class from Java to import property file

notPercival :

I've seen several examples of reading a properties file, but I can't seem to get it to work, am I missing a "load" method/class? Even the import does not work.

Please see attached image for more infomation:

image

hev1 :

Naming your class Properties is shadowing java.util.Properties. You either need to rename your class to something like MyProperties, or qualify each access to java.util.Properties and remove the import.

private static java.util.Properties config = new java.util.Properties();

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Java

Scripting java : import a class from an external file

From Java

Can we specify directory path with the property file while using ResourceBundle class in Java?

From Java

Error: Can't find or load main class when using Java command after compiling a .Java file with multiple classes

From Java

ClassNotFoundException when trying to load a class from a jar file at runtime in Java

From Dev

How to load property file from classpath in AWS lambda java

From Dev

Cannot import React JSX from separate file while using Typescript

From Dev

Getting an file exists error while import into Hive using sqoop

From Dev

PowerShell Class Inheritance from separate file using Import-Module

From Dev

load file in package class, no package in import

From Dev

Error: Could not find or load main class while executing jar file

From Dev

Load queries from property file JDBC Java

From Dev

"message":"Failed to import dashboard" error while import grafana existing json file using HTTP API

From Dev

relative import error while importing file from diffrent package in python

From Dev

How to import class of one file to another in a subfolder in Java using vscode

From Dev

Error: Could not find or load main class while parsing an XML file

From Dev

VS Load testing: getting error during import of huge ltrar file from load tests

From Dev

Import error while using pyshark

From Dev

Getting error message while initializing IBM MQ from java class

From Dev

Java class import Error ! Liferay

From Dev

Load aliases from .bashrc file while using sudo

From Dev

Error when using export/import SQL file from phpMyAdmin

From Dev

Java: Error: Could not find or load main class Hello when trying to import an external library

From Dev

Error: Could not find or load main class while class is included in the jar file

From Dev

Using Jenkins Shared Libraries, import Class from file within vars/?

From Dev

Import php class from file

From Dev

SonarQube Vulnerability while using File class in Java

From Dev

Incomplete type error while using class from my own dll

From Dev

Cannot import class file from Java project into another class file in the same project

From Dev

How to load a class from a Jar file at runtime with the Java Debug Interface

Related Related

  1. 1

    Scripting java : import a class from an external file

  2. 2

    Can we specify directory path with the property file while using ResourceBundle class in Java?

  3. 3

    Error: Can't find or load main class when using Java command after compiling a .Java file with multiple classes

  4. 4

    ClassNotFoundException when trying to load a class from a jar file at runtime in Java

  5. 5

    How to load property file from classpath in AWS lambda java

  6. 6

    Cannot import React JSX from separate file while using Typescript

  7. 7

    Getting an file exists error while import into Hive using sqoop

  8. 8

    PowerShell Class Inheritance from separate file using Import-Module

  9. 9

    load file in package class, no package in import

  10. 10

    Error: Could not find or load main class while executing jar file

  11. 11

    Load queries from property file JDBC Java

  12. 12

    "message":"Failed to import dashboard" error while import grafana existing json file using HTTP API

  13. 13

    relative import error while importing file from diffrent package in python

  14. 14

    How to import class of one file to another in a subfolder in Java using vscode

  15. 15

    Error: Could not find or load main class while parsing an XML file

  16. 16

    VS Load testing: getting error during import of huge ltrar file from load tests

  17. 17

    Import error while using pyshark

  18. 18

    Getting error message while initializing IBM MQ from java class

  19. 19

    Java class import Error ! Liferay

  20. 20

    Load aliases from .bashrc file while using sudo

  21. 21

    Error when using export/import SQL file from phpMyAdmin

  22. 22

    Java: Error: Could not find or load main class Hello when trying to import an external library

  23. 23

    Error: Could not find or load main class while class is included in the jar file

  24. 24

    Using Jenkins Shared Libraries, import Class from file within vars/?

  25. 25

    Import php class from file

  26. 26

    SonarQube Vulnerability while using File class in Java

  27. 27

    Incomplete type error while using class from my own dll

  28. 28

    Cannot import class file from Java project into another class file in the same project

  29. 29

    How to load a class from a Jar file at runtime with the Java Debug Interface

HotTag

Archive