Jump to content

  • Log In with Google      Sign In   
  • Create Account


How to compile and execute Java program using Netbenas


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
5 replies to this topic

#1 playstation   Members   -  Reputation: 146

Like
0Likes
Like

Posted 04 July 2011 - 07:54 PM

Hi,

I have no experience in java or netbeans. I found this java program which I would like to execute and see. However I am not sure how to do it.

I am using netbeans 6.9.1 Can anyone help me compile and execute this program which I downloaded from here:
My link

It contain Java file, PDE file and a jar library.

Thanks

Sponsor:

#2 Serapth   Crossbones+   -  Reputation: 5183

Like
1Likes
Like

Posted 04 July 2011 - 08:24 PM

Hi,

I have no experience in java or netbeans. I found this java program which I would like to execute and see. However I am not sure how to do it.

I am using netbeans 6.9.1 Can anyone help me compile and execute this program which I downloaded from here:
My link

It contain Java file, PDE file and a jar library.

Thanks


Extract the zip file to a directory.

In Netbeans, choose File->Open Project then navigate to your extracted file folder directory.

Click "Open Project Folder"

#3 playstation   Members   -  Reputation: 146

Like
0Likes
Like

Posted 05 July 2011 - 06:51 AM

Thanks for reply.

There is no option as open project folder? Open project if I got to destination there is only library folder from the extracted zip file.

I tried making a new project and add the vitamin lib and then java, pde file but nothing works

#4 Danny02   Members   -  Reputation: 275

Like
1Likes
Like

Posted 06 July 2011 - 05:35 AM

Just create a new project "with existing sources"(should be selectable in netbeans new project dialog.
There u can select the source files(all *.java files) and after u created the netbeans project go to the project preferences(rightclick on the project icon).
There u can add the jar found in the libary folder to the project libarys.

I just saw that the project is using Processing, it's an java visualisation framework. http://processing.org/
To run the project u have to include the processing libs also in your classpath(as aboth with the vitamin.jar)

#5 playstation   Members   -  Reputation: 146

Like
0Likes
Like

Posted 06 July 2011 - 11:44 AM

Thanks I did that and also added vitamin and processing lib but while I try to run the program netbeans tell me no main classes found. Is this program compatible with processing-1.5.1 only ?

I donwloaded processing-1.5.1 (windows) and tried opening the program with it. It reads .pde file? Trying to run the program however I get an error in TexRrenderer.pde

as constructor TextRenderer (Font, boolean, boolean, null, boolean) is undefiend


class VTextRenderer
{
  VTextRenderer( String fontName, int size )
  {
	_fontName = fontName;
	_fontSize = size;
	_textRender = new TextRenderer( new Font(fontName, Font.TRUETYPE_FONT, size), true, true, null, true ); 
	_textRender.setColor( 1.0f, 1.0, 1.0, 1.0 );
	//_textRender.setUseVertexArrays( true );
  }

  VTextRenderer( String fontName, int size, boolean antialiased, boolean mipmap )
  {
	_fontName = fontName;
	_fontSize = size;
	_textRender = new TextRenderer( new Font(fontName, Font.TRUETYPE_FONT, size), antialiased, true, null, mipmap ); 
	_textRender.setColor( 1.0f, 1.0, 1.0, 1.0 );
	//_textRender.setUseVertexArrays( true );
  }


I haven't done anything to the program so not sure why this is happening ...

#6 Danny02   Members   -  Reputation: 275

Like
0Likes
Like

Posted 07 July 2011 - 01:23 PM

ok i took a deeper look at this, I know what processing is but nevver used it. So here it is what I think.

I think u can somehow start Processing and open the .pde files with it, then u will see some 3D graphics or so.

What do u want to do with the code u downloaded anyway? If u searched for an ray sphere interesection testing code snipped take a look at the VRay.java file




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS