Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Don't forget to read Tuesday's email newsletter for your chance to win a free copy of Construct 2!


One source file used in multiple projects?


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
4 replies to this topic

#1 Belgium   Members   -  Reputation: 123

Like
0Likes
Like

Posted 20 January 2012 - 02:19 PM

Hi,

I've written a few classes in java which are useful in multiple projects. Unfortunately, without copy/pasting them I haven't been able to figure out how to use the classes in multiple projects.

In C++ I would just include the .h file and make sure the compiler knew where to look for it.

However, using Netbeans for my Java, I receive a "Package Folder Already Used in Project" message. How can I have just one source file but use it in multiple projects?

Thanks

Sponsor:

#2 way2lazy2care   Members   -  Reputation: 782

Like
1Likes
Like

Posted 20 January 2012 - 03:43 PM

Hi,

I've written a few classes in java which are useful in multiple projects. Unfortunately, without copy/pasting them I haven't been able to figure out how to use the classes in multiple projects.

In C++ I would just include the .h file and make sure the compiler knew where to look for it.

However, using Netbeans for my Java, I receive a "Package Folder Already Used in Project" message. How can I have just one source file but use it in multiple projects?

Thanks

stick it in a jar.

#3 Belgium   Members   -  Reputation: 123

Like
0Likes
Like

Posted 20 January 2012 - 04:14 PM

stick it in a jar.


Thanks. That does the trick.

#4 szigeti_roland   Members   -  Reputation: 96

Like
0Likes
Like

Posted 20 January 2012 - 07:26 PM

C# is way easier, there's a button wher you can link it. in VStudio.

#5 Danny02   Members   -  Reputation: 275

Like
0Likes
Like

Posted 23 January 2012 - 07:43 AM

C# is way easier, there's a button wher you can link it. in VStudio.

this has nothing todo with the language.


In Netbeans u can set another project as a dependencie.(project->preferences->libarys->add project)




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