Jump to content


Disable Auto Create Folder


  • Please log in to reply
14 replies to this topic

#1 d17may

d17may

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 12 June 2006 - 08:26 AM

When i make new java file and i specify it in a.b package .on compiling jcreator
automatically creates folder a and b .I want that jcreator does not automatically create folder
Thanks

#2 E-E-R

E-E-R

    Advanced Member

  • Members
  • PipPipPip
  • 1,367 posts
  • Gender:Male
  • Location:The Netherlands
  • Interests:Programming, Gaming, DC

Posted 12 June 2006 - 10:13 AM

Well, afaik, your program will not run if JCreator does not create the folders a and b.

Then again, I believe not JCreator, but the java compiler creates these folders.
"Many are persistently in pursuit of the way they have chosen; few in pursuit of the goal"

#3 Draco

Draco

    Advanced Member

  • Members
  • PipPipPip
  • 819 posts
  • Gender:Male
  • Location:United Kingdom
  • Interests:Java duh...

Posted 12 June 2006 - 01:12 PM

isnt that the purpose of packages? lol
-----------------------------------
Sun Certified Java Programmer
-----------------------------------
Java 1.5 API <---Check the specs
Google is your friend

#4 Sahisoft

Sahisoft

    Advanced Member

  • Members
  • PipPipPip
  • 74 posts
  • Gender:Male
  • Location:New Jersey, United States
  • Interests:Computer science. What else? :-)

Posted 12 June 2006 - 01:57 PM

Yes, it is perfectly normal for the Java compiler to auto-generate new folders when compiling source files in different packages.

Why does this happen? Think of a very large project - the point of the packages helps provides a way of organizing thousands of classes.

So if you don't want the compiled class files to be put into different folders, you should take out all the package declarations in your source files.  "It's a feature, not a bug!" biggrin.gif

#5 d17may

d17may

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 17 June 2006 - 07:38 AM

I have application in which i put all my .java files and  .class files .Let i have package package1 .I put java1.java in folder package1.When i compile java1.java it creates one more folder package1 under already existing folder package1 now my java1.class is in folder package1/package1.
earlier i worked in different ide it doesn't create any folder by itself.
Thanks
d17may


#6 Draco

Draco

    Advanced Member

  • Members
  • PipPipPip
  • 819 posts
  • Gender:Male
  • Location:United Kingdom
  • Interests:Java duh...

Posted 17 June 2006 - 07:57 AM

don't create the folder package1 yourself.  Let java.exe do it for your

CODE

package package1;

//rest of your program code here


-----------------------------------
Sun Certified Java Programmer
-----------------------------------
Java 1.5 API <---Check the specs
Google is your friend

#7 d17may

d17may

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 17 June 2006 - 09:10 AM

QUOTE(Draco @ Jun 17 2006, 07:57 AM) View Post

don't create the folder package1 yourself.  Let java.exe do it for your

CODE

package package1;

//rest of your program code here



But then my java and class files are in different folder



#8 Draco

Draco

    Advanced Member

  • Members
  • PipPipPip
  • 819 posts
  • Gender:Male
  • Location:United Kingdom
  • Interests:Java duh...

Posted 17 June 2006 - 09:19 AM

yes you are correct, but they still compile fine.  That separation of .class and .java files is java.exe not JCreator if i am correct.

You have two options.

1) Use the package keyword and have the .class and .java files in separate areas
or
2) Don't use the package keyword, and instead, create the folders you want yourself.

Peace,
Draco

-----------------------------------
Sun Certified Java Programmer
-----------------------------------
Java 1.5 API <---Check the specs
Google is your friend

#9 E-E-R

E-E-R

    Advanced Member

  • Members
  • PipPipPip
  • 1,367 posts
  • Gender:Male
  • Location:The Netherlands
  • Interests:Programming, Gaming, DC

Posted 17 June 2006 - 11:09 AM

You can still use the package and then create the folders yourself for the java files?
"Many are persistently in pursuit of the way they have chosen; few in pursuit of the goal"

#10 d17may

d17may

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 17 June 2006 - 11:59 AM

Earlier i worked in different id.In that id i use package, manually create folders when i compile class files are
in same folder as java files .
I have to use package and i also want  that java and class files are in same folder.
I don't remember whether i use same java version in that id.But is there anyway to obtain that functionality


#11 E-E-R

E-E-R

    Advanced Member

  • Members
  • PipPipPip
  • 1,367 posts
  • Gender:Male
  • Location:The Netherlands
  • Interests:Programming, Gaming, DC

Posted 17 June 2006 - 12:37 PM

I think what you mean is that you want the java files and class files in the same directory, while still using packages?

If so, you could switch build output path to the source directory.
"Many are persistently in pursuit of the way they have chosen; few in pursuit of the goal"

#12 Alec Porter

Alec Porter

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 13 March 2011 - 10:05 PM

View PostE-E-R, on 17 June 2006 - 12:37 PM, said:

I think what you mean is that you want the java files and class files in the same directory, while still using packages?

If so, you could switch build output path to the source directory.


Yeah I don't get this, if I have a directory and 2 sub directories I would need to put all the java files from the two directories in the top directory which makes all the java files combined and disorganized. So how do you do that in JCreator?

#13 Captain Pierce

Captain Pierce

    Advanced Member

  • Moderator
  • PipPipPip
  • 877 posts
  • Gender:Male
  • Location:Georgia

Posted 24 March 2011 - 12:25 AM

The package statement in your java source files need to match your folder structure.

Say you put your code in /com/jcreator... (relative to the source directory)

Then in Test.java, put at the top of the file, before import statements:

package com.jcreator;

#14 alexis21

alexis21

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 18 October 2011 - 10:52 AM

Thank you very much, your solution  Bestbuy Mousepads and advice worked and helped me!!!

#15 Jeramiah11

Jeramiah11

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 21 October 2011 - 06:12 AM

Look ScriptInit.txt in rofs2
Some Good items For Women : Knockoff Handbags & Maternity Evening Dresses