Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (527)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (594)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Eclipse could not import .class files for which i dont have the source code.  (Read 3588 times)
0 Members and 1 Guest are viewing this topic.
Offline zappsweden

Junior Devvie




Java games rock!


« Posted 2006-11-06 15:47:39 »

Just like with JBuilder, I have problem using class files that i do not have the source code for since in the source directory I will get errors saying the classes do not exist. In JBuilder the class files got deleted when JBuilder compiled plus run giving the classic "canon error sound" at runtime.

In eclipse it did not even find the .class files (it was the OGG files I am using). This must be a common problems because using class files without needing the source file is vital amongst communities sharing code.

1) How do i import .class files that do not have a source code into my Eclipse project?

2) PFFFFT, I created a project in Eclipse but I cannot see any design mode GUI Classes like in JBuilder.  Is there any way of or do I actually need to write the code for all UI myself (no cannot be true?Huh) which will take forever?
Offline Orangy Tang

JGO Kernel


Medals: 56
Projects: 11


Monkey for a head


« Reply #1 - Posted 2006-11-06 16:56:12 »

1. Why do you have raw .class files? Either you should have the source to compile them yourself, or they should be distributed within a jar file. Give the library author a slap and tell them to do a proper job. Wink If you need something straight away, I'd be inclined to jar them up yourself and reference that within your eclipse project.

2. Eclipse doesn't have a built-in GUI designer, but theres at least one good plug-in to do that, have a poke around the eclipse website for it.

(Who uses gui designers anyway? Code generation is a design smell).

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline zappsweden

Junior Devvie




Java games rock!


« Reply #2 - Posted 2006-11-06 17:31:32 »

1. Why do you have raw .class files? Either you should have the source to compile them yourself, or they should be distributed within a jar file. Give the library author a slap and tell them to do a proper job. Wink If you need something straight away, I'd be inclined to jar them up yourself and reference that within your eclipse project.

2. Eclipse doesn't have a built-in GUI designer, but theres at least one good plug-in to do that, have a poke around the eclipse website for it.

(Who uses gui designers anyway? Code generation is a design smell).

They were in jar files, it was me extracting them to folders, which I apparently should not do Cheesy

Orangy, pls tell me this is a joke or a nigthmare, ppl write all the GUI code manually? Seriously, having 10-15 screens in a game would take months to write code for if not having any visual editor to place the components.

Seems to me like just a giant waste of time to place every little JButton, JLabel, JPanel and all the nasty gridbaglayout modifications manually.

By the way, I have now tested to import them as archive , the jar files I had. Now Eclipse find the com.jcraft.jogg and the com.jcraft.jorbis packages like intended but it does not find the .class files inside the jogg and jorbis lowest level folders so I get the same problem. Oh boy, should not importing .class files be easy to do without the compiler complaining for errors?
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Mr_Light

Senior Devvie


Medals: 1


shiny.


« Reply #3 - Posted 2006-11-06 21:41:57 »

http://www.eclipse.org/vep/WebContent/main.php

visual editors never saved me time, useable for prototyping though.

It's harder to read code than to write it. - it's even harder to write readable code.

The gospel of brother Riven: "The guarantee that all bugs are in *your* code is worth gold." Amen brother a-m-e-n.
Offline zingbat

Senior Devvie




Java games rock!


« Reply #4 - Posted 2006-11-06 22:17:28 »

I would rather write my gui as a xml file by hand (just like a math text with Latex) than to use a visual editor. This kind of things are the most inflexible and cumbersome tools one can have for designing java guis.
Offline zappsweden

Junior Devvie




Java games rock!


« Reply #5 - Posted 2006-11-06 22:47:02 »

I would rather write my gui as a xml file by hand (just like a math text with Latex) than to use a visual editor. This kind of things are the most inflexible and cumbersome tools one can have for designing java guis.


Does that also work well if you have many combinations of panels, i.e say you have one place on the screen where you will place either panelA, panelB or panelC , meaning that i cannot just design a whole screen but need to go down to designing panels that are interchangeable.
Offline Orangy Tang

JGO Kernel


Medals: 56
Projects: 11


Monkey for a head


« Reply #6 - Posted 2006-11-06 23:12:45 »

Most GUI designers I find are clunky and spit out horrible code. It's much easier and quicker to just do it manually by hand. Of couse I also think that most of the time GridBag layout is totally over the top and unnessisary.

And no-one uses Swing for a game UI anyway, due to it looking like arse.

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline moogie

JGO Knight


Medals: 13
Projects: 6
Exp: 10 years


Java games rock!


« Reply #7 - Posted 2006-11-07 04:56:29 »

todate i have never used gridbag layout... probably because i am lazy Smiley I seem to only use border layout and flow layout.
Offline kevglass

« JGO Spiffy Duke »


Medals: 210
Projects: 24
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #8 - Posted 2006-11-07 05:33:45 »

Swing BoxLayout saved my life.

Kev

Offline princec

« JGO Spiffy Duke »


Medals: 425
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #9 - Posted 2006-11-07 14:16:15 »

Just been through our commercial app and replaced all the gridbags with custom layout managers. Much more control, much faster layout too - noticeable on slower machines.

Cas Smiley

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline zingbat

Senior Devvie




Java games rock!


« Reply #10 - Posted 2006-11-07 18:14:12 »

Does that also work well if you have many combinations of panels, i.e say you have one place on the screen where you will place either panelA, panelB or panelC , meaning that i cannot just design a whole screen but need to go down to designing panels that are interchangeable.

Of course it does, just write as many xml layout files as you need.

Check out this stuff. Its a layout manager that lets us write a xml file with constraints to arrange our components :
http://www.onjava.com/pub/a/onjava/2002/09/18/relativelayout.html

The advantage is that making changes to the gui is as easy as editing a xml file.
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

PocketCrafter7 (14 views)
2014-11-28 16:25:35

PocketCrafter7 (10 views)
2014-11-28 16:25:09

PocketCrafter7 (10 views)
2014-11-28 16:24:29

toopeicgaming1999 (76 views)
2014-11-26 15:22:04

toopeicgaming1999 (67 views)
2014-11-26 15:20:36

toopeicgaming1999 (17 views)
2014-11-26 15:20:08

SHC (30 views)
2014-11-25 12:00:59

SHC (28 views)
2014-11-25 11:53:45

Norakomi (32 views)
2014-11-25 11:26:43

Gibbo3771 (28 views)
2014-11-24 19:59:16
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!