Change Contents of the Bubble
Welcome to CS1315. Click on the python to add comments.

Looking for the book? They have it at the Engineer's Bookstore at 748 Marietta St NW. Here is there website: http://www.engrbookstore.com/ - Monica

Hotspots: Slides and CodeTA CornerComments?AnnouncementsFAQStatic Webspace
View this PageEdit this Page (locked)Uploads to this PageHistory of this PageHomeRecent ChangesSearchHelp Guide

An Alternative Way to Run JES

Here's an alternative way to run JES. This way gets around the conflict with the Java files we provided (at least one of them):


Slower, More Detailed Directions


If you have memory problems

This is tricky, but it's okay. Open Notepad (start from the Start Menu – it's probably in Accessories) and edit the file "jython" in the C:\jython\jython-2.1 directory. You'll see a bunch of stuff ending in the word "java". Right after that, insert the characters:
-Xmx256m
Make sure that there are spaces to either side. Save the "jython" file, then try again. This will reserve 256 Mb for Jython, which should be plenty.

On my Mac OS X computer, my "jython" command looks like this:
"/System/Library/Frameworks/JavaVM.framework/Versions/1.3.1/Home/bin/java" -Xmx256m -Dpython.home="/Users/guzdial/jython-2.1" -classpath "/Users/guzdial/jython-2.1/jython.jar:$CLASSPATH" "org.python.util.jython" "$@"

You can ignore 90% of this. Just insert the -Xmx256m to get the memory right.

"Did I do it right?"


Here's how to check if you got it right.

In a Command Prompt, type the things in typewriter font:

cd c:\jython
(If that fails, you didn't create the right directories and nothing will work.)
dir
(You'll see a bunch of text, one part of which should now show a directory named jython-2.1)
cd jython-2.1
dir
(You should now see a directory named jes-nc and a file named jython.bat)
 cd jes-nc
(You should now see a whole bunch of files, one of which is JESProgram.py
 ..\jython JESProgram.py


NOTE

If you are still getting "Exception in thread "main" java.lang.NoClassDefFoundError: JESProgram" then you're NOT following the above directions. You can't get that error from these directions! And if you follow these directions, you should NOT be double-clicking on a JES batch file nor a Jython batch file. You'll be starting JES from a command prompt.

Please post here if this worked for you!




Worked on Win98 SE Spanish Edition! - Jose

I'm trying it right now. First, how do you unpack it. I downloaded it then it disappeared. Second, I went to Accessories and I don't see Command Prompt. And lastly, I don't understand what you are saying to do in the last 2 steps. I'm sorry if you have to say it again.

You'll need WinZip to unpack it. On different Windows, Command Prompt might be in different places. "cd" is a command (change directory). You have to use "cd" to move to a different directory on your computer. Type it like you see me typing JES commands. That last point is also a command. When you're in the same directory as JESProgram.py, you can use Jython to start JES. Mark Guzdial


Do I have to have a zip drive for this? What does it mean to "unpack" it? I tried to download Jython from the website, but I never get the option to actually download it? Any suggestions???

For the "Command Prompt" look for "MS-DOS" (Startup - Programs).

"Unpack it" basically means that the file is compressed and should be uncompressed with a program such as Winzip. - Jose
Like Jose said. You can get Winzip from http://www.winzip.com Mark Guzdial


To get Jython:
http://sourceforge.net/project/showfiles.php?group_id=12867&release_id=67726

You'll probably want to download jython-21.class (that worked for me, Win98SE). - Jose



seriously this is confusing. i havent worked in ms-dos directly in a really long time. i dont want to do anything wrong that will mess up my computer any further. could someone give detailed step by step directions for windows98? thanks :\
None of this will mess up your computer – we don't mess with the registry or anything like that. Mark Guzdial


thank you! everything worked!
BUT
now i need to figure out how to run the program. i tried to do what the directions above says but i got the error message "bad command or file name" when typing in "jython jes-nc/JESProgram.py"
what can i do to run JES?

It Worked HALELUYAH!!!!!!!! Thank you for all the help.

so you click on the batch file "jython" but then what? how do you get jes to run?
Follow the directions – note that it never says to click on the batch file "Jython".

I've gotten everything but the very last command to work: Now type "jython jes-nc/JESProgram.py"
Mine is also saying "Bad command or File Name"
Has anyone figured out how to fix this problem?
It means that you're in the wrong directory. Type the command "dir". If you don't see the file "jython," then you're in the wrong directory. See the above detailed directions on how to check if you did it right. Mark Guzdial

I still get the NoClassDefFoundError even after doing it the alternative way.
Now I am stumped. You must have some software that is really, REALLY interfering with Java. Please contact your TA to work with you individually on a fix. Mark Guzdial

I have gotten to the last step and when I try to run JES it almost opens then give me the message that it can't find the JESIntro.txt file. Anyone know what to do? Sorry for posting this to both places...
This means that you didn't get all the files off the CD or out of the zip. There is a file JESIntro.txt that must be in your JES directory. Email me and I'll send it to you, or get it out of the zip file. Mark Guzdial


C:\Jython\jython-2.1\jes>JES
Exception in thread "main" java.lang.NoClassDefFoundError: JESProgram

Why do I get this error?
Try the FAQ page or the top of this page.


IT FINALLY WORKED!!

C:\Jython\jython-2.1\jes-nc>..\jython JESProgram.py

 SUCCESS :D

you have the wrong backslash up there i think... that was part of the problem for me.

THANK YOU FOR ALL THE HELP!

it worked! it worked! thank you, thank you, thank you!!!!!

I tested this setup on redhat 9 and it works, you just gotta make slight changes to what is written here. Make sure to edit PATH so you can type jython at anytime in the console.



Links to this Page