The Artima Developer Community
Sponsored Link

Java Answers Forum
Trouble with a jar file

7 replies on 1 page. Most recent reply: May 9, 2003 3:27 AM by adam seel

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 7 replies on 1 page
adam seel

Posts: 4
Nickname: adamuk
Registered: May, 2003

Trouble with a jar file Posted: May 8, 2003 4:14 PM
Reply to this message Reply
Advertisement
I'm having trouble with a jar file...

My code runs fine in JBuilder University Edition, and compiles in there ok...

but when I use the deployment wizard to create a jar file I have trouble

during the deployment I have no problems, but when I try and run it from command prompt, i get a flood of errors complaining about it.

any ideas please?


Singh M.

Posts: 154
Nickname: ms
Registered: Mar, 2002

Re: Trouble with a jar file Posted: May 8, 2003 5:49 PM
Reply to this message Reply
What errors do you get?

adam seel

Posts: 4
Nickname: adamuk
Registered: May, 2003

Re: Trouble with a jar file Posted: May 8, 2003 6:28 PM
Reply to this message Reply
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\a>cd\

C:\>a:

A:\>java -classpath rooms.jar rooms.RoomMenu
Registry key 'Software\JavaSoft\Java Runtime Environment\CurrentVersion'
has value '1.3', but '1.4' is required.
Error: could not find java.dll
Error: could not find Java 2 Runtime Environment.

---

java -classpath rooms.jar rooms.RoomMenu

the above is the line i'm using to attempt running it
and obviously my .jar is in the root of a floppy disk

Kishori Sharan

Posts: 211
Nickname: kishori
Registered: Feb, 2002

Re: Trouble with a jar file Posted: May 8, 2003 7:00 PM
Reply to this message Reply
Simple solution is to uninstall and re-install Java on your computer and it will work.

adam seel

Posts: 4
Nickname: adamuk
Registered: May, 2003

Re: Trouble with a jar file Posted: May 8, 2003 7:20 PM
Reply to this message Reply
ive just tried that, and now it says



C:\JBuilder\myclasses>java -classpath rooms.jar rooms.RoomMenu
Exception in thread "main" java.lang.NoClassDefFoundError: rooms/RoomMenu

Kishori Sharan

Posts: 211
Nickname: kishori
Registered: Feb, 2002

Re: Trouble with a jar file Posted: May 8, 2003 9:12 PM
Reply to this message Reply
Now it is not able to find the class you wanted to run. Send me (kishori_sharan@yahoo.com) your jar file with description of what you want to do and I will send you steps to run your class.

reetesh

Posts: 2
Nickname: javadog
Registered: May, 2003

Re: Trouble with a jar file Posted: May 9, 2003 3:18 AM
Reply to this message Reply
hi adam,
Have you checked the jar file structure ?
if not..simply extract the jar file in some temp folder.
check if it maintains a package .if it does you will have to specify the package name while you are running the jar file...
if it does not work
you can send me the jar file at reetesh_Singh@rediffmail.com..
i m sure i can help you
Reetesh

adam seel

Posts: 4
Nickname: adamuk
Registered: May, 2003

Re: Trouble with a jar file Posted: May 9, 2003 3:27 AM
Reply to this message Reply
thanks for the help guys, but my deadline has passed =[

I handed in complete and working source code to my tutor, so hopefully I'll scrape a pass.

Cheers anyway!

Flat View: This topic has 7 replies on 1 page
Topic: dealing with powers Previous Topic   Next Topic Topic: help!

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use