Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Test and Performance Tools Platform (TPTP) » Terminal not accessing .png files from Eclipse Project(The project runs fine in Eclipse, but when I try to take the files and run it through Terminal, it seems like it is not accessing the .png files. I don't know what to do.)
Terminal not accessing .png files from Eclipse Project [message #1020324] Sun, 17 March 2013 23:14 Go to next message
David Taylor is currently offline David Taylor
Messages: 1
Registered: March 2013
Junior Member
The project runs fine in Eclipse, but when I try to take the files and run it through Terminal, it seems like it is not accessing the .png files. I don't know what to do.

Here is my main class:

import javax.swing.*;
import java.awt.*;

public class Frame extends JFrame {
	public static String title = "Tower Defense Alpha";
	public static Dimension size = new Dimension(700, 550);
	
	
	public Frame() {
		setTitle(title);
		setSize(size);
		setResizable(false);
		setLocationRelativeTo(null);
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		
		init();
		
	}
	
	public void init(){
		
		setLayout(new GridLayout(1,1,0,0));
		
		Screen screen = new Screen(this);
		add(screen);
		
		setVisible(true);
		
	}
	
	public static void main(String args[]){
		Frame frame = new Frame();
		
		
	}
}



Here is how I am accessing the .png files in Eclipse, which isn't working in Terminal:

for (int i=0; i<tileset_ground.length; i++) {
			tileset_ground[i] = new ImageIcon("res/tileset_ground.png").getImage();
			tileset_ground[i] = createImage(new FilteredImageSource(tileset_ground[i].getSource(), 
											new CropImageFilter(0, 26*i, 26, 26)));
		}
Re: Terminal not accessing .png files from Eclipse Project [message #1020759 is a reply to message #1020324] Mon, 18 March 2013 21:49 Go to previous message
Heiner Westphal is currently offline Heiner Westphal
Messages: 18
Registered: July 2009
Junior Member
Hello David,

I cannot quite imagine your setup.

What kind of terminal are you running?
XTerm on an X server? PuTTy or some other ssh client?
Or is it a local terminal on a linux box, or on Windows?

And I cannot see if this is related to TPTP in any way.

Could you shed some more light on this?

Thanks,

Heiner

Am 18.03.2013 19:18, schrieb David Taylor:
> The project runs fine in Eclipse, but when I try to take the files and
> run it through Terminal, it seems like it is not accessing the .png
> files. I don't know what to do.
>
> Here is my main class:
>
> import javax.swing.*;
> import java.awt.*;
>
> public class Frame extends JFrame {
> public static String title = "Tower Defense Alpha";
> public static Dimension size = new Dimension(700, 550);
>
>
> public Frame() {
> setTitle(title);
> setSize(size);
> setResizable(false);
> setLocationRelativeTo(null);
> setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
>
> init();
>
> }
>
> public void init(){
>
> setLayout(new GridLayout(1,1,0,0));
>
> Screen screen = new Screen(this);
> add(screen);
>
> setVisible(true);
>
> }
>
> public static void main(String args[]){
> Frame frame = new Frame();
>
>
> }
> }
>
>
> Here is how I am accessing the .png files in Eclipse, which isn't
> working in Terminal:
>
> for (int i=0; i<tileset_ground.length; i++) {
> tileset_ground[i] = new
> ImageIcon("res/tileset_ground.png").getImage();
> tileset_ground[i] = createImage(new
> FilteredImageSource(tileset_ground[i].getSource(),
> new CropImageFilter(0,
> 26*i, 26, 26)));
> }
Previous Topic:RWT Standalone WAR to WebLogic contextDirectory problem
Next Topic:Unable to start standalone or integrated Controller Agent
Goto Forum:
  


Current Time: Thu Oct 02 14:29:49 GMT 2014

Powered by FUDForum. Page generated in 0.01989 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software