• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Look and Feel

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I stumbled upon this this: https://substance.dev.java.net/

Because I was looking for java themes I could use for my apps. What seems odd, amd sorry for my noobishness, but I don't see a download link, and I'm confused, becase I want the Streetlight / Metal Wall Theme in the middle of the page(black).

Helpz
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
On the left hand side of the page, there's a link for "Documents and files." This is the link that, on a site designed by a regular human person, is called "Downloads."
 
Keenan Staffieri
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ok, i need a little help getting this to work

ok i am following this link:
https://substance.dev.java.net/docs/getting-started.html

I have the substance.jar in my classes folder. Here is my code:




Yet, instead of showing the new substance interface, it shows the losey java one. The reason is that for some reason it cant find the class for subtance in the catch. My output box says "Subtance not found" but i dont know where the class file is, because it didnt come with one. I dont know what im support to do to make this compile and work.

ty for help.
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's a classpath issue. The substance.jar file needs to be in your classpath. Although your classes folder my be in your classpath I don't believe the VM will read a JAR file located in the classes folder. You'll need to run your application with something like...

java -classpath path\to\substance.jar Swingy

or something like that.
 
Keenan Staffieri
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I use JBuilder and the screen looks like this:
http://img126.imageshack.us/my.php?image=1dr4.jpg


These are my paths... are they ok?

and also how would i run the app with what you said, im a little confused about java because it does not make .exe like C language does. I dont know how i am supposed to run the app without compiling it in jbuilder. when i look in my project folder i there is nothing that seem like it "executes" the program in order to add that path.
[ July 25, 2006: Message edited by: Keenan Staffieri ]
 
Author
Posts: 836
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I assume you have a copy of the runtime (JRE) at a minimum. In that case, on your system path you'll have access to the "java.exe" program. That is used to load the JVM and run all subsequent Java code. Java deliberately doesn't compile into native executables - if it did, it wouldn't be portable across all the other platforms (which is its main advantage)!

All programs start at the entry point of the main(String[]) method. If your class Swingy has that main method (as above), you can start it via:However, when you need to use files in a JAR (as Gregg said), you need to name that JAR explicitly*, and you do so by specifying the -classpath (or -cp) switch:Assuming substance.jar is in the current working directory (otherwise replace with the path to the JAR).

As for your JBuilder, I've never used it, but looking at the screenshot I would imagine you need to add the JAR to the "Required Libraries" list.


* I'm still waiting for the day when the Java standard ClassLoader will search out and load all JARs on the path automatically. You can program one yourself using java.net.URLClassLoader as a base; J2EE Web containers do this as standard in order to load JARs installed in /WEB-INF/classes/ for instance. It would be a minor (easy to implement) but very useful feature!
 
Keenan Staffieri
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well I just added the substance to the "Required libaries" tab yet their is an excliamtion point, and I dont know what it mean and it does not say anything or why even if hoovered with mouse. I checked the help, and it said if its grey like that, i need to upgrade to JBuilder Enterprise which cost money, and i dont like that. I dont see why this is nessary, i hope i can get interfaces to work without paying anything.

http://img66.imageshack.us/my.php?image=1nd1.jpg

And also here is a sceeen of the jar file:

http://img160.imageshack.us/my.php?image=2ar3.jpg


I went to the java jre 1.5 directory and i saw a "java.exe" but i still am unclear on how to make my program executable.

ty for help.
 
Charles Lyons
Author
Posts: 836
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I went to the java jre 1.5 directory and i saw a "java.exe" but i still am unclear on how to make my program executable.

You can't 'make' any Java program executable, at least not in the C/C++/.NET compiled sense. The java.exe application is the launcher for the JVM and will start your Java application... there is no other executable. Java code is converted to native commands by a Just in Time (JIT) compiler at run time.

Try this:

