Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Force JRE to use CLASS files instead of JAR files

scampsdNov 19 2014 — edited Dec 5 2014

Dear,

I am working on a product, based on Java technology.

This product has previously been compiled into a *.jar file.

When I change a *.java file, the corresponding *.class file gets created (not the *.jar) file.

I then put the *.class file in the same directory of the *.jar file, and it seems that normally the JRE knows somehow that he needs to use the *.class file instead of the one, embedded in the *.jar file.

However on my system this seems not to work.

I believe it has something to do with the CLASSPATH variable, but I have no idea how to work with this.

Does anybody has an idea on how to tell JRE that it can take a *.jar file for executing a program, but in case *.class files are found in the same directory, those ones need to be used instead of the ones, embedded in the *.jar file?

Thanks

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 2 2015
Added on Nov 19 2014
3 comments
1,669 views