Pre Exam Test Practice (SSC | Banking | IAS | GATE | State Level | CLAT | Railways | Insurance | Teaching Exams | NDA | Defence | IES |State Exam )

Organizational Research By

Surprising Reserch Topic

load file within a jar using -'java,jar'

load file within a jar  using -'java,jar'

I need to package a configuration file within a jar.  the configuration file is under the root of the jar file.
However I got the following error:

  Caused by: java.lang.IllegalArgumentException: URI is not hierarchical
    at Source)

File url = new File(MyClass.class.getClassLoader().getResource("my.conf").toURI());


asked Sep 7, 2015 by rajesh
0 votes

Related Hot Questions

Government Jobs Opening