# finding a suitable JVM



## alienadam (Mar 14, 2004)

Hey guys I'm new here and new to trying to create programs (well actually my vary first). Although it is a passion i have had for a while i am now trying to create my first program. I read that Java is an easy language for beginners. Anyways, I have tried just about all the versions of the Sun compilers (both JRE and SDK) and none of them worked as they were suppose to. Once it was installed i would restart my computer and the "blue screen of death" would pop up for a wide number of different reasons. So i had to put it in "Safe Mode" and uninstall it and my computer worked fine again.(As you can imagine I have spent hours just in the downloading alone) and am getting quite frustrated. I am quite anxious to get started.

So i guess what i am asking is there a compiler out there that will work, that some one has had first hand experience with? I am using Windows 98.


----------



## AbvAvgUser (Oct 3, 2002)

For one, Java is not an easy language for beginners. It is only a little less complicated than C++ (because there are no pointers and stuff like that).

For a beginner, Visual Basic is the right choice. If you are new to programming, get hold of basic concepts like variables, scope of variables, functions, procdures, loops, conditions, etc in VB and then think of switching over to something more complex and powerful.

BTW, VB is also quite powerful and may be you may land using only that one for all your programming needs. Check it out before you go for something else.

If you want to program in Java, you need Java Virtual Machine (JVM) and Java System Development Kit (SDK). If you are using Win98, JVM gets installed along with it. However, if you still want to re-install it, download it from Sun's site and install. If that doesn't work, go to http://www.datadosen.se/jalbum. Its a software called JAlbum made in Java. There are two download links. One with JVM and one without JVM. Use one with JVM and install it. It will install JVM alongwith JAlbum.

Java SDK can be downloaed from Sun's site. I don't know of any other source. However, I have the latest one on a CD. Tell me if I can transfer it to you somehow.


----------



## alienadam (Mar 14, 2004)

Hey AbvAvg thanks for the help. I will be looking in to VB. Also i am going to try and download the Jalbum.

Ill let you know how it goes


----------



## AbvAvgUser (Oct 3, 2002)

Will wait for your response  All the best.

BTW, JAlbum by itself is a wonderful software. I just use it for all my online album making jobs.


----------



## alienadam (Mar 14, 2004)

Hey AbvAvg,
I was wondering if there was a free VB compiler that you knew of and that worked. I have found a site that can help me in my quest to learn to program. (if your interested it is http://www.vbtutor.net/vbtutor.html )

Well thank you again for the JVM i really appreciate it. It installed correctly.. finally .


----------



## AbvAvgUser (Oct 3, 2002)

Glad to know that you are thru with JVM.

There were some streamed down version of VB which was free but had limited functionality. Try for that at Micro$oft website. I had it on one of the CDs. I can have a look in my bunch and send you a copy. It is called (I think) VB Working Edition.

Here's one more for you. http://www.visualbasicforum.com.

However, a book will be more useful than these sites. I started with VB6 in 21 days and then moved on to More VB6 in 21 days, VB6 How To & VB6 Database How To. Then never needed any other book. MSDN and some sites were enough. But it is easier to learn from a book than a site.


----------



## alienadam (Mar 14, 2004)

Thanks for pointing me in the direction of VB it does seem a lil easier to use!
Also i would really appreciate that if you would send me a copy, do you need my e-mail address? 

How much do the books cost? Where do you suggest i get my hands on one of them?


----------



## AbvAvgUser (Oct 3, 2002)

Sending you a working edition by e-mail  Its too hugh to be sent that way. I can write it on a CD and ship it to you. But I guess we are too far across the globe and that could be quite uneconomical. You can first try around in the local area or try downloading it from the Micro$oft web-site. I am in Mumbai and will send it to you as long as you cover my shipping costs.

I couldn't find the link on MS site. Please try it yourself once for Visual Basic 6 Working Edition.

Books are not too costly here. I think you should get them for some US $ 10 or so. But I am not too sure. I bought them long long back and now things must have changed.


----------



## alienadam (Mar 14, 2004)

LOL I guess we are pretty far apart. I live in NY. 

I looked for a lil while yesterday and couldn't find it on the Microsoft web-site either. I will give it a try over here though looking around in some of the stores and such). Thank yo for looking and trying though. I will look for some books as well... umm.. what were the names of the books again?

I have looked around and haven't found any free trial versions or anything of that sort to use and see if i want to invest a lil. Could you let me know if you come across any free trial versions of any software like that? it would be much appreciated. well i gotta run


----------



## AbvAvgUser (Oct 3, 2002)

> *
> I started with VB6 in 21 days and then moved on to More VB6 in 21 days, VB6 How To & VB6 Database How To. Then never needed any other book. MSDN and some sites were enough. But it is easier to learn from a book than a site.
> *


----------



## alienadam (Mar 14, 2004)

thank you for the help


----------



## AbvAvgUser (Oct 3, 2002)

You are welcom


----------



## alienadam (Mar 14, 2004)

Hey,
I have been loking around for a lil while and came uppon this site

http://www.codejock.com/downloads/

And was wondering if you have heard of this site before?
and which download do i want?
I am going to start programming and was wondering what your advise was before i actually did anything. thanks again


----------



## Shadow2531 (Apr 30, 2001)

If you want the best c++ compiler, you should use gcc. goto http://www.mingw.org. It's free too.

You will also find GCJ there too.

GCJ allows you to compile java programs into regular executables without the need for sun java compilers. Compiling with gcj produces large executables, but if you want to learn java, you might want to try that.

http://gcc.gnu.org/java/index.html

I would not suggest java though, but that's up to you.

I would jump right into c++. Once you get the hang of it, you'll be glad you tried it.


----------



## AbvAvgUser (Oct 3, 2002)

For everything on codejock, I guess you still need VB installed on your machine. They seem to be a bunch of componenets/activeX objects which will make your software development easier and more convenient. I recommend that you better learn basics first and then someday go for all these tools


----------



## alienadam (Mar 14, 2004)

Hey thanks again for all your guys help, And Shadow ill try those links and let every one know how it went


----------



## alienadam (Mar 14, 2004)

Hey guys,

I have downloaded visual basic.net from microsoft and i have come to find out that it isnt for my OS.... (i have windows 98 se)

Is there an alternitiave? thanks in advanse


----------



## AbvAvgUser (Oct 3, 2002)

Either use VB 6 or install Win XP. That is the only way to solve compatibility issue.


----------



## alienadam (Mar 14, 2004)

That really stinks, I was hoping there was some other application that someone could recommend to me.


----------



## srwebtech (Dec 2, 2003)

I have taken a class in VB.net. From what I have heard, it is more difficult that plain old VB6. 
I am now taking Java Programming and because of my background with VB, the course material is easier and less frustrating this time. 
Personnally, I prefer Java. The onlline tutorials and documentation on the Sun Microsystems site is great and free!
I have worked with 2 compilers:
jGrasp http://www.jgrasp.org/ 
This one is very easy to use and is what we have loaded on our college computers.
I have also tried Eclipse. That compiler has a lot more features to it and was a little confusing at first. 
Good luck with your programming.
Sylvia


----------



## alienadam (Mar 14, 2004)

Hey thank for the jgrasp but i want to learn how to program in vb6 which ever is easiest and am looking for a compilier.. i was told and it has been conifermed that vb6 is easier an i am just learning no past experience with any other language except a lil html


----------



## srwebtech (Dec 2, 2003)

The only compiler that I know of is what I purchased: Visual Studio.Net The college gave us a copy because they have a license to give one to students. I will ask my professor today if there are any free ones.
Sylvia


----------



## AbvAvgUser (Oct 3, 2002)

There are no free VB6 editions. There was one VB6 Working Edition, but it was watered down to a great extent. There may be some available for universities. But I don't think private installation is allowed, even for lerning. Provided of course, if you can go illegal


----------



## alienadam (Mar 14, 2004)

The last thing i want to do is break the law.. Is there any free compiliers that deal with an easy to use language for beginners? I want to learn how to program. I thought Java was it for me and hen i got pointed to the VB6\VB.net and now im not sure. One thing i want to learn is a language that is today and is versitile. (so if i get another os then i can transfer it and that stuff....) But i have wanted to learn for some time. I am so ancious to start. I thank every one for the help i have recieved thus far


----------



## AbvAvgUser (Oct 3, 2002)

If you want to be able to port codes to different Operating Systems, then you better stick to Java. Although it is not as easy to learn and use and VB, its platform independant.

You can also go for C++. There are C++ compilers available under Windows, Linux and Unix. I think there are even free ones available under Windows and Linux. Don't know about Unix. For C++, you can go for Bloodshed Dev-C++ which is distributed under the GNU General Public License. It is a free Integrated Development Environment (IDE) and compiler for C and C++

But none of these are as easy as VB.


----------



## alienadam (Mar 14, 2004)

Hey AbvAvg,
I guess ill try Java....



> Shadow2531
> 
> GCJ allows you to compile java programs into regular executables without the need for sun java compilers. Compiling with gcj produces large executables, but if you want to learn java, you might want to try that.
> 
> http://gcc.gnu.org/java/index.html


Hey shadow2531 i cant find this link to download can you get me a direct link and pm it to me or something? that would be much appreciated


----------



## Shadow2531 (Apr 30, 2001)

goto http://www.mingw.org/download.shtml

download

bin gcc-java-3.3.1-20030804-1.tar.gz

(it's the current release. you can try the canidate if you want)

However I've never used gcj without installing the other gcc stuff for c++ etc so you might need some of that to make it work.

So you will probably need to download most of the binaries for everything else.

Assuming the you want the current release, download the all of the following so you are all set for whatever you want to do.

bin	gcc-ada-3.3.1-20030804-1.tar.gz
bin	gcc-core-3.3.1-20030804-1.tar.gz
bin	gcc-g++-3.3.1-20030804-1.tar.gz
bin	gcc-g77-3.3.1-20030804-1.tar.gz
bin	gcc-java-3.3.1-20030804-1.tar.gz
bin	gcc-objc-3.3.1-20030804-1.tar.gz
bin	gcc-3.3.1-info-html.tar.gz
bin	MSYS-1.0.10.exe
bin	mingw-runtime-3.2.tar.gz
bin	mingw-utils-0.3.tar.gz
bin	tcltk-8.4.1-1.exe
bin	w32api-2.5.tar.gz
bin	binutils-2.13.90-20030111-1.tar.gz
bin	binutils-2.13.90-info-html.tar.gz
bin	gdb-5.2.1-1.exe
bin	mingw32-make-3.80.0-3.exe

(keep in mind you are downloading a little more than you have to, but it's all part of the package so make the package complete.)

I usually install all that to c:\usr\mingw so that g++, gcj etc. is in c:\usr\mingw\bin

You also should add c:\usr\mingw\bin to your path

When you install MYSYS, you can just install to c:\mysys if you want. You won't need MYSYS right away, so you can wait on that part. I always install mysys to the c:\usr\mingw directory, but that can be weird because the MYSYS installer will automatically rename the make.exe it installs to mingw32-make.exe, which it shouldn't. So if you do install it to the mingw directory, once the installer renames make.exe to mingw32-make.exe, you need to rename it back to make.exe. That also means that you should not install the actual mingw32-make.exe until that is taken care. In the end you will have mingw32-make.exe and make.exe in c:\usr\mingw\bin.

Do not download

bin MinGW-3.1.0-1.exe

(it's too old)

When you have it all setup perfect, you'll be able to program with c, c++, java and more.

You can download perl and python. (jumping ahead of course)

If you don't get how to copy everything to the mingw folder (or install to), I can explain in detail more.

To use gcj you have to do it like this.

Say you have a program HelloWorld.java

at the command line, you would use

gcj --main=HelloWorld HelloWorld.java -o HelloWorld.exe

On a side note, if you want you can just download Devc++ like previously suggested and add the gcc-java to it. That would be easier, but if you use Devc++, you'll miss out on the command line stuff.

It seems like a lot to do, but once you get it, you'll see that it's just some simple copying and pasting to set it up.

However for the downloads above, you may only need these to get you going, so download these first

bin	gcc-core-3.3.1-20030804-1.tar.gz
bin	gcc-g++-3.3.1-20030804-1.tar.gz
bin	gcc-java-3.3.1-20030804-1.tar.gz
bin	mingw-runtime-3.2.tar.gz
bin	mingw-utils-0.3.tar.gz
bin	w32api-2.5.tar.gz
bin	binutils-2.13.90-20030111-1.tar.gz


----------



## alienadam (Mar 14, 2004)

It does seem like a lot of work but im up for anything i have wanted to learn to program for so long ill take little risks i mean i have you guys to come back to for help..right? Well i have downloaded everything that you told m to... ill try it when i come back home from school
ill post back immediatly if i need anything thanks again


----------



## alienadam (Mar 14, 2004)

Hey what did you mean when you said



> When you install MYSYS, you can just install to c:\mysys if you want. You won't need MYSYS right away, so you can wait on that part. I always install mysys to the c:\usr\mingw directory, but that can be weird because the MYSYS installer will automatically rename the make.exe it installs to mingw32-make.exe, which it shouldn't. So if you do install it to the mingw directory, once the installer renames make.exe to mingw32-make.exe, you need to rename it back to make.exe. That also means that you should not install the actual mingw32-make.exe until that is taken care. In the end you will have mingw32-make.exe and make.exe in c:\usr\mingw\bin.
> 
> Do not download
> 
> ...


I downloaded every thing that you told me too.... the whole list of files.....i extracted (and installed) them to there places.except for one which i wanna make sure isn going to hurt anything which is this one right here... do i just install it to its default place? mingw32-make-3.80.0-3. if so then ill get on that right away.. I dont want to hurt my computer..... if that is the consequence of the whole MYSYS thing..... if not then all i need to know is how to get started....


----------



## alienadam (Mar 14, 2004)

Hey what did you mean when you said



> When you install MYSYS, you can just install to c:\mysys if you want. You won't need MYSYS right away, so you can wait on that part. I always install mysys to the c:\usr\mingw directory, but that can be weird because the MYSYS installer will automatically rename the make.exe it installs to mingw32-make.exe, which it shouldn't. So if you do install it to the mingw directory, once the installer renames make.exe to mingw32-make.exe, you need to rename it back to make.exe. That also means that you should not install the actual mingw32-make.exe until that is taken care. In the end you will have mingw32-make.exe and make.exe in c:\usr\mingw\bin.
> 
> Do not download
> 
> ...


I downloaded every thing that you told me too.... the whole list of files.....i extracted them to there places.... I dont want to hurt my computer..... if that is the conciquense of the whole MYSYS thing..... if not then all i need to know is how to get started....


----------



## alienadam (Mar 14, 2004)

sorry it posted twice it gave me a 'page could not be displayed so i pressesd back and did it again


----------



## Shadow2531 (Apr 30, 2001)

"What did you mean?"

First off, if you downloaded the MinGW-3.1.0-1.exe file, don't use it and just delete it. I didn't list it so you shouldn't have downloaded it.

If you installed mysys c:\mysys then that's cool. If you installed it to the same place as your mingw directory, then your make.exe and mingw32-make.exe files may be mixed up, but we'll worry about that later.

Here's your java test program.


```
class hello {  
    public static void main(String args[]) {
        System.out.println("\nHello World!");
    }
}
```
Save that as hello.java to the mingw/bin directory (where gcj.exe is).

Then at the command prompt, change to that directory and run this command


```
gcj --main=hello hello.java -o hello.exe
```
That should create hello.exe

type hello at the command prompt and press enter.

It should say Hello World!.

Let me know if you get that far.

the hello.exe that is create will probably be around 2.6MB. you can run

strip hello.exe

at the command prompt

to knock it down to ~1.6MB

Then if you zip that up, you end up with a slightly reasonable 660KB file.

(you would only need to do all that if you were offering it up for download somewhere).


----------



## alienadam (Mar 14, 2004)

ok i did everything you said and i get these errors

GCJ.EXE: hello.java: no such file or directory
GCJ.EXE: no input files

could this be because i didnt install something right?


----------



## srwebtech (Dec 2, 2003)

public class Hello
{ 
public static void main(String args[]) 
{
System.out.println("Hello World!");
}
}
The class should be decalred as public
Class name always starts with an uppercase letter

I would copy and paste that code into the jGrasp compiler; save as Hello.java
Hit the compile button on your jGrasp tool bar
Hit Run
It should work

Hope I did not confuse the situation.

Syllvia


----------



## Shadow2531 (Apr 30, 2001)

```
public class Hello {  
    public static void main(String args[]) {
        System.out.println("\nHello World!");
    }
}
```
save as Hello.java


```
gcj --main=Hello Hello.java -o hello.exe
```
If gcj is in c:\usr\mingw\bin , you need to add that directory to your path.

You can temporarily do this at the command prompt by typing

set PATH=%PATH%;c:\usr\mingw\bin

(or wherever you have your gcj.exe)

You should be able to permanently set the path by putting that in your autoexec.bat file.

This is all assuming your copied everything in the right place.

by command prompt, I mean the ms-dos box. You don't actually need to restart in ms-dos.

(or start>run>command.com)

Also, jumping ahead .....

Here's a c++ program that you can try to compile if you want.


```
#include <iostream>

using namespace std;

int main() {
    cout << endl << "Hello World" << endl;
}
```
save as hello.cpp

(make sure there's a new line after the } in your text editor before you save it.

then run


```
g++ -Wall -W hello.cpp -o cpphello
```
Then you can run cpphello.exe


----------



## Shadow2531 (Apr 30, 2001)

O.K. this maybe easier for you.

Download STL's Mingw distro (http://nuwen.net)
http://nuwen.net/files/mingw.zip
(it's gcc 3.3.3)

mingw.zip contains a MinGW folder.
extract the MinGW folder to c:\
If you did it right, g++.exe will be in c:\MinGW\bin

goto C:\MinGW\lib\gcc-lib

make a copy of the i686-pc-mingw32 folder and rename the copy to mingw32 and put it in 
C:\MinGW\lib\gcc-lib

so in C:\MinGW\lib\gcc-lib , you will have 2 folders: mingw32 and i686-pc-mingw32 . (this is done for gcj's sake)

Download bin gcc-java-3.3.3-20040217-1.tar.gz from www.mingw.org

extract gcc-java-3.3.3-20040217-1.tar.gz to C:\MinGW and choose to overwrite if prompted.

or extract the contents of gcc-java-3.3.3-20040217-1.tar.gz to a folder.

go into that folder, select all, cut, and paste to c:\MinGW.

When it prompts you to overwrite, choose Yes to all.

Then you have to add c:\MinGW\bin to your path.

Create a new enviroment variable named RM.
Set the value of RM to del

Then you can compile the java Hello World! test program in the previous post.


----------



## alienadam (Mar 14, 2004)

Thank yu for your help it worked!!!!!! now i am going to start my quest to write my own program..wish me luck


----------



## Shadow2531 (Apr 30, 2001)

Good luck and while your learning java, remember that you can compile c and c++ programs with that distro too.


----------