1. Make sure all your class files and JARs are in the same directory (if you've used packages ensure you create subdirectories with the correct nesting).

2. Open a command prompt and cd to that directory.

3. Type "java -cp substance.jar Swingy". This should launch your application.

If you need more help on setting up Java applications, I suggest Googling for Java tutorials for beginners - the first chapter or two should tell you how to start Java apps. in this way. After that, any further questions might be better directed to the "Java in General (beginner)" forum.

As far as paying for software upgrades goes, there's one moral I've always stuck by: everything in Java is free (if not open source), if you're prepared to do some manual tasks yourself. Paying for an IDE upgrade isn't worth it... you might consider using the Eclipse IDE instead which is totally free (actually, open source) and worth the investment (in time at least!):

http://www.eclipse.org
 
Keenan Staffieri
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i know java doesnt compile into executable, i was just saying i saw the path for java.exe.

i typed in the stuff in the command prompt, and i says this when i try the java -cp substance.jar Swingy command. this: exception in thread "main" java.lang.NoClassDefFoundError: Swingy.

I am right in the directory of my program: C:\Practice Programs\Swingy, there are other folders in this such as classes, and classes has the substance jar file and my class file. i try this command in the command prompt in both the direct Swingy directory, and in the classes folders and it always says this. I followed my noob book about command promt but this one isnt working. Swingy compiled just fine in JBuild, AND it of course has a main.
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i typed in the stuff in the command prompt,

And what stuff was that? Here is what I think I'd type to get it to work.


[ July 26, 2006: Message edited by: Gregg Bolinger ]
 
Keenan Staffieri
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ok, now it says cannot create java virutal machine
i even made sure it was on mannually by opening up an applet on the net.


[ July 26, 2006: Message edited by: Keenan Staffieri ]
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You have a space between - and classpath. It should be -classpath.
 
Keenan Staffieri
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok, thank you that worked perfectly and its beutiful.

But I have a long term question for you, before i let all of you go!

Ok, how would I make this so other people could download it and be able to just simply double click on something and the program would run? Kinda like an executable shortcut but for java...

Also another question about path and letting people download it. Ok, if you have sounds,pictures,sprites,ect, that are used by the program in the classes directly, does java automaticcaly "pack" all of those things from the classes folder for other peoples do download? Or must they be included like I do in C language, give them a folder with the stuff in it.

ty
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Keenan Staffieri:
Ok, thank you that worked perfectly and its beutiful.

But I have a long term question for you, before i let all of you go!

Ok, how would I make this so other people could download it and be able to just simply double click on something and the program would run? Kinda like an executable shortcut but for java...

Also another question about path and letting people download it. Ok, if you have sounds,pictures,sprites,ect, that are used by the program in the classes directly, does java automaticcaly "pack" all of those things from the classes folder for other peoples do download? Or must they be included like I do in C language, give them a folder with the stuff in it.

ty



Lots of good questions. All of which have been asked many times over. For simplicity sake, and to give you something to do, look into JAR files. That is how you will package your application. One of the coolest methods I know of for distributing a Java application is Java WebStart. So look into that as well.

Some helpful hints:

A JAR file can be made executable by inluding a MANIFEST file that defines which class contains the main method. You can also define external JAR files that need to be including in the classpath when executed.

The problem you'll run into is the fact that the user will need both your JAR file and the substance.jar file because the class loader won't load a JAR from inside a JAR. (Although you could write one).

Enter Java WebStart which helps solve these problems.
 
Keenan Staffieri
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ok ill take a look, ill just worry about it more when the time comes i guess

now off to figuring out how to change this... theme... i want darker one
 
Keenan Staffieri
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok, i got back to this, and i now use eclipse 3.2 so i dont have to use command promt to utilize the sunstance look and feel.

Well it works, and the thing actually lets me change the theme as its open, but i want to keep theme default MY WAY to ebony theme. I am having trouble setting the theme because i am not smart.

CODE:



I am viewing this for help:
https://substance.dev.java.net/docs/themes.html

I want to make the ebony theme work with CLASSIC buttons style.
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I'm the developer of Substance LAF. Please register to the Users mailing list of Substance [1] and direct your questions there - do not reply to this post. This way you will get the answers straight from the source (although most of the answers can be obtained by reading the documentation and the test applications).

Kirill

[1] https://substance.dev.java.net/servlets/ProjectMailingListList
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic