I have been trying to build jstock on mac OS X 10.4, but I run into problems installing java 1.6 (I have had to use soylatte) and also jdic, which I cannot get to install at all. please could you list which versions of these wares that you use to install on mac os x?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
well, netbeans allowed jdic to work, even though it is not needed. however, even after rebuilding, jstock still complains of:
X-2:~/Desktop/jstock/dist $ java -jar jstock.jar
Exception in thread "main" java.lang.NoClassDefFoundError: org/jdesktop/swingx/JXStatusBar
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$000(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.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
...and now I'm really confused, as I thought jdic was based on swingx. ...?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
OK. Let's us track down the problem together. First, could you answer me the following questions?
(1) What version of java runtime and JDK are you using now?
(2) During compilation and execution, can you make sure your classpath doesn't point to other SwingX other than the one delivered from jstock-ext
( http://downloads.sourceforge.net/jstock/jstock-1.0.2-ext.zip?use_mirror= ) jstock 1.2 source must build couple with jstock-ext 1.2 external library.
(3) Can you compile successfully within netbeans?
(4) Can you run successfully within netbeans?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
some progress since my last post; I downloaded and installed javabeans using a dmg installer file. however, it compiled before i did this, so I'm guessing it was already installed.
I removed the jstock-ext directory and attempted to recompile, but ant complained that the classes supplied there did not exist, so it is obviously using the jar files there to compile. however, the program still complained the swingx libraries were not there when I tried to run on the command line in the jstock/dist directory.
Given this, I downloaded swingx and compiled this separately, placing the swingx.jar file into jre/lib/ext
The sample program you posted compiles and runs with the output:
X-2:~/Desktop/javatest $ java Main
org.jdesktop.swingx.JXStatusBar[,0,0,0x0,invalid,layout=org.jdesktop.swingx.plaf.basic.BasicStatusBarUI$1,alignmentX=0.0,alignmentY=0.0,border=javax.swing.plaf.BorderUIResource@1df8b99,flags=16777224,maximumSize=,minimumSize=,preferredSize=]
... and the jstock program runs until it finds the next library absent, xstream. again, placing the xstream.jar file into the jre/lib/ext directory removed this complaint for it to move onto not being able to find apache.commons.logging
so when the jar files are in the /jre/lib/ext directory, the program does not complain, but I do not want to put them all there so that different java programs could use different versions of the libraries.
I am told CLASSPATH is not used in macs, but I did a few tests anyway:
X-2:~/Desktop/jstocknewest/jstock/dist $ java -jar jstock.jar
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at org.yccheok.jstock.gui.MainFrame.<clinit>(MainFrame.java:2904)
X-2:~/Desktop/jstocknewest/jstock/dist $ java -classpath ../../jstock-ext/ -jar jstock.jar
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at org.yccheok.jstock.gui.MainFrame.<clinit>(MainFrame.java:2904)
X-2:~/Desktop/jstocknewest/jstock/dist $ export CLASSPATH=../../jstock-ext/
X-2:~/Desktop/jstocknewest/jstock/dist $ echo $CLASSPATH
../../jstock-ext/
X-2:~/Desktop/jstocknewest/jstock/dist $ java -classpath ../../jstock-ext/ -jar jstock.jar
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at org.yccheok.jstock.gui.MainFrame.<clinit>(MainFrame.java:2904)
X-2:~/Desktop/jstocknewest/jstock/dist $
Is there a way to get the program to use the jar files without them having to be in /jre/lib/ext/ ?
I'm using soylatte, a bsd port of java 1.6 for mac os x 10.4 because I don't think an official version of java 1.6 exists for the operating system. It can be found at : http://landonf.bikemonkey.org/static/soylatte/ . I'm using the 32-bit JDK for Mac OS X 10.4 and 10.5.
Again, many thanks for your effort in helping me!!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Are you interested in becoming JStock tester, for Mac OS X? The role is basically to test run JStock whenever there is a new release being planned, to make sure JStock is performing as what it should be. We will be using Windows's as our golden benchmark.
Whenever a problem is encountered, the tester will report the issue to developer (That's me), or tester may try to fix it if he is familiar with coding.
Let me know if you are interested ;)
Thanks!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I understand that not having a mac will make it tricky for you to help me; is there anyone who has successfully installed this that I can communicate with?
the code does not compile under 1.5, even if I hack the make files to accept the 1.5 version. It compiles after using soylatte which implements java 1.6. I am in the process of downloading the latest netbeans just to make sure I'm up to date.
Once built with Ant, jstock reports:
X-2:~/Desktop/jstock/dist $ java -jar jstock.jar
Exception in thread "main" java.lang.NoClassDefFoundError: org/jdesktop/swingx/JXStatusBar
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$000(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.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
I thought JXStatusBar was part of JDIC, but I guess it is just part of swingx. I'm having problems getting on to the swinglabs website at the moment. When I do, could you suggest which versions I should install?
Thanks for the very prompt response!!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I understand that not having a mac will make it tricky for you to help me; is there anyone who has successfully installed this that I can communicate with?
the code does not compile under 1.5, even if I hack the make files to accept the 1.5 version. It compiles after using soylatte which implements java 1.6. I am in the process of downloading the latest netbeans just to make sure I'm up to date.
Once built with Ant, jstock reports:
X-2:~/Desktop/jstock/dist $ java -jar jstock.jar
Exception in thread "main" java.lang.NoClassDefFoundError: org/jdesktop/swingx/JXStatusBar
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$000(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.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
I thought JXStatusBar was part of JDIC, but I guess it is just part of swingx. I'm having problems getting on to the swinglabs website at the moment. When I do, could you suggest which versions I should install?
Thanks for the very prompt response!!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
One more stuff, to ensure swingx-0.9.2.jar can be execute in your environement, can you try to compile and run the following source code under netbeans? Please do let me know the outcome. Thanks!
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package test;
/**
*
* @author yancheng
*/
public class Main {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
org.jdesktop.swingx.JXStatusBar statusBar = new org.jdesktop.swingx.JXStatusBar();
org.jdesktop.swingx.JXStatusBar.Constraint c1 = new org.jdesktop.swingx.JXStatusBar.Constraint(org.jdesktop.swingx.JXStatusBar.Constraint.ResizeBehavior.FILL);
System.out.println(statusBar);
}
}
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
"Java is pre-installed on osx , you should NOT need to install extra copies of the JVM."
please note that the problem in hand was not to do with java not being installed. it was to do with a specific version of java (1.6, or just 6) not being installed on a specific version of OSX (10.4 or Tiger) for compilation purposes.
please refer to this webpage for OSX support for java versions:
I have been trying to build jstock on mac OS X 10.4, but I run into problems installing java 1.6 (I have had to use soylatte) and also jdic, which I cannot get to install at all. please could you list which versions of these wares that you use to install on mac os x?
I never try on Mac OS X before, as I do not own one.
Please refer to the following articles, on how to setup Java 1.6 JDK environment and Netbeans 6.5 in Mac OS X.
Also, JStock does not require jdic at all.
http://developer.apple.com/java/
http://www.netbeans.org/kb/articles/mac.html
Do let me know if you have any positive outcome.
If you still run into any problem in setup the Java environment, please refer to http://forums.sun.com/index.jspa
Thanks!
Cheok
hi, I'm sorry i posted a response, but by mistake I responded to myself rather than you. And then did it again..
well, netbeans allowed jdic to work, even though it is not needed. however, even after rebuilding, jstock still complains of:
X-2:~/Desktop/jstock/dist $ java -jar jstock.jar
Exception in thread "main" java.lang.NoClassDefFoundError: org/jdesktop/swingx/JXStatusBar
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$000(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.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
...and now I'm really confused, as I thought jdic was based on swingx. ...?
OK. Let's us track down the problem together. First, could you answer me the following questions?
(1) What version of java runtime and JDK are you using now?
(2) During compilation and execution, can you make sure your classpath doesn't point to other SwingX other than the one delivered from jstock-ext
( http://downloads.sourceforge.net/jstock/jstock-1.0.2-ext.zip?use_mirror= ) jstock 1.2 source must build couple with jstock-ext 1.2 external library.
(3) Can you compile successfully within netbeans?
(4) Can you run successfully within netbeans?
Hi,
some progress since my last post; I downloaded and installed javabeans using a dmg installer file. however, it compiled before i did this, so I'm guessing it was already installed.
I removed the jstock-ext directory and attempted to recompile, but ant complained that the classes supplied there did not exist, so it is obviously using the jar files there to compile. however, the program still complained the swingx libraries were not there when I tried to run on the command line in the jstock/dist directory.
Given this, I downloaded swingx and compiled this separately, placing the swingx.jar file into jre/lib/ext
The sample program you posted compiles and runs with the output:
X-2:~/Desktop/javatest $ java Main
org.jdesktop.swingx.JXStatusBar[,0,0,0x0,invalid,layout=org.jdesktop.swingx.plaf.basic.BasicStatusBarUI$1,alignmentX=0.0,alignmentY=0.0,border=javax.swing.plaf.BorderUIResource@1df8b99,flags=16777224,maximumSize=,minimumSize=,preferredSize=]
... and the jstock program runs until it finds the next library absent, xstream. again, placing the xstream.jar file into the jre/lib/ext directory removed this complaint for it to move onto not being able to find apache.commons.logging
so when the jar files are in the /jre/lib/ext directory, the program does not complain, but I do not want to put them all there so that different java programs could use different versions of the libraries.
I am told CLASSPATH is not used in macs, but I did a few tests anyway:
X-2:~/Desktop/jstocknewest/jstock/dist $ java -jar jstock.jar
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at org.yccheok.jstock.gui.MainFrame.<clinit>(MainFrame.java:2904)
X-2:~/Desktop/jstocknewest/jstock/dist $ java -classpath ../../jstock-ext/ -jar jstock.jar
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at org.yccheok.jstock.gui.MainFrame.<clinit>(MainFrame.java:2904)
X-2:~/Desktop/jstocknewest/jstock/dist $ export CLASSPATH=../../jstock-ext/
X-2:~/Desktop/jstocknewest/jstock/dist $ echo $CLASSPATH
../../jstock-ext/
X-2:~/Desktop/jstocknewest/jstock/dist $ java -classpath ../../jstock-ext/ -jar jstock.jar
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at org.yccheok.jstock.gui.MainFrame.<clinit>(MainFrame.java:2904)
X-2:~/Desktop/jstocknewest/jstock/dist $
Is there a way to get the program to use the jar files without them having to be in /jre/lib/ext/ ?
I'm using soylatte, a bsd port of java 1.6 for mac os x 10.4 because I don't think an official version of java 1.6 exists for the operating system. It can be found at : http://landonf.bikemonkey.org/static/soylatte/ . I'm using the 32-bit JDK for Mac OS X 10.4 and 10.5.
Again, many thanks for your effort in helping me!!
Hi,
I found this page:
http://bytes.com/topic/java/answers/841331-exception-thread-main-java-lang-noclassdeffounderror
and consequently added the following line to the manifest.mf file:
Class-Path: ../../jstock-ext/commons-logging-1.1.jar ../../jstock-ext/JHotDraw7.jar ../../jstock-ext/jfreechart-1.0.5.jar ../../jstock-ext/stax-api-1.0.1.jar ../../jstock-ext/cglib-nodep-2.1_3.jar ../../jstock-ext/jh.jar ../../jstock-ext/swing-layout-1.0.jar ../../jstock-ext/commons-codec-1.3.jar ../../jstock-ext/joda-time-1.2.1.jar ../../jstock-ext/swingx-0.9.2.jar ../../jstock-ext/commons-httpclient-3.1-rc1.jar ../../jstock-ext/jstockhelp.jar ../../jstock-ext/xml-writer-0.2.jar ../../jstock-ext/commons-logging-1.1.jar ../../jstock-ext/l2fprod-common-all.jar ../../jstock-ext/xom-1.1.jar ../../jstock-ext/commons-net-1.4.1.jar ../../jstock-ext/mail.jar ../../jstock-ext/xpp3_min-1.1.3.4.O.jar ../../jstock-ext/dom4j-1.6.1.jar ../../jstock-ext/nachocalendar-0.23-demo.jar ../../jstock-ext/xstream-1.2.1.jar ../../jstock-ext/forms-1.1.0.jar ../../jstock-ext/nachocalendar-0.23.jar ../../jstock-ext/xstream-benchmark-1.2.1.jar ../../jstock-ext/jcommon-1.0.9.jar ../../jstock-ext/poi-3.0.1-FINAL-20070705.jar ../../jstock-ext/jdom-1.0.jar ../../jstock-ext/stax-1.2.0.jar ../../jstock-ext/jasypt-1.5/lib/commons-codec-1.1.jar ../../jstock-ext/jasypt-1.5/lib/jasypt-1.5.jar ../../jstock-ext/jasypt-1.5/lib/commons-lang-2.1.jar ../../jstock-ext/smack_3_1_0/smack.jar ../../jstock-ext/smack_3_1_0/smackx-jingle.jar ../../jstock-ext/smack_3_1_0/smackx-debug.jar ../../jstock-ext/smack_3_1_0/smackx.jar
I re-compiled, and now it works! Thanks very much for your time!!
Great to hear that you had solved your problem ;)
Are you interested in becoming JStock tester, for Mac OS X? The role is basically to test run JStock whenever there is a new release being planned, to make sure JStock is performing as what it should be. We will be using Windows's as our golden benchmark.
Whenever a problem is encountered, the tester will report the issue to developer (That's me), or tester may try to fix it if he is familiar with coding.
Let me know if you are interested ;)
Thanks!
Hi,
I understand that not having a mac will make it tricky for you to help me; is there anyone who has successfully installed this that I can communicate with?
I think the link you gave for the java install is for java 1.5 - I don't think there is a java 1.6 for mac, apart from this guy:
http://landonf.bikemonkey.org/static/soylatte/
the code does not compile under 1.5, even if I hack the make files to accept the 1.5 version. It compiles after using soylatte which implements java 1.6. I am in the process of downloading the latest netbeans just to make sure I'm up to date.
Once built with Ant, jstock reports:
X-2:~/Desktop/jstock/dist $ java -jar jstock.jar
Exception in thread "main" java.lang.NoClassDefFoundError: org/jdesktop/swingx/JXStatusBar
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$000(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.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
I thought JXStatusBar was part of JDIC, but I guess it is just part of swingx. I'm having problems getting on to the swinglabs website at the moment. When I do, could you suggest which versions I should install?
Thanks for the very prompt response!!
Hi,
I understand that not having a mac will make it tricky for you to help me; is there anyone who has successfully installed this that I can communicate with?
I think the link you gave for the java install is for java 1.5 - I don't think there is a java 1.6 for mac, apart from this guy:
http://landonf.bikemonkey.org/static/soylatte/
the code does not compile under 1.5, even if I hack the make files to accept the 1.5 version. It compiles after using soylatte which implements java 1.6. I am in the process of downloading the latest netbeans just to make sure I'm up to date.
Once built with Ant, jstock reports:
X-2:~/Desktop/jstock/dist $ java -jar jstock.jar
Exception in thread "main" java.lang.NoClassDefFoundError: org/jdesktop/swingx/JXStatusBar
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$000(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.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
I thought JXStatusBar was part of JDIC, but I guess it is just part of swingx. I'm having problems getting on to the swinglabs website at the moment. When I do, could you suggest which versions I should install?
Thanks for the very prompt response!!
One more stuff, to ensure swingx-0.9.2.jar can be execute in your environement, can you try to compile and run the following source code under netbeans? Please do let me know the outcome. Thanks!
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package test;
/**
*
* @author yancheng
*/
public class Main {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
org.jdesktop.swingx.JXStatusBar statusBar = new org.jdesktop.swingx.JXStatusBar();
org.jdesktop.swingx.JXStatusBar.Constraint c1 = new org.jdesktop.swingx.JXStatusBar.Constraint(org.jdesktop.swingx.JXStatusBar.Constraint.ResizeBehavior.FILL);
System.out.println(statusBar);
}
}
it seems fine on osx......
the only issue is this:
./jstock.sh
Warning: /bin/java does not exist
but the program executes fine , even if you double click on the jstock.jar
Java is pre-installed on osx , you should NOT need to install extra copies of the JVM.
"Java is pre-installed on osx , you should NOT need to install extra copies of the JVM."
please note that the problem in hand was not to do with java not being installed. it was to do with a specific version of java (1.6, or just 6) not being installed on a specific version of OSX (10.4 or Tiger) for compilation purposes.
please refer to this webpage for OSX support for java versions:
http://developer.apple.com/mac/library/technotes/tn2002/tn2110.html