473,385 Members | 1,813 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

moving JARs from NetBeans/PC to Mac

18
I have built an app in NetBeans on a PC and compiled it into a JAR file - Qubic.jar. I now want to move that to a Mac Pro and run it. What I actually ended up with was:

dist/
Qubic.jar
lib/
appframework-1.0.3.jar
swingworker-1.1.jar

When I recreate this directory structure on the Mac in Terminal and run the app (java -jar Qubic.jar) it does not run because it cannot find the class definition of SingleFrameApplication. On the web I see that this is because it is not using the right class path. So I tried:

export CLASSPATH=/Users/....

and also :

java -cp /Users/...

but neither of these helped. Then when I did a "man java" it says that when using a JAR file (-jar xxx.jar) all user classes must be in that JAR. When I extract all the JAR files in their respective locations, it still doesn't work.

Does anyone have any experience with this?

Thx,
Chris
Jul 28 '09 #1
3 2310
JosAH
11,448 Expert 8TB
Read this tutorial and pay special attention to the manifest section. You can specify a classpath in the manifest file and store that in your .jar file.

kind regards,

Jos
Jul 29 '09 #2
dorito
18
Well .. the answer turned out to be that the version of Java I was running on the Mac did not include javax.swing.grouplayout ... so I had to locate and run version 1.06.xxx of the JRE. Then everything was OK.

Still, I learned a lot about JARs and the MANIFEST. Thanks,
Chris
Jul 29 '09 #3
JosAH
11,448 Expert 8TB
@dorito
The JVM should've thrown an Exception because of that: it can't find the class GroupLayout ...

kind regards,

Jos
Jul 30 '09 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: King W.Wang | last post by:
Hi all, I've installed NetBeans IDE 3.5 on Windows XP. But if I try to start it, a message box shows "cannot load jvm.dll". This library does exist in a subdirectory. My questions are: 1) Is...
0
by: Mark McKay | last post by:
I'm finding I'm unable to use the ant tool with Netbeans in Windows 2000 to sign the JAR files I generate. I'm using the following ant tag, and the .keystore file is in my home directory: ...
3
by: Joseph Jolic | last post by:
Hi i just installed Netbeans on my windows pc and it installed fine. but when i try to run it i get: JDK 1.3 or later cannot be found on your machine. Please read the README file. i read...
1
by: Ted Byers | last post by:
1) I need to support installing a Java application from CD on both Windows AND on the Mac. I have figured out how autorun works on Windows. Is the method for doing this the same on the Mac as it...
1
by: tmb | last post by:
I'm a newbie to Java. At http://java.sun.com/j2se/1.4.2/download.html I see I can download... NetBeans IDE + J2SE SDK as a 'bundle' I beleive is both NetBeans and the Java SDK... My...
5
by: Thomas | last post by:
Hi folks, is there any obvious reason why the java compiler cannot load jars from an NTFS filesystem under Linux (Debian) ? I know for sure that the path I specify is correct and I have read...
0
by: buk110 | last post by:
Hi everyone, I'm new to using JAVA and I'm trying to interact with a web service I wrote in C# I downloaded Netbeans & followed the instructions to point to the wsdl file I navigated to my...
0
by: sokeefe | last post by:
I use NetBeans IDE to develop a Java application. In the past, I could use the Design Editor to edit my form for the GUI. Spontaneously, NetBeans is unable to open the form file, producing this...
1
by: sokeefe | last post by:
I am trying to edit the GUI of a project in Netbeans. In particular, I am trying to add new JButtons. I get a NullPointerException when I try to add an Event to any given JButton (even ones that...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.