Skip to main content

Running HelloWorldMain

28 replies [Last post]
faslam
Offline
Joined: 2008-01-19

Dear all,

Based on the README.txt in the squawk\tests folder I tried to compile HelloWorldMain. However, it has not worked. I am using window XP.
I have followed all the instruction of installing squawk on windows and I think I have correct installation. Following is the error any clues?

F:\squawk>d user-suite tests/HelloWorldMain
Launcher: Found tools.jar in C:\Programme\Java\jdk1.5.0_18\lib\tools.jar, by pop
ping up a level from jre.
Builder.JDK: Looking for JDK in C:\Programme\Java\jdk1.5.0_18, popped up a level
from jre
Launcher: Found tools.jar in C:\Programme\Java\jdk1.5.0_18\lib\tools.jar, by pop
ping up a level from jre.
For vm2c tools.jar=C:\Programme\Java\jdk1.5.0_18\lib\tools.jar
[running user-suite...]
[compiling user project at tests/HelloWorldMain...]
linking user project at tests/HelloWorldMain
build failed: error invoking public static void com.sun.squawk.Romizer.main(java
.lang.String[]) throws java.io.IOException
caused by: java.lang.RuntimeException: java.lang.RuntimeException: javax.microed
ition.io.ConnectionNotFoundException: //squawk.suite;pathelement=F:\squawk:F:\sq
uawk\tests\HelloWorldMain
at com.sun.squawk.Romizer.run(Romizer.java:428)
at com.sun.squawk.Romizer.main(Romizer.java:338)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.squawk.builder.Build.java(Build.java:2336)
at com.sun.squawk.builder.JavaCommand.run(JavaCommand.java:71)
at com.sun.squawk.builder.Build$10.run(Build.java:928)
at com.sun.squawk.builder.Build.run(Build.java:1021)
at com.sun.squawk.builder.Build.runCommand(Build.java:986)
at com.sun.squawk.builder.Build.mainProgrammatic(Build.java:1506)
at com.sun.squawk.builder.Build.main(Build.java:1470)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.squawk.builder.launcher.Launcher.main(Launcher.java:58)
Caused by: java.lang.RuntimeException: javax.microedition.io.ConnectionNotFoundE
xception: //squawk.suite;pathelement=F:\squawk:F:\squawk\tests\HelloWorldMain
at com.sun.squawk.Romizer.processSuiteArgs(Romizer.java:541)
at com.sun.squawk.Romizer.run(Romizer.java:372)
... 17 more
Caused by: javax.microedition.io.ConnectionNotFoundException: //squawk.suite;pat
helement=F:\squawk:F:\squawk\tests\HelloWorldMain
at com.sun.squawk.io.j2se.file.Protocol.open(Protocol.java:141)
at javax.microedition.io.Connector.openPrim(Connector.java:310)
at javax.microedition.io.Connector.open(Connector.java:236)
at javax.microedition.io.Connector.open(Connector.java:198)
at javax.microedition.io.Connector.openDataInputStream(Connector.java:37
7)
at com.sun.squawk.ObjectMemoryLoader.load(ObjectMemoryLoader.java:196)
at com.sun.squawk.ObjectGraphLoader.loadSuite(ObjectGraphLoader.java:264
)
at com.sun.squawk.Romizer.processSuiteArgs(Romizer.java:539)
... 18 more

Message was edited by: faslam

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
ningning12394
Offline
Joined: 2009-12-27

hi there,

I have the same problem as you.

Did you get it to work?

Thanks,

Ning

ningning12394
Offline
Joined: 2009-12-27

Hi there,

I have the same problem as Jayce. Could you please let me know how to get it to work?

Thanks in advance,

Ning

eric_arseneau
Offline
Joined: 2004-07-15

Sorry but we are on break, so taking even longer than usual.

Which branch are you using?

Can you provide commands and output so we can see what your error is.

ningning12394
Offline
Joined: 2009-12-27

Thanks for your reply.

I am using the file from https://squawk.dev.java.net/svn/squawk/trunk and the jdk1.6.

My commands are as follows:

