cancel
Showing results for 
Search instead for 
Did you mean: 

Invalid or Corrupt JAR file

Former Member
0 Kudos

Hi gurus,

I am new to Netweaver Developer Studio - in fact, I just installed it.

I am going through the "Creating your first J2EE Application" tutorial where you create a simple calculator.

I am having troubles at the point where I create the Java Archive. The JAR file seems to be created successfully but if I try to view the created archive, I get the message "Invalid or Corrupt jarfile <filename>".

I can proceed no further in the tutorial as the next stage is to code the proxy which, I am guessing, needs to address the objects created in the jar file.

I've seen some other forums about too recent versions of Java causing problems. I installed JavaSDK1.4.2_14 .... I think this should be okay?

Thanks,

Tristan

Accepted Solutions (1)

Accepted Solutions (1)

prashil
Advisor
Advisor
0 Kudos

Hi Tristan,

j2sdk1.4.2_14 is perfectly ok with the NWDS.

Please check the path of jar file, you want to use.

Also check the required jar is imported in you Java build path.

If eveything is fine try to download the jar from Internet/ some other j2sdk.

Hope this solves your problem!!!

Regards,

Prashil

Former Member
0 Kudos

Guys,

thanks for your replies, but I am not trying to <b>import</b> beans or jar files. I have coded the Enterprise Java Bean from scratch and am trying to create a JAR archive on this basis.

When I right-click on the project and select "Build Archive" it seems to work and creates a jar file in the project structure, but if I try to view that arhive I get an error message.

Tristan

Former Member
0 Kudos

HI Tristan,

What tool you are using to open jar file created ? Try using different one. If you are moving your jar from one machine to another via FTP make sure you are doing it ib a "binary" mode (especially important if one machine is Windows and another in Unix-based).

Regards,

Mike

Former Member
0 Kudos

Thanks Mike,

I've come to the conclusion that I don't need to open that JAR file. I was simply double-clicking on it in NWDS and expecting it to open.

The reason why I was doing that was that I was refering to objects in the EJB in my JSP project but it was not accepting references to those objects, hence why I thought the corrupt JAR file was an issue.

It turns out I hadn't placed the requisite "import" statement into my JSP code.

Well, you gotta learn the hard way.

Points awarded to all you gurus for bearing with my newbie question!

Tristan

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Tristan,

you can dowload the source files that allow you to run your J2EE application:

<a href="http://www.i-barile.it/SDN/Calc_src.zip">Calculator sources</a>

After you must import into the NWDS.

Reward points for helpful answers.

Best regards,

Gianluca Barile