PocketPC and SWT - how to get started - bad major version error [message #458672] |
Tue, 19 July 2005 00:59 |
Eclipse User |
|
|
|
Originally posted by: jm1.dicehome.com
I'd like to experiment with writing swt apps on my pocketPC. I've seen
the article on a little cup of swt, but it does not talk about exactly
what is needed to run any java app on pocketPC.
I think I need J9 and the swt.jar, but when I run my hello world app I
get "bad major version at offset = 6"
this seems to me like I have the wrong version of something or my code
is not compiled properly. I am using Eclipse and jdk1.5.0_03. Am I
supposed to compile with a different jdk?
Thanks for any help.
Chip
|
|
|
Re: PocketPC and SWT - how to get started - bad major version error [message #458679 is a reply to message #458672] |
Tue, 19 July 2005 07:02 |
Eclipse User |
|
|
|
Originally posted by: ""t.s.maedert.s.maeder\"..hispeedhispeed.chch"
cdx11356 wrote:
> I'd like to experiment with writing swt apps on my pocketPC. I've seen
> the article on a little cup of swt, but it does not talk about exactly
> what is needed to run any java app on pocketPC.
>
> I think I need J9 and the swt.jar, but when I run my hello world app I
> get "bad major version at offset = 6"
>
> this seems to me like I have the wrong version of something or my code
> is not compiled properly. I am using Eclipse and jdk1.5.0_03. Am I
> supposed to compile with a different jdk?
>
> Thanks for any help.
> Chip
Try compiling with "Compiler Compliance" set to 1.4.
Thomas
|
|
|
Re: PocketPC and SWT - how to get started - bad major version error [message #458720 is a reply to message #458679] |
Wed, 20 July 2005 00:49 |
Eclipse User |
|
|
|
Originally posted by: jm1.dicehome.com
Thomas,
Thanks for your input. I got past that error only to run into
"NoClassDefFoundError". I've included my code below.
Thanks for any input,
Chip
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
public class HelloSWT {
public static void main(String[] args) {
Display display = new Display();
Shell shell = new Shell(display, SWT.CLOSE);
shell.setText("Main");
Label l = new Label(shell, 0);
l.setText("Hello, World");
l.setBounds(shell.getClientArea());
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch())
display.sleep();
}
display.dispose();
}}
Thomas Mäder > wrote:
> cdx11356 wrote:
>
>> I'd like to experiment with writing swt apps on my pocketPC. I've seen
>> the article on a little cup of swt, but it does not talk about exactly
>> what is needed to run any java app on pocketPC.
>>
>> I think I need J9 and the swt.jar, but when I run my hello world app I
>> get "bad major version at offset = 6"
>>
>> this seems to me like I have the wrong version of something or my code
>> is not compiled properly. I am using Eclipse and jdk1.5.0_03. Am I
>> supposed to compile with a different jdk?
>>
>> Thanks for any help.
>> Chip
>
>
> Try compiling with "Compiler Compliance" set to 1.4.
>
> Thomas
|
|
|
|
Re: PocketPC and SWT - how to get started - bad major version error [message #458779 is a reply to message #458738] |
Thu, 21 July 2005 00:24 |
Eclipse User |
|
|
|
Originally posted by: jm1.dicehome.com
This is all I get. I do not know what Class it is referring to
Exception in thread "main" java.lang.NoClassDefFoundError
at java.lang.ClassLoader.defineClassImpl(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.findClassImpl(Unknown Source)
at java.net.URLClassLoader$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Unknown Source)
at java.net.URLClassLoader.findClass(Unknown Source)
at com.ibm.oti.vm.URLSystemClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at com.ibm.oti.vm.URLSystemClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Veronika Irvine wrote:
> Can you give the full error? What class was not found?
>
> "cdx11356" <jm1@dicehome.com> wrote in message
> news:dbk6uq$4c4$1@news.eclipse.org...
>
>>Thomas,
>>Thanks for your input. I got past that error only to run into
>>"NoClassDefFoundError". I've included my code below.
>>
>>Thanks for any input,
>>Chip
>>
>>import org.eclipse.swt.SWT;
>>import org.eclipse.swt.widgets.Display;
>>import org.eclipse.swt.widgets.Label;
>>import org.eclipse.swt.widgets.Shell;
>>
>>public class HelloSWT {
>>
>>public static void main(String[] args) {
>>
>>Display display = new Display();
>>Shell shell = new Shell(display, SWT.CLOSE);
>>shell.setText("Main");
>>Label l = new Label(shell, 0);
>>l.setText("Hello, World");
>>l.setBounds(shell.getClientArea());
>>shell.open();
>> while (!shell.isDisposed()) {
>> if (!display.readAndDispatch())
>> display.sleep();
>> }
>> display.dispose();
>>
>>}}
>>
>>
>>
>>
>>
>>
>>
>>Thomas Mäder > wrote:
>>
>>>cdx11356 wrote:
>>>
>>>
>>>>I'd like to experiment with writing swt apps on my pocketPC. I've seen
>>>>the article on a little cup of swt, but it does not talk about exactly
>>>>what is needed to run any java app on pocketPC.
>>>>
>>>>I think I need J9 and the swt.jar, but when I run my hello world app I
>>>>get "bad major version at offset = 6"
>>>>
>>>>this seems to me like I have the wrong version of something or my code
>>>>is not compiled properly. I am using Eclipse and jdk1.5.0_03. Am I
>>>>supposed to compile with a different jdk?
>>>>
>>>>Thanks for any help.
>>>>Chip
>>>
>>>
>>>Try compiling with "Compiler Compliance" set to 1.4.
>>>
>>>Thomas
>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.04120 seconds