d.bat jvmenv
d.bat copyphoneme
d.bat
d.bat -prod -mac -o2 rom cldc
d user-suite tests/HelloWorld

and then I got the same 18more error as the author.

I have tried the commands you provided above, but the error is still there,

Can you please tell me how to get it to work?

Thanks a mil,

Ning

eric_arseneau
Offline
Joined: 2004-07-15

Ok, found the source of the problem. The actual error is that it cannot find the metadata suite

Caused by: com.sun.squawk.util.UnexpectedException: Unable to find metadata suite: file://squawk.suite.metadata:class javax.microedition.io.ConnectionNotFoundException://squawk.suite.metadata;pathelement=/Users/ea149956/squawk/trunk;pathelement=/Users/ea149956/squawk/trunk/tests/HelloWorld

So it looks like there is a hole in the instructions. Add -metadata to the
d -prod -mac -02 rom -metadata cldc

In fact I would keep it simpler than that even
d rom -metadata cldc

Then do the d user-suite tests/HelloWorld

Note, there is no need to do "d copyphoneme" anymore.

eric_arseneau
Offline
Joined: 2004-07-15

Ok, after a direct Skype session. It looks like there is a bug on Windows will look into it when we are done with kickoff for FRC.

tcolakov
Offline
Joined: 2009-06-29

Hi,

I was getting similar error like two guys:

com.sun.squawk.util.UnexpectedException: Unable to find metadata suite: file://squawk.suite.metadata
at com.sun.squawk.ObjectGraphLoader.loadSuite(ObjectGraphLoader.java:313)
at com.sun.squawk.Romizer.processSuiteArgs(Romizer.java:546)
at com.sun.squawk.Romizer.run(Romizer.java:378)
at com.sun.squawk.Romizer.main(Romizer.java:348)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.squawk.builder.Build.java(Build.java:3055)
at com.sun.squawk.builder.JavaCommand.run(JavaCommand.java:71)
at com.sun.squawk.builder.commands.LinkTarget.run(LinkTarget.java:154)
at com.sun.squawk.builder.Build$UserCommand.run(Build.java:1221)
at com.sun.squawk.builder.Build.run(Build.java:1656)
at com.sun.squawk.builder.Build.runCommand(Build.java:1612)
at com.sun.squawk.builder.Build.mainProgrammatic(Build.java:2154)
at com.sun.squawk.builder.Build.main(Build.java:2114)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.squawk.builder.launcher.Launcher.main(Launcher.java:58)

Caused by:
javax.microedition.io.ConnectionNotFoundException: //squawk.suite.metadata;pathelement=.;pathelement=simulator/squawk/Test
at com.sun.squawk.io.j2se.file.Protocol.open(Protocol.java:141)
at javax.microedition.io.Connector.openPrim(Connector.java:308)
at javax.microedition.io.Connector.open(Connector.java:234)
at javax.microedition.io.Connector.open(Connector.java:195)
at javax.microedition.io.Connector.openDataInputStream(Connector.java:340)
at com.sun.squawk.ObjectMemoryLoader.load(ObjectMemoryLoader.java:196)
at com.sun.squawk.ObjectGraphLoader.loadSuite(ObjectGraphLoader.java:302)
at com.sun.squawk.Romizer.processSuiteArgs(Romizer.java:546)
at com.sun.squawk.Romizer.run(Romizer.java:378)
at com.sun.squawk.Romizer.main(Romizer.java:348)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.squawk.builder.Build.java(Build.java:3055)
at com.sun.squawk.builder.JavaCommand.run(JavaCommand.java:71)
at com.sun.squawk.builder.commands.LinkTarget.run(LinkTarget.java:154)
at com.sun.squawk.builder.Build$UserCommand.run(Build.java:1221)
at com.sun.squawk.builder.Build.run(Build.java:1656)
at com.sun.squawk.builder.Build.runCommand(Build.java:1612)
at com.sun.squawk.builder.Build.mainProgrammatic(Build.java:2154)
at com.sun.squawk.builder.Build.main(Build.java:2114)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.squawk.builder.launcher.Launcher.main(Launcher.java:58)
Exception while running command user-suite
build failed: error invoking public static void com.sun.squawk.Romizer.main(java.lang.String[]) throws java.io.IOException
caused by: java.lang.RuntimeException: com.sun.squawk.util.UnexpectedException: Unable to find metadata suite: file://squawk.suite.metadata
at com.sun.squawk.Romizer.run(Romizer.java:435)
at com.sun.squawk.Romizer.main(Romizer.java:348)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.squawk.builder.Build.java(Build.java:3055)
at com.sun.squawk.builder.JavaCommand.run(JavaCommand.java:71)
at com.sun.squawk.builder.commands.LinkTarget.run(LinkTarget.java:154)
at com.sun.squawk.builder.Build$UserCommand.run(Build.java:1221)
at com.sun.squawk.builder.Build.run(Build.java:1656)
at com.sun.squawk.builder.Build.runCommand(Build.java:1612)
at com.sun.squawk.builder.Build.mainProgrammatic(Build.java:2154)
at com.sun.squawk.builder.Build.main(Build.java:2114)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.squawk.builder.launcher.Launcher.main(Launcher.java:58)
Caused by: com.sun.squawk.util.UnexpectedException: Unable to find metadata suite: file://squawk.suite.metadata
at com.sun.squawk.ObjectGraphLoader.loadSuite(ObjectGraphLoader.java:313)
at com.sun.squawk.Romizer.processSuiteArgs(Romizer.java:546)
at com.sun.squawk.Romizer.run(Romizer.java:378)
... 18 more

I tried everything written in this thread w/o success. Then in other thread I've found switch -metadata (it was the thread with build shell script), I've run this command:
./d.sh -prod -mac -o2 rom -metadata cldc imp

and then the user-suite command started to work as by magic. I'm using squawk-native on debian with java 1.5.09.
Hope it helps
Todor

williamglanville
Offline
Joined: 2008-06-09

Hi there

I am having this problem as well. squawk.suite is present and passes "squawk.exe com.sun.squawk.Test"

Thank you for any guidance.

Here is a snippet of the output.

D:\devSquawk>d user-suite tests/HelloWorld
Launcher: Found tools.jar in C:\jdk1.5.0_08\lib\tools.jar, by popping up a level from jre.
Builder.JDK: Looking for JDK in C:\jdk1.5.0_08, popped up a level from jre
Launcher: Found tools.jar in C:\jdk1.5.0_08\lib\tools.jar, by popping up a level from jre.
For vm2c tools.jar=C:\jdk1.5.0_08\lib\tools.jar
[running user-suite...]
[compiling user project at tests/HelloWorld...]
linking user project at tests/HelloWorld
build failed: error invoking public static void com.sun.squawk.Romizer.main(java.lang.String[]) throws java.io.IOException
caused by: java.lang.RuntimeException: java.lang.RuntimeException: javax.microedition.io.ConnectionNotFoundException: //squawk.suite;pathelement=D:\devSquawk:D:\devSquawk\test
s\HelloWorld

eric_arseneau
Offline
Joined: 2004-07-15

Not very helpful error message, but here is what I see here.

It looks like the suite builder is unable to find squawk.suite, which is the parent/bootstrap suite for your application.

This likely means you have not built squawk yet.

so try this
d rom cldc imp

Which will build a Squawk exe, squawk.suite, squawk.suite.metadata and other stuff.

Then do the d user-suite.

Let me know how that goes.

williamglanville
Offline
Joined: 2008-06-09

Hi Eric

Squawk exe, squawk.suite, squawk.suite.metadata etc. are all built and present.

I suspect that there might be some path missing or incorrectly set in my environment.

I use the following to prepare the environment.

SET PATH=C:\jdk1.5.0_08\bin;d:\devSquawk;%PATH%
SET JVMDLL=C:\jdk1.5.0_08\jre\bin\client\jvm.dll
SET JAVA_HOME=C:\jdk1.5.0_08
SET JRE_HOME=C:\jdk1.5.0_08\jre

Should there be anything else ?

Thank you for taking the time to respond.

eric_arseneau
Offline
Joined: 2004-07-15

Did you get it to work?

Sorry about that but Java One sucked up all the CPU I had :)

jayce_nqq
Offline
Joined: 2009-06-18

Dear:
Have you solved the problem?
I met the same problem when I compiled HelloWorld. I try the fowlling
d jvmenv
d copyphoneme
d
d rom cldc imp
but the problem is still. Do you solve this problem? If do, please tell me. Thank you very much!

nomarior
Offline
Joined: 2009-06-15

Has there been an error during squawk compilation? And what's the error message when you try to create the suite?

I was able to compile squawk and run all 3 tests on a x86 machine running opensolaris with jdk 1.5.

jayce_nqq
Offline
Joined: 2009-06-18

The compilation is OK.
But when I do the fowlling operation, there is error!
D:\squawk>d user-suite tests/HelloWorld
Launcher: Found tools.jar in C:\Java\jdk1.5.0_16\lib\tools.jar, by popping up a
level from jre.
Builder.JDK: Looking for JDK in C:\Java\jdk1.5.0_16, popped up a level from jre
Launcher: Found tools.jar in C:\Java\jdk1.5.0_16\lib\tools.jar, by popping up a
level from jre.
For vm2c tools.jar=C:\Java\jdk1.5.0_16\lib\tools.jar
[running user-suite...]
[compiling user project at tests/HelloWorld...]
linking user project at tests/HelloWorld
build failed: error invoking public static void com.sun.squawk.Romizer.main(java
.lang.String[]) throws java.io.IOException
caused by: java.lang.RuntimeException: java.lang.RuntimeException: javax.microed
ition.io.ConnectionNotFoundException: //squawk.suite;pathelement=D:\squawk:D:\sq
uawk\tests\HelloWorld
at com.sun.squawk.Romizer.run(Romizer.java:428)
at com.sun.squawk.Romizer.main(Romizer.java:338)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.squawk.builder.Build.java(Build.java:2361)
at com.sun.squawk.builder.JavaCommand.run(JavaCommand.java:71)
at com.sun.squawk.builder.Build$10.run(Build.java:928)
at com.sun.squawk.builder.Build.run(Build.java:1021)
at com.sun.squawk.builder.Build.runCommand(Build.java:986)
at com.sun.squawk.builder.Build.mainProgrammatic(Build.java:1514)
at com.sun.squawk.builder.Build.main(Build.java:1478)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.squawk.builder.launcher.Launcher.main(Launcher.java:58)
Caused by: java.lang.RuntimeException: javax.microedition.io.ConnectionNotFoundE
xception: //squawk.suite;pathelement=D:\squawk:D:\squawk\tests\HelloWorld
at com.sun.squawk.Romizer.processSuiteArgs(Romizer.java:541)
at com.sun.squawk.Romizer.run(Romizer.java:372)
... 17 more
Caused by: javax.microedition.io.ConnectionNotFoundException: //squawk.suite;pat
helement=D:\squawk:D:\squawk\tests\HelloWorld
at com.sun.squawk.io.j2se.file.Protocol.open(Protocol.java:141)
at javax.microedition.io.Connector.openPrim(Connector.java:310)
at javax.microedition.io.Connector.open(Connector.java:236)
at javax.microedition.io.Connector.open(Connector.java:198)
at javax.microedition.io.Connector.openDataInputStream(Connector.java:37
7)
at com.sun.squawk.ObjectMemoryLoader.load(ObjectMemoryLoader.java:196)
at com.sun.squawk.ObjectGraphLoader.loadSuite(ObjectGraphLoader.java:264
)
at com.sun.squawk.Romizer.processSuiteArgs(Romizer.java:539)
... 18 more

Thank you for taking the time to respond.
PS: can you give me your email? I am trying to read the source code of squawk, and during the work, I have many questions.

nomarior
Offline
Joined: 2009-06-15

Hi Jayce,

your problem seems to be the same as faslam's and williamglanville's. Unfortunately, there's no report whether Eric's tips helped or not. I am just starting to mess around with squawk, so I don't have any advice for you yet.

Cheers

derek_white
Offline
Joined: 2006-09-08

There are a couple of potential differences between the two of you:

