Syntax Error after loading the JVM

View: New views
2 Messages — Rating Filter:   Alert me  

Syntax Error after loading the JVM

by michele-43 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,
I have installed the latest JDK from Sun:

C:\Documents and Settings\stage-dvt>java -version
java version "1.6.0_07"
Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
Java HotSpot(TM) Client VM (build 10.0-b23, mixed mode, sharing)

Then I installed Python with JPype:
C:\Documents and Settings\stage-dvt>python --version
Python 2.5.2

I came up with a strange error when using JPype:
C:\Documents and Settings\stage-dvt>python
ActivePython 2.5.2.2 (ActiveState Software Inc.) based on
Python 2.5.2 (r252:60911, Mar 27 2008, 17:57:18) [MSC v.1310 32 bit  
(Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from jpype import *
>>> startJVM("C:/Program Files/Java/jdk1.6.0_07/jre/bin/client/jvm.dll","-ea")
>>> java.lang.System.out.println(1)
   File "<stdin>", line 1
     java.lang.System.out.println(1)
                                    ^
SyntaxError: invalid syntax
>>> shutdownJVM()
   File "<stdin>", line 1
     shutdownJVM()
                   ^
SyntaxError: invalid syntax

and so one with every statement I write.

How can I solve?

Thank you


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Jpype-users mailing list
Jpype-users@...
https://lists.sourceforge.net/lists/listinfo/jpype-users

Re: Syntax Error after loading the JVM

by Steve Ménard :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

For some reason that have not yet been explained, JPype is not compatible with the python interactive shell.

Write scripts instead and everything should be fine.

On Thu, Sep 11, 2008 at 8:36 AM, <michele@...> wrote:
Hi,
I have installed the latest JDK from Sun:

C:\Documents and Settings\stage-dvt>java -version
java version "1.6.0_07"
Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
Java HotSpot(TM) Client VM (build 10.0-b23, mixed mode, sharing)

Then I installed Python with JPype:
C:\Documents and Settings\stage-dvt>python --version
Python 2.5.2

I came up with a strange error when using JPype:
C:\Documents and Settings\stage-dvt>python
ActivePython 2.5.2.2 (ActiveState Software Inc.) based on
Python 2.5.2 (r252:60911, Mar 27 2008, 17:57:18) [MSC v.1310 32 bit
(Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from jpype import *
>>> startJVM("C:/Program Files/Java/jdk1.6.0_07/jre/bin/client/jvm.dll","-ea")
>>> java.lang.System.out.println(1)
  File "<stdin>", line 1
    java.lang.System.out.println(1)
                                   ^
SyntaxError: invalid syntax
>>> shutdownJVM()
  File "<stdin>", line 1
    shutdownJVM()
                  ^
SyntaxError: invalid syntax

and so one with every statement I write.

How can I solve?

Thank you


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Jpype-users mailing list
Jpype-users@...
https://lists.sourceforge.net/lists/listinfo/jpype-users



--
Steve Menard

------------------------------
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Rick Cook, The Wizardry Compiled
------
There are two major products that come out of Berkeley: LSD and UNIX. We don't believe this to be a coincidence.
-- Jeremy S. Anderson

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Jpype-users mailing list
Jpype-users@...
https://lists.sourceforge.net/lists/listinfo/jpype-users
LightInTheBox - Buy quality products at wholesale price!