2

I want to create a properties file on my classpath then put that file in my folder, but I do not understand: what is my classpath?

I know that classpath contains jars and references to the top level folders. I also read many related threads regarding the same (What is a classpath?) but I want some very basic explanation for it so that I won't be confused later.

My classpath variable contains multiple values so which is the exact path and where should I create my new file?

If I try to add new file to the project and file name is "jboss-ejb-client.properties", eclipse gives an error of invalid file name???

Thanks in advance.

Community
  • 1
  • 1
user1079065
  • 2,085
  • 9
  • 30
  • 53

1 Answers1

0

A ClassPath is a path for a specific class: for example you have a package called me.name.utils and you have a a class Bar in it. The classpath to it will be: me.name.utils.Bar

Think about folders, you have a foo.exe file on your Desktop, in this case, the package will be: C:/Users/User/Desktop and the class will be foo.exe so the "classpath" will be C:/Users/User/Desktop/foo.exe

Except instead of files and folders, there are packages and classes (or interfaces/anything else)

Victor2748
  • 4,149
  • 13
  • 52
  • 89