Results 1 to 7 of 7
- 05-01-2011, 02:32 PM #1
Distributing a project to another mac
Ok I've read what I could find on the topic of distributing java apps built with netbeans but still don't understand. I feel really ignorant about this. I built a java app using netbeans 6.9.1 on my OS X 10.6.7 system and the distribution will not run on another identical system. I zipped up the entire dist fold but still won't run. After reading similar postings I figured there must be other libraries and files I must manually copy to the distribution folder but I don't know how. My distribution lib folder contains these 3 jar files:
AbsoluteLayout.jar
imgscalr-lib-3.1.jar
swing-layout-1.0.4.jar
I don't know what else I need to put there, how to figure out what I need there, or actually how to do it.
Someone please tell me in minute detail.
thanks
- 05-01-2011, 03:56 PM #2
Moderator
- Join Date
- Jul 2010
- Location
- California
- Posts
- 1,619
- Rep Power
- 5
When you run the jar, what is the exception (run it via the cammand line to see)? This will tell you a lot more information than you or us guessing what you need
- 05-01-2011, 04:56 PM #3
This is what I get:
Exception in thread "AWT-EventQueue-0" java.lang.UnsupportedClassVersionError: Bad version number in .class file
at java.lang.ClassLoader.defineClass2(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java :775)
at java.security.SecureClassLoader.defineClass(Secure ClassLoader.java:160)
at java.net.URLClassLoader.defineClass(URLClassLoader .java:254)
at java.net.URLClassLoader.access$100(URLClassLoader. java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java: 195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.j ava:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:3 17)
at sun.misc.Launcher$AppClassLoader.loadClass(Launche r.java:280)
at java.lang.ClassLoader.loadClass(ClassLoader.java:2 52)
at java.lang.ClassLoader.loadClassInternal(ClassLoade r.java:375)
at SteakOmatic.MyCanvas.<init>(MyCanvas.java:38)
at SteakOmatic.SteakOmatic.<init>(SteakOmatic.java:26 )
at SteakOmatic.SteakOmatic$15.run(SteakOmatic.java:78 6)
at java.awt.event.InvocationEvent.dispatch(Invocation Event.java:209)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.j ava:499)
at java.awt.EventQueue.access$000(EventQueue.java:80)
at java.awt.EventQueue$1.run(EventQueue.java:462)
at java.awt.EventQueue$1.run(EventQueue.java:461)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectio nPrivilege(AccessControlContext.java:84)
at java.awt.EventQueue.dispatchEvent(EventQueue.java: 471)
at java.awt.EventDispatchThread.pumpOneEventForHierar chy(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForHierarch y(EventDispatchThread.java:190)
at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:184)
at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:176)
at java.awt.EventDispatchThread.run(EventDispatchThre ad.java:110)
- 05-01-2011, 05:24 PM #4
Moderator
- Join Date
- Jul 2010
- Location
- California
- Posts
- 1,619
- Rep Power
- 5
Make sure the computer you are receiving this exception on has the most up to date version of the JRE. Depending upon what version of the JRE your app requires, you can also compile it to allow earlier versions to run, but again this depends upon what your app (and the libraries it uses) requires.
- 05-01-2011, 05:32 PM #5
Well I zipped up the dist folder like I think I'm supposed to to distribute to another computer and gave it to a friend who is running the exact same computer and version I am running and it doesn't work. The error list I gave you was from an older mac of mine. If it is just a jre version problem, how do I specify in the build to be able to run with older versions?
- 05-01-2011, 07:19 PM #6
Moderator
- Join Date
- Jul 2010
- Location
- California
- Posts
- 1,619
- Rep Power
- 5
Specify the version target when you compile. See the following, in particular the -target option
javac - Java programming language compiler
That being said, if this is something you see on an older computer, it may not be the same problem you friend's computer is experiencing - get the exception from that computer to be sure.
- 05-01-2011, 08:16 PM #7
Similar Threads
-
Distributing Pure DesktopApplication that containd Database
By shalin.shah in forum JDBCReplies: 5Last Post: 12-12-2010, 07:04 AM -
Distributing .jar
By mine0926 in forum New To JavaReplies: 1Last Post: 10-21-2010, 02:37 AM -
Weird problem with distributing .jar
By Cynot in forum NetBeansReplies: 3Last Post: 06-07-2010, 10:01 PM -
Weird problem with distributing .jar
By Cynot in forum New To JavaReplies: 4Last Post: 06-07-2010, 12:03 PM -
code migration problem in distributing system
By sushil in forum AWT / SwingReplies: 2Last Post: 10-29-2009, 01:34 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks