gosu command prompt error,ClassNotFoundException, can you give me some pointers on how to resolve this issue?

357 views
Skip to first unread message

Suresh Anumolu

unread,
Oct 23, 2015, 1:54:27 PM10/23/15
to gosu-lang
Hi, Iam trying simple hello program with gosu command prompt option. I get the following error. I have added the gosu location system path and i have installed latest JAVA version. Can you please give me some pointers on how to fix this issue?

java -version
java version "1.8.0_65"

Java(TM) SE Runtime Environment (build 1.8.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.65-b01, mixed mode)

gosu C:\Work\Gosu\example-commandline-master\simple\HelloWorld.gsp
java.lang.ExceptionInInitializerError
        at gw.lang.reflect.TypeSystem.getCurrentModule(TypeSystem.java:656)
        at gw.lang.Gosu.setClasspath(Gosu.java:203)
        at gw.lang.Gosu.init(Gosu.java:270)
        at gw.lang.Gosu.start(Gosu.java:101)
        at gw.lang.Gosu.main(Gosu.java:50)
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.ClassNotFoundException: gw.internal.gosu.module.fs.FileSystemImpl
        at gw.config.CommonServices.defineServices(CommonServices.java:59)
        at gw.config.ServiceKernel.resetKernel(ServiceKernel.java:33)
        at gw.config.ServiceKernel.<init>(ServiceKernel.java:24)
        at gw.config.CommonServices.<init>(CommonServices.java:25)
        at gw.config.CommonServices.<clinit>(CommonServices.java:20)
        ... 5 more
Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: gw.internal.gosu.module.fs.FileSystemImpl
        at gw.config.CommonServices.getDefaultFileSystemInstance(CommonServices.java:73)
        at gw.config.CommonServices.defineServices(CommonServices.java:41)
        ... 9 more
Caused by: java.lang.ClassNotFoundException: gw.internal.gosu.module.fs.FileSystemImpl
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Unknown Source)
        at gw.config.CommonServices.getDefaultFileSystemInstance(CommonServices.java:69)
        ... 10 more

Luca Boasso

unread,
Oct 23, 2015, 1:58:43 PM10/23/15
to gosu...@googlegroups.com
Can you please show me the output of running just gosu with no arguments?
where did you install gosu?


--
You received this message because you are subscribed to the Google Groups "gosu-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gosu-lang+...@googlegroups.com.
To post to this group, send email to gosu...@googlegroups.com.
Visit this group at http://groups.google.com/group/gosu-lang.
For more options, visit https://groups.google.com/d/optout.

Suresh Anumolu

unread,
Oct 23, 2015, 2:05:33 PM10/23/15
to gosu-lang
Thanks for the prompt response. Please see the cmd prompt response. I have extracted the gosu zip and copied to c:\users\...\gosu\ folder
C:\Users\Suresh>gosu
Gosu version: 1.8.1
Usage:
    gosu [-checkedArithmetic] [-classpath 'entry1,entry2...'] program.gsp [args...]
    gosu [-checkedArithmetic] [-classpath 'entry1,entry2...'] -e 'inline script' [args..
.]



C:\Users\Anumolu>AssertionError: null
'AssertionError:' is not recognized as an internal or external command,
operable program or batch file.

Luca Boasso

unread,
Oct 23, 2015, 2:10:59 PM10/23/15
to gosu...@googlegroups.com
It looks ok.
Try this:
gosu -e "print('hello')"

Does that work?

Suresh Anumolu

unread,
Oct 23, 2015, 2:17:34 PM10/23/15
to gosu-lang
C:\Users\Anumolu>gosu -e "print('hello')"

java.lang.ExceptionInInitializerError                                                                                           at gw.lang.reflect.TypeSystem.getCurrentModule(TypeSystem.java:656)
        at gw.lang.Gosu.setClasspath(Gosu.java:203)
        at gw.lang.Gosu.init(Gosu.java:270)
        at gw.lang.Gosu.start(Gosu.java:87)

        at gw.lang.Gosu.main(Gosu.java:50)
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.ClassNotFoundException: gw.internal.gosu.module.fs.FileSystemImpl
        at gw.config.CommonServices.defineServices(CommonServices.java:59)
        at gw.config.ServiceKernel.resetKernel(ServiceKernel.java:33)
        at gw.config.ServiceKernel.<init>(ServiceKernel.java:24)
        at gw.config.CommonServices.<init>(CommonServices.java:25)
        at gw.config.CommonServices.<clinit>(CommonServices.java:20)
        ... 5 more
Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: gw.internal.gosu.module.fs.FileSystemImpl
        at gw.config.CommonServices.getDefaultFileSystemInstance(CommonServices.java:73)
        at gw.config.CommonServices.defineServices(CommonServices.java:41)
        ... 9 more
Caused by: java.lang.ClassNotFoundException: gw.internal.gosu.module.fs.FileSystemImpl
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Unknown Source)
        at gw.config.CommonServices.getDefaultFileSystemInstance(CommonServices.java:69)
        ... 10 more

Luca Boasso

unread,
Oct 23, 2015, 2:33:11 PM10/23/15
to gosu...@googlegroups.com
so it looks like gosu.cmd doesn't set the class path correctly.
I'll fix that, in the meantime open your gosu.cmd under c:\users\...\gosu\bin
and replace the 4th line set _G_ROOT_DIR=%~dp0 with
set _G_ROOT_DIR=the_path_to_your_gosu_root_folder

so I'm guessing in your case will be

set _G_ROOT_DIR=C:\Users\Suresh\gosu\

I don't have a Widows machine at the moment, so I cannot verify this.
Let me know if C:\Users\Anumolu>gosu -e "print('hello')" works.

Suresh Anumolu

unread,
Oct 23, 2015, 7:49:44 PM10/23/15
to gosu-lang
I have tried replacing as you mentioned but now i get a different error.

C:\Users\Anumolu>gosu -e "print('hello')"
Error: Could not find or load main class gw.lang.Gosu

 @echo off
setLocal EnableDelayedExpansion

set _G_ROOT_DIR=C:\Work\Gosu\gosu-1.8.1\

set _G_CLASSPATH=%_G_ROOT_DIR%..\src;%_G_ROOT_DIR%..\lib\*

set _CMD_LINE_ARGS=

Luca Boasso

unread,
Oct 23, 2015, 8:12:58 PM10/23/15
to gosu...@googlegroups.com
My bad,

try set _G_ROOT_DIR=C:\Work\Gosu\gosu-1.8.1\bin

Suresh Anumolu

unread,
Oct 23, 2015, 10:50:25 PM10/23/15
to gosu-lang
Still no luck, i changed the root dir path as you mentioned. still the problem exists.
@echo off
setLocal EnableDelayedExpansion

set _G_ROOT_DIR=C:\Work\Gosu\gosu-1.8.1\bin\


set _G_CLASSPATH=%_G_ROOT_DIR%..\src;%_G_ROOT_DIR%..\lib\*


set _CMD_LINE_ARGS=

C:\Users\Anumolu>gosu
Gosu version: 1.8.1

Usage:
    gosu [-checkedArithmetic] [-classpath 'entry1,entry2...'] program.gsp [args...]
    gosu [-checkedArithmetic] [-classpath 'entry1,entry2...'] -e 'inline script' [args...]


C:\Users\Anumolu>gosu -e "print('hello')"
java.lang.ExceptionInInitializerError

        at gw.lang.reflect.TypeSystem.getCurrentModule(TypeSystem.java:656)
        at gw.lang.Gosu.setClasspath(Gosu.java:203)
        at gw.lang.Gosu.init(Gosu.java:270)
        at gw.lang.Gosu.start(Gosu.java:87)

Luca Boasso

unread,
Oct 26, 2015, 11:36:12 AM10/26/15
to gosu...@googlegroups.com
Hi,
I just downloaded Gosu v1.8.1 from here, unzipped it as c:\gosu-1.8.1 and I put c:\gosu-1.8.1\bin; at the beginning of my Path environmental variable.
I opened a new terminal, and executed successfully gosu -e "print('123')".
Everything works as expected with no changes needed to gosu.cmd.
Please show me the exact steps you did to reproduce your problem on a clean environment.

Regards,
Luca



Reply all
Reply to author
Forward
0 new messages