- Are you using the trunk or branch/squawk-native branches from svn?

- Are you using Windows or some unix-like dev system (Mac/Solaris/Linux)?

If you can report back that would help. Thanks!

jayce_nqq
Offline
Joined: 2009-06-18

Hi, derek_white!
I am using the trunk from svn, and using Windows system. Do you know how to solve the problem?

eric_arseneau
Offline
Joined: 2004-07-15

I assume this is still a problem. This is a little weird, as its having class path issues.

What I can think of at this point is that you have Squawk cheked out on a path with spaces. This is a bug we have that we really need to fix, but has not happened yet :(

jayce_nqq
Offline
Joined: 2009-06-18

Dear,
My problem is still.
Today I change to use the squawk-native, and then the user-suite command starts to work. But when I try to run HelloWorld:squawk -

suite:tests/HelloWorld/HelloWorld, there has another problem:
D:\squawk\branches\squawk-native>squawk -suite:tests/HelloWorld/HelloWorld
calling setupMemory
Bootstrap suite loaded
In Startup
Looking for implementation class com.sun.squawk.platform.windows.Windows.natives
.LibCImpl
java.lang.RuntimeException: Can't find native symbol GetLastErrorA. OS Error: so
me error occurred
at java.lang.Throwable.(bci=16)
at java.lang.Throwable.(bci=5)
at java.lang.Exception.(bci=6)
at java.lang.RuntimeException.(bci=6)
at com.sun.cldc.jna.NativeLibrary.getFunction(bci=118)
at com.sun.cldc.jna.NativeLibrary.getFunction(bci=52)
at com.sun.squawk.platform.windows.natives.LibCImpl.(bci=15)
in virtual method #11 of com.sun.squawk.Klass(bci=53)
at java.lang.Class.newInstance(bci=89)
at com.sun.cldc.jna.Native.loadLibrary(bci=59)
at com.sun.squawk.platform.windows.natives.LibC.(bci=27)
in virtual method #109 of com.sun.squawk.Klass(bci=49)
in virtual method #106 of com.sun.squawk.Klass(bci=328)
in virtual method #36 of com.sun.squawk.Isolate(bci=13)
in static method #4 of com.sun.squawk.VM(bci=11)
at com.sun.squawk.platform.windows.GCFFileImpl.(bci=10)
in virtual method #11 of com.sun.squawk.Klass(bci=53)
in static method #1 of com.sun.squawk.platform.Platform(bci=40)
in static method #4 of com.sun.squawk.platform.Platform(bci=10)
in static method #3 of com.sun.squawk.io.j2me.file.Protocol(bci=6)
in virtual method #40 of com.sun.squawk.io.j2me.file.Protocol(bci=9)
in virtual method #42 of com.sun.squawk.io.j2me.file.Protocol(bci=20)
in virtual method #11 of com.sun.squawk.io.j2me.file.Protocol(bci=8)
at com.sun.squawk.io.ConnectionBaseAdapter.openDataInputStream(bci=8)
at javax.microedition.io.Connector.openDataInputStream(bci=38)
in static method #4 of com.sun.squawk.ObjectMemoryLoader(bci=54)
in static method #3 of com.sun.squawk.Suite(bci=16)
in static method #4 of com.sun.squawk.Suite(bci=6)
in virtual method #45 of com.sun.squawk.Isolate(bci=28)
at com.sun.squawk.Isolate.(bci=132)
at com.sun.squawk.Isolate.(bci=16)
at com.sun.squawk.JavaApplicationManager.main(bci=138)
in virtual method #95 of com.sun.squawk.Klass(bci=25)
at com.sun.squawk.Isolate.run(bci=411)
at java.lang.Thread.run(bci=17)
in virtual method #47 of com.sun.squawk.VMThread(bci=42)
in static method #3 of com.sun.squawk.VM(bci=6)
Error constructing Isolate based on suite: file://tests/HelloWorld/HelloWorld.su
ite and classpath: null
java.lang.Error: ExceptionInInitializer: com.sun.squawk.platform.windows.natives
.LibC:java.lang.RuntimeException: Can't find native symbol GetLastErrorA. OS Err
or: some error occurred

I'm using Windows system with jdk1.5.0_19. Is it the problem of os system?
Thank you!

eric_arseneau
Offline
Joined: 2004-07-15

Post the commands you used to build squawk and the bootstrap please.

jayce_nqq
Offline
Joined: 2009-06-18

squawk build
d:squawk>d -prod -mac -o2 rom -metadata cldc imp debugger

test build
d:squawk:>d user-suite tests/HelloWorld

derek_white
Offline
Joined: 2006-09-08

The "NATIVE" build for windows is not ready for prime time. In the file "build.properties", uncomment the line "#PLATFORM_TYPE=DELEGATING", and comment the nearby line talking about "NATIVE".

The do a clean, and rebuild.

markus_bruckner
Offline
Joined: 2009-06-03

hello,

i had the same problem and (think i) nailed it down to ObjectMemoryLoader.load. There is an if statements which concatenates url and filePathelements. After I disabled this, it worked(just prepended false && to the clause).

(ObjectMemoryLoader in Squawk-cldc, com.sun.squawk)

The exception is caused by Connector.openDataStream if an url of the form file://squawk.suite.metadata;pathelement=C:\Source\Java\squawk:C:\Source\Java\squawk\tests\Simple is passed to it. By disabling the if, just file://c:\source\java\squawk\squawk.suite is used and this works as parameter.

best regards,
Markus

Message was edited by: markus_bruckner

added the location of ObjectMemoryLoader

nomarior
Offline
Joined: 2009-06-15

Hello everyone,

I have also trouble getting the HelloWorldMain to run. Although, I seem to get a step further than faslam and williamglanville. I followed the description in README.txt and the tests HelloWorld and Simple run fine. But when I try to run HelloWorldMain I get an error:

me@opensolaris:~/s/squawk/squawk$ squawk -suite:tests/HelloWorldMain tests.HelloWorldMain
Error constructing Isolate based on suite: file://tests/HelloWorldMain.suite and classpath: null
java.lang.Error: IO error while loading suite from 'file://tests/HelloWorldMain.suite': javax.microedition.io.ConnectionNotFoundException

--------------------------------------------------------------------
Hits - Class:92.93% Monitor:89.63% Exit:100.00% New:94.98%
GCs: 0 full, 0 partial
** VM stopped: exit code = 999 **

Any ideas what went wrong?

Regards
Ramon

For completeness, here's the output of the previous commands. There was a warning while compiling squawk about a noreturn function that returned in gcc. But I don't see a connection to my problem. Maybe someone else does.

me@opensolaris:~/s/squawk/squawk$ ./d.sh && ./d.sh -prod -mac -o2 rom -metadata cldc imp debugger
Launcher: Found tools.jar in /usr/jdk/instances/jdk1.5.0/lib/tools.jar, by popping up a level from jre.
Builder.JDK: Looking for JDK in /usr/jdk/instances/jdk1.5.0, popped up a level from jre
Launcher: Found tools.jar in /usr/jdk/instances/jdk1.5.0/lib/tools.jar, by popping up a level from jre.
For vm2c tools.jar=/usr/jdk/instances/jdk1.5.0/lib/tools.jar
[building cldc...]
[building debugger...]
[building translator...]
[building hosted-support...]
[running squawk.jar...]
[building debugger-proxy...]
[building imp...]
[building javatest-device...]
[building mapper...]
[building romizer...]
[building ssl...]
[building vm2c...]
Total time: 1s
Launcher: Found tools.jar in /usr/jdk/instances/jdk1.5.0/lib/tools.jar, by popping up a level from jre.
Builder.JDK: Looking for JDK in /usr/jdk/instances/jdk1.5.0, popped up a level from jre
Launcher: Found tools.jar in /usr/jdk/instances/jdk1.5.0/lib/tools.jar, by popping up a level from jre.
For vm2c tools.jar=/usr/jdk/instances/jdk1.5.0/lib/tools.jar
[running rom...]
[running romize...]
Loaded suite stripping settings from squawk.library.properties
excluding: com.sun.squawk.compiler.*
excluding: com.sun.squawk.os.*
excluding: com.sun.squawk.BytecodeTracer
excluding: com.sun.squawk.CheneyCollector*
excluding: com.sun.squawk.Lisp2Collector*
excluding: com.sun.cldc.io.connections.HttpConnection
excluding: com.sun.squawk.ClassTunnel
[translating suite squawk [closed: false, parent: null] ...]
/export/home/ramon/s/squawk/squawk/vmcore/src/vm/rom.h is already up to date
Romizer processed 521 classes and generated these files:
/export/home/ramon/s/squawk/squawk/squawk.sym
/export/home/ramon/s/squawk/squawk/squawk.suite
/export/home/ramon/s/squawk/squawk/squawk.suite.metadata
/export/home/ramon/s/squawk/squawk/squawk_classes.jar
/export/home/ramon/s/squawk/squawk/squawk.suite.api
[compiling floating point sources in vmcore/src/vm/fp ...]
[compiling native verification sources in vmcore/src/vm/util ...]
[compiling 'vmcore/src/vm/squawk.c' ...]
vmcore/src/vm/util.h: In function `fatalVMError':
vmcore/src/vm/util.h:136: warning: `noreturn' function does return
[linking 'squawk' ...]
[running squawk.jar...]
Total time: 25s
###
# user-suite
###
me@openslaris:~/s/squawk/squawk$ ./d.sh user-suite tests/HelloWorldMain
Launcher: Found tools.jar in /usr/jdk/instances/jdk1.5.0/lib/tools.jar, by popping up a level from jre.
Builder.JDK: Looking for JDK in /usr/jdk/instances/jdk1.5.0, popped up a level from jre
Launcher: Found tools.jar in /usr/jdk/instances/jdk1.5.0/lib/tools.jar, by popping up a level from jre.
For vm2c tools.jar=/usr/jdk/instances/jdk1.5.0/lib/tools.jar
[running user-suite...]
[compiling user project at tests/HelloWorldMain...]
linking user project at tests/HelloWorldMain
[translating suite tests/HelloWorldMain/HelloWorldMain [closed: false, parent: squawk] ...]
Translator properties and current values:
translator.help=false
translator.optimizeConstantObjects=true
translator.deadMethodElimination=true
translator.deleteUnusedPrivateConstructors=true
translator.stats=false
translator.verbose=true
translator.deadStringElimination=true
[Translator: computing closure....132ms.]
[Translator: whole-suite optimizing and inlining...3ms.]
[Translator: phase2...[Loaded tests.HelloWorldMain]
24ms.]
[loaded object memory from 'file://tests/HelloWorldMain/HelloWorldMain.suite']
Romizer processed 1 classes and generated these files:
/export/home/ramon/s/squawk/squawk/tests/HelloWorldMain/HelloWorldMain.sym
/export/home/ramon/s/squawk/squawk/tests/HelloWorldMain/HelloWorldMain.suite
/export/home/ramon/s/squawk/squawk/tests/HelloWorldMain/HelloWorldMain.suite.metadata
/export/home/ramon/s/squawk/squawk/tests/HelloWorldMain/HelloWorldMain.suite.api
Total time: 1s

derek_white
Offline
Joined: 2006-09-08

This is just a path issue.

| Romizer processed 1 classes and generated these files:
| /export/home/ramon/s/squawk/squawk/tests/HelloWorldMain/HelloWorldMain.suite

So the command line should be something like:
squawk -suite:tests/HelloWorldMain/HelloWorldMain tests.HelloWorldMain

nomarior
Offline
Joined: 2009-06-15

Thank you for your fast reply. The solution was far easier than I had anticipated. And it works :-).

eric_arseneau
Offline
Joined: 2004-07-15

It looks like there is no squawk.suite. We usually have one randomly lying around since we build all the time.

Try this
d copyphoneme (Only needs to be done once, but making sure)
d
d rom cldc imp

Then do the user-suite

PS: Apologies it took so long, we are very busy doing a port and getting ready to make an announcement in the coming weeks.

faslam
Offline
Joined: 2008-01-19

Thank you.
I will try that.

Looking forward for your announcement.