| | |
jars and classpaths
Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Jul 2005
Posts: 20
Reputation:
Solved Threads: 0
Hello DaniWeb,
. I was hoping someone could help me with a portability issue.
. I've created a jar in JBuilder Foundation 2005. Said jar executes successfully on computers Alpha and Beta, but not Cimarron. When I double-click on the icon on Cimarron, a small black window flashes up and disappears. After clicking a hundred times or so to figure out what it says, I figured out that it says "Exception in thread "main" java.lang.NoClassDefFoundError C:\Sun\AppServer\jdk\bin\DMS-DNMS/jar" or "
... D:\Documents and Settings\lab\Desktop\DMS-DNMS/jar"
. I'm using an executable jar rather than command-line code because my users aren't programmers, and I don't want them to have to do anything other than double-click on an icon to make the program run.
. I have installed the latest jdk on Cimarron. I tried the program from both the desktop and inside the jdk bin. The desktop is on a different drive than the jdk, which is on the C drive, but it didn't run in the jdk folder either.
. I'm suspecting the problem lies in my immortal nemesis, the classpath, but I'm not sure how to confirm this.
. Oh, and just so you know, my manifest does list the appropriate file holding the "main". Pretty sure it wouldn't work on Alpha or Beta otherwise.
. So, what should I look for? I haven't tried other executable jars or any kinds of programs on Cimarron yet, so I don't know whether it simply hates all Java... that would be good to check out... anything else?
. I was hoping someone could help me with a portability issue.
. I've created a jar in JBuilder Foundation 2005. Said jar executes successfully on computers Alpha and Beta, but not Cimarron. When I double-click on the icon on Cimarron, a small black window flashes up and disappears. After clicking a hundred times or so to figure out what it says, I figured out that it says "Exception in thread "main" java.lang.NoClassDefFoundError C:\Sun\AppServer\jdk\bin\DMS-DNMS/jar" or "
... D:\Documents and Settings\lab\Desktop\DMS-DNMS/jar"
. I'm using an executable jar rather than command-line code because my users aren't programmers, and I don't want them to have to do anything other than double-click on an icon to make the program run.
. I have installed the latest jdk on Cimarron. I tried the program from both the desktop and inside the jdk bin. The desktop is on a different drive than the jdk, which is on the C drive, but it didn't run in the jdk folder either.
. I'm suspecting the problem lies in my immortal nemesis, the classpath, but I'm not sure how to confirm this.
. Oh, and just so you know, my manifest does list the appropriate file holding the "main". Pretty sure it wouldn't work on Alpha or Beta otherwise.
. So, what should I look for? I haven't tried other executable jars or any kinds of programs on Cimarron yet, so I don't know whether it simply hates all Java... that would be good to check out... anything else?
•
•
Join Date: Jun 2004
Posts: 2,108
Reputation:
Solved Threads: 18
I wouldn't think the classpath needs to be set, but I could be wrong.
Looks like it's expecting to find a class somewhere on the users computer which is on computer a and computer b, but not on computer c.
Java Syntax (Toggle Plain Text)
C:\Sun\AppServer\jdk\bin\DMS-DNMS/jar" or " ... D:\Documents and Settings\lab\Desktop\DMS-DNMS/jar"
Looks like it's expecting to find a class somewhere on the users computer which is on computer a and computer b, but not on computer c.
•
•
Join Date: Jul 2005
Posts: 20
Reputation:
Solved Threads: 0
•
•
•
•
Originally Posted by server_crash
I wouldn't think the classpath needs to be set, but I could be wrong.
Java Syntax (Toggle Plain Text)
C:\Sun\AppServer\jdk\bin\DMS-DNMS/jar" or " ... D:\Documents and Settings\lab\Desktop\DMS-DNMS/jar"
Looks like it's expecting to find a class somewhere on the users computer which is on computer a and computer b, but not on computer c.
•
•
Join Date: Aug 2005
Posts: 216
Reputation:
Solved Threads: 8
There could be couple of issues.
The system classpath could be different on each machine.
The way that jar files were setup to execute could be different.
One way to see what is actually happening with that jar file is to open a command prompt window move to the directory your jar is in and execute it from the command line. That way you will see exactly what the error is.
Regards,
Nate
The system classpath could be different on each machine.
The way that jar files were setup to execute could be different.
One way to see what is actually happening with that jar file is to open a command prompt window move to the directory your jar is in and execute it from the command line. That way you will see exactly what the error is.
Regards,
Nate
•
•
Join Date: Jul 2005
Posts: 20
Reputation:
Solved Threads: 0
•
•
•
•
Originally Posted by hooknc
There could be couple of issues.
The system classpath could be different on each machine.
The way that jar files were setup to execute could be different.
One way to see what is actually happening with that jar file is to open a command prompt window move to the directory your jar is in and execute it from the command line. That way you will see exactly what the error is.
Regards,
Nate
. I ended up going into Windows Explorer, and adding a file type association and action for jar files. 's'funny, I woulda thought that the jdk install should have done something of the sort. But it works now. Only oddity now is that a command window pops up on computer Cimarron, where it doesn't on Alpha or Beta... makes figuring problems easier with the error messages (it reminded me to add the appropriate .dlls to the right places, which I hadn't yet), but just a bit confusing for the users to have an extra thing pop up on the screen.
Anywho, me happy. :mrgreen: :cheesy:
![]() |
Similar Threads
- HELP, IE homepage defaults to "res://dkahp.dll/index.html #37049" (Viruses, Spyware and other Nasties)
- Output, Print Preview, JARs/Bean? - Please Help (Java)
- Help ME! I am getting a BRIDGE DLL ERROR (Windows NT / 2000 / XP)
Other Threads in the Java Forum
- Previous Thread: jabber protocol
- Next Thread: why i got this error ??
| Thread Tools | Search this Thread |
Tag cloud for Java
affinetransform android api apple applet application arc arguments array arrays automation binary bluetooth businessintelligence chat class classes client code component database desktop draw ebook eclipse encode equation error event exception file fractal game givemetehcodez graphics gui helpwithhomework html ide image input integer intersect j2me java javaexcel javaprojects jmf jni jpanel julia linked linux list loop mac main map method methods mobile netbeans newbie number online open-source oracle parameter print problem program programming project properties recursion reference replaysolutions rotatetext scanner score screen scrollbar server set size sms socket sort sql string superclass swing template test threads time tree windows working xstream






